
//获取日期指定格式化输出
function getDateFormat(date)
{
	return date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds();
}


/**
 * 判断字符串是否相等
 */
String.prototype.equals=function(str){
	if(this==str)return true;
	return false;
}

/**
 * 判断函数是否相等
 */
Function.prototype.equals=function(func){
	if(this.toString().equals(func.toString()))return true;
	return false;
}

/**
 * 判断布尔值是否相等
 */
Boolean.prototype.equals=function(bool){
	if(this==bool)return true;
	if (bool instanceof Boolean){
	    return this.toString().equals(bool.toString());
	} 
	return false;
}


/**
 * 模拟java的sleep()
 */
function sleep(obj,iMinSecond) 
{ 
if (window.eventList==null) 
window.eventList=new Array(); 
var ind=-1; 
for (var i=0;i<window.eventList.length;i++) 
{ 
if (window.eventList[i]==null) 
{ 
window.eventList[i]=obj; 
ind=i; 
break; 
} 
} 
if (ind==-1) 
{ 
ind=window.eventList.length; 
window.eventList[ind]=obj; 
} 
setTimeout("GoOn(" + ind + ")",iMinSecond); 
} 
function GoOn(ind) 
{ 
var obj=window.eventList[ind]; 
window.eventList[ind]=null; 
if (obj.NextStep) obj.NextStep(); 
else obj(); 
} 

/*sleep方法调用示例
function Test() 
{ 
	alert("sleep"); 
	sleep(this,3000); 
	this.NextStep=function() 
	{ 
		alert("continue"); 
	} 

	alert("继续");
}
 */