﻿	//-------------------初始化显示HTML---------------------
document.write("<div id=\"laosiCalendar\" class=\"laosiCalendar_outer\" style=\"display:none;\">");
document.write("<div style=\"position:absolute;width:100%; height:100%;z-index:1\"><iframe height=\"100%\" width=\"100%\" style=\"border:none\"></iframe></div>");
document.write("<div style=\"position:absolute;z-index:2;\" class=\"laosiCalendar\">");
document.write("  <table width=\"100%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#FFFFFF\">");
document.write("    <tr bgcolor=\"#EEEEEE\">");
document.write("      <td height=\"24\" id=\"laosiCalendartitle\" style=\"color:#000000;cursor:default\" align=\"center\">&nbsp;<b>请选择日期</b></td>");
document.write("    </tr>");
document.write("    <tr bgcolor=\"#FFFFFF\" id=\"ymshow\">");
document.write("      <td height=\"28\" bgcolor=\"#FFFFFF\"><table width=\"100%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
document.write("        <tr>");
document.write("          <td width=\"120\"><table width=\"104\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"yshow\">");
document.write("              <tr>");
document.write("                <td rowspan=\"2\">&nbsp;<img src='http://pic.0s8s.com/Images/navLeft.gif' style=\"cursor:pointer;\" width=\"14\" onmousedown=\"c.laosid1(-2)\" onmouseup=\"c.laosiu()\" onmouseout=\"c.laosiu()\" /> <input name=\"laosiyear\" style=\"text-align:center; \" type=\"text\" class=\"laosiinput laosiyear\" id=\"laosiyear\" onblur=\"c.onchangeyear()\" size=\"6\" maxlength=\"4\" /> <img src='http://pic.0s8s.com/Images/navright.gif' style=\"cursor:pointer;\" width=\"14\" onmousedown=\"c.laosid1(-1)\" onmouseup=\"c.laosiu()\" onmouseout=\"c.laosiu()\" />");
document.write("                </td>");
document.write("                <td></td>");
document.write("              </tr>");
document.write("            </table></td>");
document.write("          <td style=\"height:15px;\" ><select name=\"laosimonth\" id=\"laosimonth\" style=\"border:1px #DDDDDD;\" onchange=\"c.onchangemonth()\">");
document.write("          <option value=\"1\">一月</option>");
document.write("          <option value=\"2\">二月</option>");
document.write("          <option value=\"3\">三月</option>");
document.write("          <option value=\"4\">四月</option>");
document.write("          <option value=\"5\">五月</option>");
document.write("          <option value=\"6\">六月</option>");
document.write("          <option value=\"7\">七月</option>");
document.write("          <option value=\"8\">八月</option>");
document.write("          <option value=\"9\">九月</option>");
document.write("          <option value=\"10\">十月</option>");
document.write("           <option value=\"11\">十一月</option>");
document.write("           <option value=\"12\">十二月</option>");
document.write("         </select>");
document.write("           <input name=\"laosiday\" type=\"hidden\" id=\"laosiday\" /></td>");
document.write("         </tr>");
document.write("       </table>");
document.write("      </td>");
document.write("     </tr>");
document.write(" 		<tr id=\"dayshow\"><td>");
document.write(" 		<table  border=\"0\" cellpadding=\"0\" cellspacing=\"1\" bgcolor=\"#FFFFFF\">");
document.write("     <tr align=\"center\" bgcolor=\"#f9cd8d\">");
document.write("       <td height=\"20\" style=\"color:red\">日</td>");
document.write("       <td height=\"20\">一</td>");
document.write("       <td height=\"20\">二</td>");
document.write("       <td height=\"20\">三</td>");
document.write("       <td height=\"20\">四</td>");
document.write("       <td height=\"20\">五</td>");
document.write("       <td height=\"20\" style=\"color:red\">六</td>");
document.write("     </tr>");
for(i=0;i<6;i++){
	document.write("<tr align=\"center\" bgcolor=\"#FAFAFA\">");
	for(j=0;j<7;j++){
	document.write("<td height=\"20\" width=\"28\" id=\"laosiday"+(i*7+j)+"\">"+(i*7+j)+"</td>");
	}
	document.write("</tr>");
}
document.write("</table>");
document.write("		</td>");
document.write("		</tr>");
document.write("    <tr bgcolor=\"#EEEEEE\">");
document.write("      <td height=\"28\" bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.write("        <tr>");
document.write("          <td width=\"106\"><table width=\"100%\"  border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"timeshow\">");
document.write("            <tr>");
document.write("              <td><img src='http://pic.0s8s.com/Images/navLeft.gif' style=\"cursor:pointer;\" width=\"14\" onmousedown=\"c.laosid(-2)\" onmouseup=\"c.laosiu()\" onmouseout=\"c.laosiu()\" /><input class=\"laosiinput\" style=\"position:relative;border-right:none;width:20px;text-align:center\" name=\"laosihour\" type=\"text\" id=\"laosihour\" size=\"2\" maxlength=\"2\" onblur=\"c.onchangehour()\" onfocus=\"c.ontimefocus('hh')\" /><input class=\"laosiinput\" style=\"position:relative;left:-4px;border-left:none;border-right:none;width:6px;text-align:center\" readonly=\"readonly\" name=\"maohao0\" type=\"text\" id=\"maohao0\" value=\":\" size=\"1\" maxlength=\"1\" /><input class=\"laosiinput\" style=\"position:relative;left:-4px;border-left:none;border-right:none;width:15px;text-align:center\" name=\"laosiminute\" type=\"text\" id=\"laosiminute\" size=\"2\" maxlength=\"2\" onblur=\"c.onchangeminute()\" onfocus=\"c.ontimefocus('min')\" /><input class=\"laosiinput\" style=\"position:relative;left:-4px;border-left:none;border-right:none;width:6px;text-align:center \" readonly=\"readonly\" name=\"maohao\" type=\"text\" id=\"maohao\" value=\":\" size=\"1\" maxlength=\"1\" /><input class=\"laosiinput\" style=\"position:relative;left:-4px;border-left:none;width:15px;text-align:center\" name=\"laosisecond\" type=\"text\" id=\"laosisecond\" size=\"2\" maxlength=\"2\" onblur=\"c.onchangesecond()\" onfocus=\"c.ontimefocus('ss')\" /><img src='http://pic.0s8s.com/Images/navright.gif' style=\"cursor:pointer;\" width=\"14\" onmousedown=\"c.laosid(-1)\" onmouseup=\"c.laosiu()\" onmouseout=\"c.laosiu()\" /></td>");
document.write("            </tr>");
document.write("          </table></td>");
document.write("          <td align=\"right\"><a onclick=\"c.getclear()\" style=\"color:#000;text-decoration:none;cursor:pointer;\">隐藏</a> <a onclick=\"c.getok()\" style=\"color:#000 ;text-decoration:none;cursor:pointer;\">确定</a> <a onclick=\"c.LaoSiHide()\" style=\"color:#000;text-decoration:none;cursor:pointer;\">关闭</a>&nbsp;</td>");
document.write("        </tr>");
document.write("      </table>");
document.write("      </td>");
document.write("    </tr>");
document.write("  </table></div><iframe width=0 height=0></iframe>");
document.write("</div>");
	//-------------------初始化结束-------------------------
function Calendar(){
	//--------------------初始化变量------------------------
	var yearstart=1920;//最小年份
	var yearend=2999;//最大年份
	var laosisd=new Date();//系统日期对像
	var laosiyear=laosisd.getFullYear();
	var laosimonth=laosisd.getMonth()+1;
	var laosiday=laosisd.getDate();
	var laosihour=laosisd.getHours();
	var laosiminute=laosisd.getMinutes();
	var laosisecond=laosisd.getSeconds();
	var laositimeitem="hh";
	var bb=",1,3,5,7,8,10,12,";//公历月大份数列表
	var v_laosi=document.getElementById("laosiCalendar");
	var v_year=document.getElementById("laosiyear");
	var v_month=document.getElementById("laosimonth");
	var v_day=document.getElementById("laosiday");
	var v_hour=document.getElementById("laosihour");
	var v_minute=document.getElementById("laosiminute");
	var v_second=document.getElementById("laosisecond");
	var defaultformat="[yy]-[mon]-[dd]";
	var return_obj,return_format=defaultformat;
	var return_item=["[yy]","[mon]","[dd]","[hh]","[min]","[ss]"];
	var return_var=["[laosiyear]","[laosimonth]","[laosiday]","[laosihour]","[laosiminute]","[laosisecond]"];
	var IEarrHideObj=new Array(); //IE隐藏对象列表
	var me=this;
	var laosigoo;
	//函数名：getCalendar
	//参  数：format 取得需要返回日期时间的格式 格式字符串中［yy］[mon][dd][hh][min][ss]为是间各部分
	//说  明：只提供格式字符串中包含部分的选择，另外如果格式字符串没包含任何部分默认为[yy]-[mon]-[dd]
	me.getCalendar=function(format,def,obj,evt){
		var tmppart,maxindex,indexl;
		var i,tmpdef;
		var laosipartindex=new Array(5);
		var laosipart=["[laosiyear]","[laosimonth]","[laosiday]","[laosihour]","[laosiminute]","[laosisecond]"];
		var laosiformat=["[yy]","[mon]","[dd]","[hh]","[min]","[ss]"];
		if(format==undefined||format.match("\\S")==null) format=defaultformat;
		obj=obj.toString().indexOf('object')>=0?obj:document.getElementById(obj);
		return_obj=obj;return_format=format;
		for(i=0;i<laosiformat.length;i++) format=format.replace(eval("/"+patrnword(laosiformat[i])+"/g"),laosipart[i])
		for(i=0;i<6;i++)	{
			maxindex=format.length;
			for(j=i;j<6;j++){
			 indexl=format.indexOf(laosipart[j])
			 if(maxindex>indexl&&indexl>=0){
			 	tmppart=laosipart[i];
			 	laosipart[i]=laosipart[j];
				laosipart[j]=tmppart;
				laosipartindex[i]=indexl;
				maxindex=indexl;
				}
			}
			if(maxindex==format.length) break;
		}
		if(def!=undefined&&def.match("\\S")!=null){
			tmppart=format;
			tmpdef=def;
			for(i=0;i<6;i++) tmppart=tmppart.replace(eval("/"+patrnword(laosipart[i])+"/g"),"|");
			tmppart=tmppart.split("|");
			for(i=0;i<tmppart.length;i++)tmpdef=tmpdef.replace(eval("/"+patrnword(tmppart[i])+"/"),"|");
			tmpdef=tmpdef.split("|");
			j=0;
			for(i=0;i<tmpdef.length;i++){
				if(laosipartindex[j]<0) break;
				if(tmpdef[i]!="") eval(laosipart[j++].replace("[","").replace("]","")+"=parseInt('"+tmpdef[i]+"')");
			}
		}
		setyear(laosiyear);
		setmonth(laosimonth);
		setday(laosiday);
		sethour(laosihour);
		setminute(laosiminute);
		setsecond(laosisecond);
		showdaylist();
		showlaosi(evt);
	}
	me.getok=function(){
		var rv=return_value()
		if (return_obj){
		return_obj.value=rv;
		}
		this.LaoSiHide();
		window.location.href='/default.aspx?date='+rv;
		return rv;
	}
	
	me.getclear=function(){
		if (return_obj){
		return_obj.value="";
		}
		this.LaoSiHide();
		return ;
	}
	//隐藏Laosi控件
	me.LaoSiHide=function (){
		if(document.all) ShowObject(); //IE显示被隐藏的标签
		v_laosi.style.display="none";
	}
	
	me.onchangeday=function(val){
		setday(v_day.value);
		if(val==-1) setday(laosiday-1);
		else if(val==-2)	setday(laosiday+1);
		else if(!isNaN(val)) setday(val);
		showdaylist();
	}
	
	me.onchangemonth=function(){
		setmonth(v_month.value);
		showdaylist();
	}
	
	me.onchangeyear=function(val){
		setyear(v_year.value);
		if(val==-1) setyear(laosiyear-1);
		if(val==-2)	setyear(laosiyear+1);
		showdaylist();
	}
	
	me.onchangehour=function(val){
		sethour(v_hour.value);
		if(val==-1)if(laosihour-1>=0) sethour(laosihour-1);else sethour(23);
		if(val==-2)	if(laosihour+1<=23)sethour(laosihour+1);else sethour(0);
		showdaylist();		
	}
	me.onchangeminute=function(val){
		setminute(v_minute.value);
		if(val==-1)if(laosiminute-1>=0) setminute(laosiminute-1);else setminute(59);
		if(val==-2)	if(laosiminute+1<=59)setminute(laosiminute+1);else setminute(0);
		showdaylist();		
	}
	me.onchangesecond=function(val){
		setsecond(v_second.value);
		if(val==-1)if(laosisecond-1>=0) setsecond(laosisecond-1);else setsecond(59);
		if(val==-2)	if(laosisecond+1<=59)setsecond(laosisecond+1);else setsecond(0);
		showdaylist();		
	}
	me.onchangetime=function(o){
		switch(laositimeitem){
			case "hh":
				this.onchangehour(o);
				v_hour.focus();
				v_hour.select();
				break;
			case "min":
				this.onchangeminute(o);
				v_minute.focus();
				v_minute.select();
				break;
			default:
				this.onchangesecond(o);
				v_second.focus();
				v_second.select();
		}
	}
	me.ontimeblur=function(){
		laositimeitem="hh";
	}
	me.ontimefocus=function(val){
		laositimeitem=val;
	}
	
	me.laosid=function (n){
		me.onchangetime(n);
		laosigoo=setTimeout("c.laosid("+n+")",100);
	}
	me.laosid1=function (n){
		me.onchangeyear(n);
		laosigoo=setTimeout("c.laosid1("+n+")",100);
	}
	me.laosiu=function(){
	 clearTimeout(laosigoo);
	}
	//函数名：showlaosi 私有
	//参  数：evt为firefox时的鼠标事件参数
	//说  明：显示根据控间的设定显示控件
	function showlaosi(evt){
		var format=return_format;
		var v_laosih=233;
		var v_laosiw=170;
		var ympart=document.getElementById("ymshow");
		var ypart=document.getElementById("yshow");
		var mmpart=document.getElementById("laosimonth");
		var dpart=document.getElementById("dayshow");
		var timepart=document.getElementById("timeshow");
		var hpart=document.getElementById("laosihour");
		var mpart=document.getElementById("laosiminute");
		var spart=document.getElementById("laosisecond");
		var hmpart=document.getElementById("maohao0");
		var mspart=document.getElementById("maohao");
		if(format.indexOf("[dd]")>=0)dpart.style.display="";else{ dpart.style.display="none";v_laosih-=149;}
		if(format.indexOf("[yy]")>=0)ypart.style.display="";else ypart.style.display="none";
		if(format.indexOf("[mon]")>=0)mmpart.style.display="";else mmpart.style.display="none";
		if(format.indexOf("[yy]")>=0||format.indexOf("[mon]")>=0)ympart.style.display="";else{ ympart.style.display="none";v_laosih-=29;}
		if(format.indexOf("[hh]")>=0)hpart.style.display="";else hpart.style.display="none";
		if(format.indexOf("[min]")>=0)mpart.style.display="";else mpart.style.display="none";		
		if(format.indexOf("[ss]")>=0)spart.style.display="";else spart.style.display="none";
		if(format.indexOf("[hh]")>=0&&format.indexOf("[min]")>=0)hmpart.style.display="";else hmpart.style.display="none";
		if(format.indexOf("[min]")>=0&&format.indexOf("[ss]")>=0)mspart.style.display="";else mspart.style.display="none";
		if(format.indexOf("[hh]")>=0||format.indexOf("[min]")>=0||format.indexOf("[ss]")>=0)timepart.style.display="";else timepart.style.display="none";
		v_laosi.style.height=v_laosih+"px";
		v_laosi.style.display = "";
		//调整显示位置
		var iX, iY,ex=0,ey=0;
		//至311行修改于2007-12-28号，对显示位置进地了修整
		if(evt.srcElement){
			var o=evt.srcElement;
			/*
			ex+=evt.offsetX;ey+=evt.offsetY;
			var ex=(document.documentElement?document.documentElement.scrollLeft:document.body.scrollLeft)+evt.x-evt.offsetX;
			var ey=(document.documentElement?document.documentElement.scrollTop:document.body.scrollTop)+evt.y-evt.offsetY;
			*/
			var ow=evt.srcElement.offsetWidth;
			var oh=evt.srcElement.offsetHeight;
		}
		else if(evt.target){
			var o=evt.target;
			var ow=evt.target.offsetWidth;
			var oh=evt.target.offsetHeight;
		}else{
			var o=evt;
			var ow=evt.offsetWidth;
			var oh=evt.offsetHeight;
		}
		while(o){
			ex+=o.offsetLeft;
			ey+=o.offsetTop;
			o=o.offsetParent;
		}
		v_laosiw=v_laosi.offsetWidth;v_laosih=v_laosi.offsetHeight;
 		//计算left
		if (ex + v_laosiw > document.body.offsetWidth ) iX =ex - v_laosiw + ow ;else iX =ex;  
		if (iX <0)iX=0;
		//计算top
		if (ey + v_laosih > document.body.offsetHeight ) iY = ey - v_laosih  ;else iY = ey+ oh;  
		if (iY <0)iY=0;
		v_laosi.style.left = iX + "px";
		v_laosi.style.top = iY + "px";
		if(document.all){ //IE隐藏控件
			HideObject("SELECT");
			HideObject("OBJECT");
			}
		}
	
	function return_value(){
		var i,returnv,itemv;
		returnv=return_format;
		for(i=0;i<return_item.length;i++){
			itemv=eval(return_var[i].replace("[","").replace("]",""));
			itemv=itemv<10?"0"+itemv:itemv;//返回值小于10补0，去掉即不补
			returnv=returnv.replace(eval("/"+patrnword(return_item[i])+"/g"),itemv);
		}
		return returnv;
	}
	
	function patrnword(str){
		str=str.replace(/\\/g,"\\x5c").replace(/\//g,"\\x2f");
		str=str.replace(/\[/g,"\\x5b").replace(/\]/g,"\\x5d");
		return str;
	}
	//根据标签名称隐藏标签。如会遮住控件的select，object,用于IE
	function HideObject(strTagName) {
	 
	 x =  v_laosi.offsetLeft;
	 y =  v_laosi.offsetTop;
	 h =  v_laosi.offsetHeight;
	 w =  v_laosi.offsetWidth;
	 for (var i = 0; i < document.all.tags(strTagName).length; i++)
	 {
		var obj = document.all.tags(strTagName)[i];
		if (! obj || ! obj.offsetParent)
		 continue;
		// 获取元素对于BODY标记的相对坐标
		var objLeft   = obj.offsetLeft;
		var objTop    = obj.offsetTop;
		var objHeight = obj.offsetHeight;
		var objWidth = obj.offsetWidth;
		var objParent = obj.offsetParent;
	
		//alert("控件左端:" + x + "select左端" + (objLeft + objWidth) + "控件底部:" + (y+h) + "select高:" + objTop);
		
		var bolHide = true;
		if( obj.style.display == "none" || obj.style.visibility == "hidden" || obj.getAttribute("Author") == "tiannet" ){
		 //如果标签本身就是隐藏的，则不需要再隐藏。如果是控件中的下拉框，也不用隐藏。
		 bolHide = false;
		}
		if(  ( (objLeft + objWidth) > x && (y + h + 20) > objTop && (objTop+objHeight) >  y && objLeft < (x+w) ) && bolHide ){
		 IEarrHideObj[IEarrHideObj.length] = obj;
		 obj.style.visibility = "hidden";
		}
	 }
	}
	//显示被隐藏的标签
	function ShowObject(){
	 for(var i = 0;i < IEarrHideObj.length;i ++){
		IEarrHideObj[i].style.visibility = "";
	 }
	 IEarrHideObj.length=0;
	}

	
	function setyear(year){//设定laosi日期年份并校正错误
		if(isNaN(year=parseInt(year,10))) year=laosisd.getFullYear();
		if(year<yearstart||year>yearend) year=laosisd.getFullYear();
		v_year.value=laosiyear=year;
	}
	
	function setmonth(month){//设定laosi日期月份并校正错误
		if(isNaN(month=parseInt(month,10))) month=laosisd.getMonth()+1;
		if(month<1||month>12) month=laosisd.getMonth()+1;
		v_month.value=laosimonth=month;
	}
	
	function setday(day){//设定laosi日期号数并校正错误
		if(isNaN(day=parseInt(day,10))) day=laosisd.getDate();
		if(day<1||day>laosimonthnums()) day=laosisd.getDate();
		v_day.value=laosiday=day;
	}
	function sethour(hour){//设定laosi时间小时并校正错误
		if(isNaN(hour=parseInt(hour,10))) hour=laosisd.getHours();
		if(hour<0||hour>23) hour=laosisd.getHours();
		laosihour=hour;
		v_hour.value=laosihour<10?"0"+laosihour:laosihour;
	}
	
	function setminute(minute){
		if(isNaN(minute=parseInt(minute,10))) minute=laosisd.getMinutes();
		if(minute<0||minute>59) minute=laosisd.getMinutes();
		laosiminute=minute;
		v_minute.value=laosiminute<10?"0"+laosiminute:laosiminute;
	}
	
	function setsecond(second){
		if(isNaN(second=parseInt(second,10))) second=laosisd.getSeconds();
		if(second<0||second>59) second=laosisd.getSeconds();
		laosisecond=second;
		v_second.value=laosisecond<10?"0"+laosisecond:laosisecond;
	}
	function laosimonthnums(){ //最得当前laosi年月的天数
		if(bb.indexOf(","+laosimonth+",")>=0) return 31;
		if(laosimonth!=2) return 30;
		return (laosiyear%4==0&&laosiyear%100!=0)||laosiyear%400==0?29:28;
	}
	
	function showdaylist(){
		var thisday;
		var dateObj = new Date(laosiyear,laosimonth-1,1);
		var weekday=dateObj.getDay();
		var monthdays=laosimonthnums();
		var j=0;
		for(i=0;i<42;i++){
			thisday=document.getElementById("laosiday"+i);
			thisday.className="";
			if(i>=weekday&&i<weekday+monthdays){
				thisday.innerHTML=++j;
				if(laosiday==j){
				thisday.className="laosiday";
				thisday.onmouseover=null;
				thisday.onmouseout=null;	
				}else{
				thisday.onmouseover=function(){this.className="laosidayover";}
				thisday.onmouseout=function(){this.className="";};
				thisday.onclick=function(){me.onchangeday(this.innerHTML);me.getok();}
				}
				}
			else
			{
				thisday.innerHTML="";
				thisday.onmouseover=null;
				thisday.onmouseout=null;	
			}
		}
	}
/*===============Hedit_v1.0基本鼠标拖动============
功    能：实现图层鼠标拖动，图层的position必须为absolute属性
参    数：o要拖动的对象
          r限定拖动范围[left,right,top,bottom]为空字符不限定；
  obj重定义容器
已测浏览器：IE6.0、firefox1.5
最后更改:2006-3-29
=================================================*/
me.drag=function(o,ob,r,obj){
	try{o.firstChild.onmousedown=function(){return false;}}catch(ex){}
	o.onmousedown=function(evt){
		var d=document;if(!evt)evt=window.event;
		if (evt.button==1||evt.button==0){
			var x=evt.layerX?evt.layerX:evt.offsetX,y=evt.layerY?evt.layerY:evt.offsetY;
			var ox=obj?obj.offsetLeft:0,oy=obj?obj.offsetTop:0;
			if(o.setCapture)
				o.setCapture();
			else if(window.captureEvents)
				window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
			d.onmousemove=function(evt){
				var mx,my;
				evt=evt||window.event;
				if(!evt.pageX)evt.pageX=evt.clientX;
				mx=(ox?evt.pageX-ox:evt.pageX)+(window.event?parseInt(d.documentElement?d.documentElement.scrollLeft:d.body.scrollLeft):0);
				if(!evt.pageY)evt.pageY=evt.clientY;
				my=(oy?evt.pageY-oy:evt.pageY)+(window.event?parseInt(d.documentElement?d.documentElement.scrollTop:d.body.scrollTop):0);
				var tx=mx-x,ty=my-y;
				ob.style.left=(tx<r[0]?r[0]:tx>r[1]?r[1]:tx)+"px";
				ob.style.top=(ty<r[2]?r[2]:ty>r[3]?r[3]:ty)+"px";
			}
			d.onmouseup=function(){
				if(o.releaseCapture)
					o.releaseCapture();
				else if(window.captureEvents)
					window.captureEvents(Event.MOUSEMOVE|Event.MOUSEUP);
					d.onmousemove=null;
					d.onmouseup=null;
			}
		}
	}
}
}

var c=new Calendar()
document.getElementById("laosiCalendartitle").style.cursor='hand';
c.drag(document.getElementById("laosiCalendartitle"),document.getElementById("laosiCalendar"),"");