//show Calendar
function Calendar_GetObj(objName)
{
	if(document.getElementById)
	{
		return eval('document.getElementById("' + objName + '")');
	}else if(document.layers)
	{
		return eval("document.layers['" + objName +"']");
	}else
	{
		return eval('document.all.' + objName);
	}
}
function Calendar()
{
	var divName = "Calendar_CnlCon";
	var topDivName = "Calendar_Cnl";
	if(Calendar_GetObj(divName).style.display == 'block')
	{
		Calendar_GetObj(divName).style.display = 'none';
	}
	else if(Calendar_GetObj(divName).style.display == 'none')
	{
		var i = 0;
		while(1)
		{
			if(document.getElementById("Calendar_CnlCon_" + i))
			{
				document.getElementById("Calendar_CnlCon_" + i).style.display = "none";
			}
			else
			{
				break;
			}
			i ++;
		}
		Calendar_GetObj(divName).style.display = 'block';
	}
}
function Create_Calendar(Calendar_Content,top,left,divZindex)
{
	document.write("<div style='height:32px; width:162px; margin:0; padding:0'>");//增加宽度控制并居中
	document.write("<div style='position:relative' style='z-index:"+ divZindex + ";'>");
	document.write("<div id='Calendar_Cnl'><a class='Calendar' href='javascript:Calendar();'>Calendar</a></div>");
	document.write("<div id='Calendar_CnlCon' style='text-align:left;border:#666 1px solid;background:#FFF;display:none;position:absolute;top:" + top + "px; left:" + left + "px;width:160px'>");
	document.write(Calendar_Content);
	document.write("</div>");
	document.write("</div>");
	document.write("</div>");
	document.write("</div>");
}

//
function showHide(){

	var addTable =document.getElementById("reviewTable");
	
	if(addTable.style.display=="none")addTable.style.display="block";
	
	else addTable.style.display="none";
}

var flag=false; 
function DrawImage(ImgD){ 
	var image=new Image(); 
	image.src=ImgD.src; 
	if(image.width>0 && image.height>0){ 
		flag=true; 
		if(image.width>=518){ 
			ImgD.width=518; 
			ImgD.height=(image.height*518)/image.width; 
		}else{ 
			ImgD.width=image.width; 
			ImgD.height=image.height; 
		}  
	} 
} 


function winconfirm(confirmMSG,confirmURL){
	question = confirm(confirmMSG);
	if (question != "0"){
		window.location=confirmURL;
	}
}