document.write('<iframe id=CalFrame name=CalFrame frameborder=0 src=/include/CalendarCn.htm scrolling="No" noresize="noresize" style=display:none;position:absolute;z-index:100;width:245px;height:215px;BACKGROUND-COLOR:#f4f4ff;></iframe>');
if (document.all)
    window.document.attachEvent("onclick",gorush);
else 
    window.document.addEventListener("click",gorush,false)  
   
function gorush(){    
	var cf=document.getElementById("CalFrame");     
	var obj;
	if(document.all)
	{ 
		obj = event.srcElement ;
	}
	else
	{
		obj = arguments[0].target;
	}
	var ev=obj.id; 
	ev=ev.substring(0,3);
	if(ev!="cal")
	{cf.style.display="none";return;}
} 
  
    

var returnValue="";
function getDate(fieldYear,fieldMonth,fieldDay,SetD,evt)
{
	evt=evt ? evt : (window.event ? window.event : null);

	var cf=document.getElementById("CalFrame");

	var wcf=window.frames.CalFrame;
 
	
	if(cf.style.display=="block")
	{cf.style.display="none";return;}
 
	var cfwidth;
	var numcfwidth;
	var cfheight;
	var	numcfheight;
	
	cfwidth=cf.style.width;
	numcfwidth=parseInt(cfwidth.substring(0,cfwidth.length-2));
	cfheight=cf.style.height;
	numcfheight=parseInt(cfheight.substring(0,cfheight.length-2));
	
	var mX= evt.clientX ? evt.clientX : evt.pageX;
	var mY= evt.clientY ? evt.clientY : evt.pageY;
	if ((mX+numcfwidth)>document.documentElement.clientWidth)
	{
		cf.style.left=document.documentElement.clientWidth-numcfwidth+'px';
	}
	else
	{
		cf.style.left=mX-5+'px';
	}
	cf.style.top=mY+5+document.documentElement.scrollTop+document.body.scrollTop+'px'
	
	
	cf.style.display="block";
	 
	wcf.init(fieldYear,fieldMonth,fieldDay,SetD);
}
 
function SetDate()
{
	var byear=document.getElementById("DLinYear").value;
	var bmon= document.getElementById("DLinMonth").value;	
	var bday=document.getElementById("DLInDay").value;		
	var lyear=document.getElementById("DLoutYear").value;	
	var lmon=document.getElementById("DLoutMonth").value;
	var lday=document.getElementById("DLoutDate").value;
	var thisdate;
	var thatdate;
	var booC;
	try
	{
		thisdate=new Date(byear,bmon-1,bday);
	}
	catch(err)
	{
		return;
	}
	try
	{
		thatdate=new Date(lyear,lmon-1,lday);
		var intc=parseInt(thatdate-thisdate);
		if (intc>0)
			booC=false;
		else
			booC=true;
	}
	catch(err)
	{
		
		booC=true;
	}
	if (!booC)
		return;
	thisdate=new Date(Date.parse(thisdate) + 86400000);
	document.getElementById("DLoutYear").value=thisdate.getFullYear();
	var intMonth=thisdate.getMonth()+1;
	var strMonth=intMonth.toString();
	strMonth='0'+strMonth;
	strMonth=strMonth.substring(strMonth.length-2,strMonth.length)
	
	document.getElementById("DLoutMonth").value=strMonth
	var intDay=thisdate.getDate();
	var strDay=intDay.toString();
	strDay='0'+strDay;
	strDay=strDay.substring(strDay.length-2,strDay.length)
	document.getElementById("DLoutDate").value=strDay;
}