﻿//----------------------------------------------------------Calendar------------------------------------------------------
var bMoveable=true;               
var _VersionInfo="www.OpenBox.net"        
var strFrame;             
//document.writeln(''); 
//document.writeln('<iframe name="meizzDateLayer" Author="wayx" frameborder="0" style="position: absolute; width: 150px; height: 215px; z-index: 2147483637; visibility:hidden" scrolling="no"></iframe>'); 
strFrame='<style>'; 
strFrame+='INPUT.button{BORDER-RIGHT: #DFE9F3 1px solid;BORDER-TOP: #DFE9F3 1px solid;BORDER-LEFT: #DFE9F3 1px solid;'; 
strFrame+='BORDER-BOTTOM: #DFE9F3 1px solid;BACKGROUND-COLOR: #fff8ec;font-family:Arial;}'; 
strFrame+='TD{FONT-SIZE: 9pt;font-family:Arial;}'; 
strFrame+='A{text-decoration:none;font-weight:bold;color:black}'; 
strFrame+='</style>'; 
strFrame+='<scr' + 'ipt>'; 
strFrame+='var datelayerx,datelayery;        /*???????????*/'; 
strFrame+='var bDrag;        /*????????*/'; 
strFrame+='function document_onmousemove(e){/*????????,????????,?????*/'; 
strFrame+='if(bDrag){'; 
strFrame+='        var DateLayer=parent.document.getElementsByName("meizzDateLayer")[0].style;'; 
strFrame+='                DateLayer.left = parseInt(DateLayer.left)+ e.clientX-datelayerx+"px"; /*?????????????????????,?????div???*/'; 
strFrame+='if(DateLayer.top=="")DateLayer.top=0/"px/";'; 
strFrame+='                DateLayer.top = parseInt(DateLayer.top)+ e.clientY-datelayery+"px";}}'; 
strFrame+='function DragStart(e){                /*??????*/'; 
strFrame+="if ((document.all?e.button:e.which)!=1) return;\n"; 
strFrame+='var DateLayer=parent.document.getElementsByName("meizzDateLayer")[0].style;'; 
strFrame+='        datelayerx=e.clientX;'; 
strFrame+='        datelayery=e.clientY;'; 
strFrame+='        bDrag=true;}'; 
strFrame+='function DragEnd(){                /*??????*/'; 
strFrame+='        bDrag=false;}'; 
strFrame+='</scr' + 'ipt>'; 
strFrame+='<body onmousemove="document_onmousemove(event)">'; 
strFrame+='<div style="z-index:2147483642;position: absolute; left:0; top:0;" onselectstart="return false"><span id=tmpSelectYearLayer Author=wayx style="z-index: 10003;position: absolute;top: 3; left: 19;visibility: hidden"></span>'; 
strFrame+='<span id=tmpSelectMonthLayer Author=wayx style="z-index: 2147483642;position: absolute;top: 3; left: 78;visibility: hidden"></span>'; 
strFrame+='<table border=1 cellspacing=0 cellpadding=0 width="152px" height="160px" bordercolor=#DFE9F3 bgcolor=#DFE9F3 Author="wayx">'; 
strFrame+='  <tr Author="wayx"><td width="152px" height="23px" Author="wayx" bgcolor=#FFFFFF><table border=0 cellspacing=1 cellpadding=0 width=150 Author="wayx" height=23>'; 
strFrame+='  <tr align=center Author="wayx"><td width=16 align=center bgcolor=#DFE9F3'; 
strFrame+=' onclick="parent.meizzPrevM()" title="Previous Month" Author=meizz><a href="javascript:;" style="font-size:12px;color: #ffffff" Author=meizz><</a>'; 
strFrame+='        </td><td width=60 align=center style="font-size:12px;cursor:default" Author=meizz '; 
strFrame+='onmouseover="style.backgroundColor=\'#FFD700\'" onmouseout="style.backgroundColor=\'white\'" '; 
strFrame+='onclick="parent.tmpSelectYearInnerHTML(innerHTML.match(/\\d{4}/).toString());" title="Click here to choose year"><span Author=meizz id=meizzYearHead></span></td>'; 
strFrame+='<td width=48 align=center style="font-size:12px;cursor:default" Author=meizz onmouseover="style.backgroundColor=\'#FFD700\'" '; 
strFrame+=' onmouseout="style.backgroundColor=\'white\'" onclick="parent.tmpSelectMonthInnerHTML(innerHTML.match(/\\d\\d?/).toString())"'; 
strFrame+='        title="Click here to choose month"><span id=meizzMonthHead Author=meizz></span></td>'; 
strFrame+='        <td width=16 bgcolor=#DFE9F3 align=center style="font-size:12px;cursor: hand;color: #ffffff" '; 
strFrame+=' onclick="parent.meizzNextM()" title="Next Month" Author=meizz><a href="javascript:;" style="font-size:12px;color: #ffffff;font:bold" Author=meizz>></a></td></tr>'; 
strFrame+='    </table></td></tr>'; 
strFrame+='  <tr Author="wayx"><td width="152px" height="18px" Author="wayx">'; 
strFrame+='<table border=1 cellspacing=0 cellpadding=0 bgcolor=#DFE9F3 ' + (bMoveable? 'onmousedown="DragStart(event)" onmouseup="DragEnd()"':''); 
strFrame+=' BORDERCOLORLIGHT=#DFE9F3 BORDERCOLORDARK=#FFFFFF width=150 height=20 Author="wayx" style="cursor:' + (bMoveable ? 'move':'default') + '">'; 
strFrame+='<tr Author="wayx" align=center valign=bottom><td style="font-size:12px;color:#000000" Author=meizz>Su</td>'; 
strFrame+='<td style="font-size:12px;color:#000000" Author=meizz>Mo</td><td style="font-size:12px;color:#000000" Author=meizz>Tu</td>'; 
strFrame+='<td style="font-size:12px;color:#000000" Author=meizz>We</td><td style="font-size:12px;color:#000000" Author=meizz>Th</td>'; 
strFrame+='<td style="font-size:12px;color:#000000" Author=meizz>Fr</td><td style="font-size:12px;color:#000000" Author=meizz>Sa</td></tr>'; 
strFrame+='</table></td></tr><!-- openbox-->'; 
strFrame+='  <tr Author="wayx"><td width="152px" height="120px" Author="wayx">'; 
strFrame+='    <table border=1 cellspacing=2 cellpadding=0 BORDERCOLORLIGHT=#DFE9F3 BORDERCOLORDARK=#FFFFFF bgcolor=#fff8ec width=150 height=120 Author="wayx">'; 
var n=0; for (j=0;j<5;j++){ strFrame+= ' <tr align=center Author="wayx">'; for (i=0;i<7;i++){ 
strFrame+='<td width=20 height=20 id=meizzDay'+n+' style="font-size:12px" Author=meizz onclick=parent.meizzDayClick(this.innerHTML.match(/\\d+/).toString(),0)></td>';n++;} 
strFrame+='</tr>';} 
strFrame+='      <tr align=center Author="wayx">'; 
for (i=35;i<39;i++)strFrame+='<td width="20px" height="20px" id=meizzDay'+i+' style="font-size:12px" Author=wayx onclick="parent.meizzDayClick(this.innerHTML.match(/\\d+/).toString(),0)"></td>'; 
strFrame+='        <td colspan=3 align=right Author=meizz><a href="javascript:;" onclick=parent.closeLayer() style="font-size:12px;text-decoration:underline;font-weight:300;"'; 
strFrame+='         Author=meizz title="' + _VersionInfo + '">close</a> </td></tr>'; 
strFrame+='    </table></td></tr><tr Author="wayx"><td Author="wayx">'; 
strFrame+='        <table border=0 cellspacing=1 cellpadding=0 width=100% Author="wayx" bgcolor=#FFFFFF>'; 
strFrame+='          <tr Author="wayx"><td Author=meizz align=left><input Author=meizz type=button class=button value="<<" title="Previous Year" onclick="parent.meizzPrevY()" '; 
strFrame+='             onfocus="this.blur()" style="font-size: 12px; height: 20px; padding:0;"><input Author=meizz class=button title="Previous Month" type=button '; 
strFrame+='             value="< " onclick="parent.meizzPrevM()" onfocus="this.blur()" style="font-size: 12px; height: 20px; padding:0;"></td> '; 
strFrame+='             <td Author=meizz align=center><input Author=meizz type=button class=button value=Today onclick="parent.meizzToday()" '; 
strFrame+='             onfocus="this.blur()" title="Today" style="font-size: 12px; height: 20px; padding:0; cursor:hand;"></td><td '; 
strFrame+='             Author=meizz align=right><input Author=meizz type=button class=button value=" >" onclick="parent.meizzNextM()" '; 
strFrame+='             onfocus="this.blur()" title="Next Month" class=button style="font-size: 12px; height: 20px;padding:0;"><input '; 
strFrame+='             Author=meizz type=button class=button value=">>" title="Next Year" onclick="parent.meizzNextY()"'; 
strFrame+='             onfocus="this.blur()" style="font-size: 12px; height: 20px;padding:0;"></td>'; 
strFrame+='</tr></table></td></tr></table></div></body>'; 
var odatelayer; 
var outObject; 
var outButton;
var outDate="";
function calendarinit(){ 
        document.onclick=Function.createDelegate(this,document_onclick);
        document.onkeyup=Function.createDelegate(this,document_onkeyup);
        window.frames.meizzDateLayer.document.writeln(strFrame); 
        window.frames.meizzDateLayer.document.close();
        window.frames.meizzDateLayer.zIndex=2147483642;
        odatelayer=window.frames.meizzDateLayer.document;
} 
//==================================================== WEB====================================================== 

function setday(tt,obj)
{ 
//        alert(tt);
//        alert(obj);
        if (arguments.length >  2){alert("Sorry!Too much parameter!");return;} 
        if (arguments.length == 0){alert("Sorry!No parameter!");return;} 
        var dads  = document.getElementsByName("meizzDateLayer")[0].style; 
        var dwith=document.body.clientWidth;
        var dheight=document.body.clientHeight;
        var th = tt; 
        var ttop  = tt.offsetTop;
        var thei  = tt.offsetHeight;
        var tleft = tt.offsetLeft;
        var ttyp  = tt.type;
        while (tt = tt.offsetParent){ttop+=tt.offsetTop; tleft+=tt.offsetLeft;} 
        dads.top  = ttop+thei+"px" ; 
        dads.left = tleft+"px"; 
        if((ttop+thei+210)>dheight)
        {
            dads.top=dheight-215+"px";
        }
        if((tleft+155)>dwith)
        {
            dads.left=dwith-160+"px";
        }
        outObject = (arguments.length == 1) ? th : obj; 
        outButton = (arguments.length == 1) ? null : th;
        
		var reg = /^(\d+)-(\d{1,2})-(\d{1,2})$/; 
        var r = outObject.value.match(reg); 
        if(r!=null){ 
                r[2]=r[2]-1; 
                var d= new Date(r[1], r[2],r[3]); 
                if(d.getFullYear()==r[1] && d.getMonth()==r[2] && d.getDate()==r[3]){ 
                        outDate=d;
                } 
                else outDate=""; 
                        meizzSetDay(r[1],r[2]+1); 
        } 
        else{ 
                outDate=""; 
                meizzSetDay(new Date().getFullYear(), new Date().getMonth() + 1); 
        } 
        dads.visibility="visible"; 
        document.getElementsByName("meizzDateLayer")[0].focus(); 
        event.returnValue=false; 
} 

var MonHead = new Array(12);
    MonHead[0] = 31; MonHead[1] = 28; MonHead[2] = 31; MonHead[3] = 30; MonHead[4]  = 31; MonHead[5]  = 30; 
    MonHead[6] = 31; MonHead[7] = 31; MonHead[8] = 30; MonHead[9] = 31; MonHead[10] = 30; MonHead[11] = 31; 

var meizzTheYear=new Date().getFullYear();
var meizzTheMonth=new Date().getMonth()+1;
var meizzWDay=new Array(39);

function document_onclick(e)
{ 
        var elm = e || event ; 
        var elm = elm.target?elm.target:elm.srcElement;
      // alert(elm.getAttribute("Author")); 

        if ((elm.getAttribute("Author")==null || elm.getAttribute("Author")=="") && elm != outObject && elm != outButton) 
    closeLayer(); 
} 

function document_onkeyup(e)
  { 
    if (window.event.keyCode==27){ 
                if(outObject)outObject.blur(); 
                closeLayer(); 
        } 
        else if(document.activeElement) 
                if(document.activeElement.getAttribute("Author")==null && document.activeElement != outObject && document.activeElement != outButton) 
                { 
                        closeLayer(); 
                } 
  } 
  
  function tmpSelectYearInnerHTML(strYear)  
{ 
  var m = (strYear) ? strYear : new Date().getFullYear(); 
  if (m < 1000 || m > 9999) {alert("The Years should between 1000 and 9999!");return;} 
  var n = m - 50; 
  if (n < 1000) n = 1000; 
  if (n + 26 > 9999) n = 9974; 
  var s = "<select Author=meizz name=tmpSelectYear style='font-size: 12px' " 
     s += "onblur='document.getElementById(\"tmpSelectYearLayer\").style.visibility=\"hidden\"' " 
     s += "onchange='blur();" 
     s += "parent.meizzTheYear = this.value; parent.meizzSetDay(parent.meizzTheYear,parent.meizzTheMonth)'>\r\n"; 
  var selectInnerHTML = s; 
  for (var i = n; i < n + 100; i++) 
  { 
    if (i == m) 
       {selectInnerHTML += "<option Author=wayx value='" + i + "' selected style='overflow:scroll'>" + i + "</option>\r\n";} 
    else {selectInnerHTML += "<option Author=wayx value='" + i + "' style='overflow:scroll'>" + i + "</option>\r\n";} 
  } 
  selectInnerHTML += "</select>"; 
  odatelayer.getElementById("tmpSelectYearLayer").innerHTML = selectInnerHTML; 
  odatelayer.getElementById("tmpSelectYearLayer").style.visibility="visible"; 
  odatelayer.getElementsByName("tmpSelectYear")[0].focus(); 

} 

function tmpSelectMonthInnerHTML(strMonth)  
{ 
  var m = (strMonth) ? strMonth : new Date().getMonth() + 1; 
  var s = "<select Author=meizz name=tmpSelectMonth style='font-size: 12px' " 
     s += "onblur='document.getElementById(\"tmpSelectMonthLayer\").style.visibility=\"hidden\"' " 
     s += "onchange='blur();" 
     s += "parent.meizzTheMonth = this.value; parent.meizzSetDay(parent.meizzTheYear,parent.meizzTheMonth)'>\r\n"; 
  var selectInnerHTML = s; 
  for (var i = 1; i < 13; i++) 
  { 
    if (i == m) 
       {selectInnerHTML += "<option Author=wayx value='"+i+"' selected>"+getMonthName(i)+"</option>\r\n";} 
    else {selectInnerHTML += "<option Author=wayx value='"+i+"'>"+getMonthName(i)+"</option>\r\n";}
//       if (i == m) 
//       {selectInnerHTML += "<option Author=wayx value='"+i+"' selected>"+i+"</option>\r\n";} 
//    else {selectInnerHTML += "<option Author=wayx value='"+i+"'>"+i+"</option>\r\n";} 
  
  } 
  selectInnerHTML += "</select>"; 
  odatelayer.getElementById("tmpSelectMonthLayer").style.visibility="visible"; 
  odatelayer.getElementById("tmpSelectMonthLayer").innerHTML = selectInnerHTML; 
  odatelayer.getElementsByName("tmpSelectMonth")[0].focus(); 
} 

function getMonthName(MonthNum)
{
switch(MonthNum)
{
case 1:
return "Jan.";
case 2:
return "Feb.";
case 3:
return "Mar.";
case 4:
return "Apr.";
case 5:
return "May";
case 6:
return "Jun.";
case 7:
return "Jul.";
case 8:
return "Aug.";
case 9:
return "Sept.";
case 10:
return "Oct.";
case 11:
return "Nov.";
case 12:
return "Dec.";
default:
return MonthNum;
}
}

//function getMonthNum(MonthName)
//{
//if(MonthName.match(""))
//switch(MonthName)
//{
//case "Jan.":
//return 1;
//case "Feb.":
//return 2;
//case "Mar.":
//return 3;
//case "Apr.":
//return 4;
//case "May":
//return 5;
//case "Jun.":
//return 6;
//case "Jul.":
//return 7;
//case "Aug.":
//return 8;
//case "Sept.":
//return 9;
//case "Oct.":
//return 10;
//case "Nov.":
//return 11;
//case "Dec.":
//return 12;
//default:
//return MonthName;
//}
//}


function meizzWriteHead(yy,mm)
  { 
       odatelayer.getElementById("meizzMonthHead").innerHTML = mm + "&lt;Month&gt;"; 
     odatelayer.getElementById("meizzYearHead").innerHTML  = yy + "&lt;Year&gt;"; 
  } 


function closeLayer()
  { 
    document.getElementsByName("meizzDateLayer")[0].style.visibility="hidden"; 
  } 

function IsPinYear(year)
  { 
    if (0==year%4&&((year%100!=0)||(year%400==0))) return true;else return false; 
  } 

function GetMonthCount(year,month)
  { 
    var c=MonHead[month-1];if((month==2)&&IsPinYear(year)) c++;return c; 
  } 
function GetDOW(day,month,year)
  { 
    var dt=new Date(year,month-1,day).getDay()/7; return dt; 
  } 

function meizzPrevY()
  { 
    if(meizzTheYear > 999 && meizzTheYear <10000){meizzTheYear--;} 
    else{alert("Years out(1000-9999)!");} 
    meizzSetDay(meizzTheYear,meizzTheMonth); 
  } 
function meizzNextY()
  { 
    if(meizzTheYear > 999 && meizzTheYear <10000){meizzTheYear++;} 
    else{alert("Years out(1000-9999)!");} 
    meizzSetDay(meizzTheYear,meizzTheMonth); 
  } 
function meizzToday()
  { 
        var today; 
    meizzTheYear = new Date().getFullYear(); 
    meizzTheMonth = new Date().getMonth()+1; 
    today=new Date().getDate(); 
    if(meizzTheMonth<=9){
     meizzTheMonth="0"+meizzTheMonth;
    }
    else if(today<=9){
     today="0"+today;
    
    }
    if(outObject){ 
                outObject.value= meizzTheMonth+ "/" + today + "/" + meizzTheYear; 
                outObject.fireEvent("onchange");
    } 
    closeLayer(); 
  } 
function meizzPrevM()
  { 
    if(meizzTheMonth>1){meizzTheMonth--}else{meizzTheYear--;meizzTheMonth=12;} 
    meizzSetDay(meizzTheYear,meizzTheMonth); 
  } 
function meizzNextM()
  { 
    if(meizzTheMonth==12){meizzTheYear++;meizzTheMonth=1}else{meizzTheMonth++} 
    meizzSetDay(meizzTheYear,meizzTheMonth); 
  } 

function meizzDayClickHandler()
{
    meizzDayClick(this.innerHTML.match(/\\d+/).toString(),-1)
}
function meizzSetDay(yy,mm)
{ 
  meizzWriteHead(yy,mm); 
  meizzTheYear=yy; 
  meizzTheMonth=mm; 
  for (var i = 0; i < 39; i++){meizzWDay[i]=""};
  var day1 = 1,day2=1,firstday = new Date(yy,mm-1,1).getDay();
  for (i=0;i<firstday;i++)meizzWDay[i]=GetMonthCount(mm==1?yy-1:yy,mm==1?12:mm-1)-firstday+i+1
  for (i = firstday; day1 < GetMonthCount(yy,mm)+1; i++){meizzWDay[i]=day1;day1++;} 
  for (i=firstday+GetMonthCount(yy,mm);i<39;i++){meizzWDay[i]=day2;day2++} 
  for (i = 0; i < 39; i++) 
  { var da = odatelayer.getElementById("meizzDay"+i);
    if (meizzWDay[i]!="") 
      { 
                da.style.borderWidth="1px"; 
                da.style.borderStyle="solid"; 
                da.style.borderTopColor="#FFFFFF"; 
                da.style.borderRightColor="#DFE9F3"; 
                da.style.borderBottomColor="#DFE9F3"; 
                da.style.borderLeftColor="#FFFFFF"; 
                if(i<firstday)
                { 
                        da.innerHTML="<a href='javascript:;'><font color=gray>" + meizzWDay[i] + "</font></a>"; 
//                        da.attachEvent("onclick",function(){
//                                                        meizzDayClick(window.event.srcElement.innerHTML.match(/\\d+/).toString(),-1);
//                                                        }
                        da.onclick=Function("javascript:meizzDayClick(this.innerHTML.match(/\\d+/).toString(),-1);"); 
                        if(!outDate) 
                                da.style.backgroundColor = ((mm==1?yy-1:yy) == new Date().getFullYear() && 
                                        (mm==1?12:mm-1) == new Date().getMonth()+1 && meizzWDay[i] == new Date().getDate()) ? 
                                         "#FFD700":"#e0e0e0"; 
                        else 
                        { 
                                da.style.backgroundColor =((mm==1?yy-1:yy)==outDate.getFullYear() && (mm==1?12:mm-1)== outDate.getMonth() + 1 && 
                                meizzWDay[i]==outDate.getDate())? "#00ffff" : 
                                (((mm==1?yy-1:yy) == new Date().getFullYear() && (mm==1?12:mm-1) == new Date().getMonth()+1 && 
                                meizzWDay[i] == new Date().getDate()) ? "#FFD700":"#e0e0e0"); 
                                if((mm==1?yy-1:yy)==outDate.getFullYear() && (mm==1?12:mm-1)== outDate.getMonth() + 1 && 
                                meizzWDay[i]==outDate.getDate()) 
                                { 
                                        da.style.borderTopColor="#DFE9F3"; 
                                        da.style.borderRightColor="#FFFFFF"; 
                                        da.style.borderBottomColor="#FFFFFF"; 
                                        da.style.borderLeftColor="#DFE9F3"; 
                                } 
                        } 
                } 
                else if (i>=firstday+GetMonthCount(yy,mm))
                { 
                        da.innerHTML="<a href='javascript:;'><font color=gray>" + meizzWDay[i] + "</font></a>"; 
//                        da.attachEvent("onclick",function(){
//                                                    meizzDayClick(window.event.srcElement.innerHTML.match(/\\d+/).toString(),1);
//                                                    });
                        da.onclick=Function("meizzDayClick(this.innerHTML.match(/\\d+/).toString(),1)"); 
                        if(!outDate) 
                                da.style.backgroundColor = ((mm==12?yy+1:yy) == new Date().getFullYear() && 
                                        (mm==12?1:mm+1) == new Date().getMonth()+1 && meizzWDay[i] == new Date().getDate()) ? 
                                         "#FFD700":"#e0e0e0"; 
                        else 
                        { 
                                da.style.backgroundColor =((mm==12?yy+1:yy)==outDate.getFullYear() && (mm==12?1:mm+1)== outDate.getMonth() + 1 && 
                                meizzWDay[i]==outDate.getDate())? "#00ffff" : 
                                (((mm==12?yy+1:yy) == new Date().getFullYear() && (mm==12?1:mm+1) == new Date().getMonth()+1 && 
                                meizzWDay[i] == new Date().getDate()) ? "#FFD700":"#e0e0e0"); 
                                if((mm==12?yy+1:yy)==outDate.getFullYear() && (mm==12?1:mm+1)== outDate.getMonth() + 1 && 
                                meizzWDay[i]==outDate.getDate()) 
                                { 
                                        da.style.borderTopColor="#DFE9F3"; 
                                        da.style.borderRightColor="#FFFFFF"; 
                                        da.style.borderBottomColor="#FFFFFF"; 
                                        da.style.borderLeftColor="#DFE9F3"; 
                                } 
                        } 
                } 
                else
                { 
                        da.innerHTML="<a href='javascript:;'>" + meizzWDay[i] + "</a>"; 
//                        da.attachEvent("onclick",function(){
//                                                    meizzDayClick(this.innerHTML.match(/\\d+/).toString(),0);
//                                                    });
                        da.onclick=Function("meizzDayClick(this.innerHTML.match(/\\d+/).toString(),0)");
                        if(!outDate) 
                                da.style.backgroundColor = (yy == new Date().getFullYear() && mm == new Date().getMonth()+1 && meizzWDay[i] == new Date().getDate())? 
                                        "#FFD700":"#e0e0e0"; 
                        else 
                        { 
                                da.style.backgroundColor =(yy==outDate.getFullYear() && mm== outDate.getMonth() + 1 && meizzWDay[i]==outDate.getDate())? 
                                        "#00ffff":((yy == new Date().getFullYear() && mm == new Date().getMonth()+1 && meizzWDay[i] == new Date().getDate())? 
                                        "#FFD700":"#e0e0e0"); 
                                if(yy==outDate.getFullYear() && mm== outDate.getMonth() + 1 && meizzWDay[i]==outDate.getDate()) 
                                { 
                                        da.style.borderTopColor="#DFE9F3"; 
                                        da.style.borderRightColor="#FFFFFF"; 
                                        da.style.borderBottomColor="#FFFFFF"; 
                                        da.style.borderLeftColor="#DFE9F3"; 
                                } 
                        } 
                } 
        da.style.cursor="hand" 
      } 
    else{da.innerHTML="";da.style.backgroundColor="";da.style.cursor="default"} 
  } 
} 

function meizzDayClick(n,ex)
{ 
  var yy=meizzTheYear; 
  var mm = parseInt(meizzTheMonth)+ex;
        if(mm<1){ 
                yy--; 
                mm=12+mm; 
        } 
        else if(mm>12){ 
                yy++; 
                mm=mm-12; 
        } 
         
  if (mm < 10){mm = "0" + mm;} 
  if (outObject) 
  { 
    if (!n) {
      return;} 
    if ( n < 10){n = "0" + n;} 
    outObject.value= mm + "/" + n+ "/" + yy ; 
    outObject.fireEvent("onchange");
    closeLayer(); 
  } 
  else {closeLayer(); alert("Calendar error!");} 
} 