﻿if(!Array.prototype.push){Array.prototype.push=function(){for(var i=0;i<arguments.length;i++)this[this.length]=arguments[i];};};function name_values($a){var $b=new Array();var rc="\235";var $a=$a.replace(/\\\;/g,rc);var $z=new RegExp("[a-zA-Z0-9]+\=[\<\>\/:#a-zA-Z0-9\-\+\., \235]+","gi");var y=$a.match($z);for(i=0;i<y.length;i++){var s=y[i].split("=");s[1]=s[1].replace(rc,";");$b[i]="v_"+s[0];eval($b[i]+" = '"+s[1]+"'");};return $b;};function chkVar($d){if(eval($d)&&eval($d)!="")return true;else return false;};function chkArg($e){if($e=="undefined"||$e==null||$e=="")return false;else return true;};function arrayElt($f,$g){var j=0;for(j=0;j<$f.length;j++){if($f[j].toUpperCase()==$g.toUpperCase())return j;};return "-1";};function pad2($e){if(typeof $e=="number")return($e.toString().length<2)?"0"+$e:$e;else if(typeof $e=="string")return($e.length<2)?("0"+$e):(""+$e);else return($e.toString().length<2)?"0"+$e:$e;};var $h="";var $i="";function onClickFn($j){var re=/pday/;$h=$i;$h=$h.replace(re,"'"+$j+"'");eval($h);};function kdwn($k){if(event.keyCode==13)$k.onchange();else return false;};function Today(){var d=new Date();return((d.getMonth()+1)+"/"+d.getDate()+"/"+d.getFullYear());};function dateAdd($l,$m,$n){var d=new Date($l);var dv=d.valueOf();var $o;if($n=="+")$o=dv+($m*(1000*60*60*24));else $o=dv-($m*(1000*60*60*24));var nd=new Date($o);return((nd.getMonth()+1)+"/"+nd.getDate()+"/"+nd.getFullYear());};function IESplit(re,st){var $p;var $q=new Array();var $r;while((x=re.exec(st))!=null){$q.push(st.substring(0,st.indexOf(x[1])));$q.push(x[1]);st=st.substr(st.indexOf(x[1])+x[1].length);};return $q;};var v_CloseOnSelect,v_AppendOrReplace,v_AppendChar,v_ReturnData;var v_InlineX,v_InlineY,v_Title,v_CurrentDate,$s;var v_Resizable,v_Width,v_Height,v_SelectAfter,v_NSHierarchy;var v_SelectBefore,v_CallFunction,v_PopupX,v_PopupY,v_Holidays;var v_Nav,v_SmartNav,v_Fix,v_ShowFix,v_WeekStart,v_Weekends;var $t,v_ShortNames,v_AllowHolidays;var $u=new Array();var $v=new Date();var $w;var $x;var $y;var $z,$A;var cx,cy;var x,y;var $B,$Z;var $D,$E;$F=(navigator.appName.indexOf("Netscape")!=-1)?true:false;$G=(navigator.appName.indexOf("Microsoft")!=-1)?true:false;$H=(document.getElementById)?true:false;Calendar.Months=["January","February","March","April","May","June","July","August","September","October","November","December"];Calendar.SMonths=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];Calendar.DOW=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Calendar.EMonths=["January","February","March","April","May","June","July","August","September","October","November","December"];Calendar.EDOW=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];Calendar.DOMonth=[31,28,31,30,31,30,31,31,30,31,30,31];Calendar.lDOMonth=[31,29,31,30,31,30,31,31,30,31,30,31];Calendar.gInitText="Softricks.com Calendar";function Calendar($I,$J,$K,$L,$M,$N){if(($K==null)&&($L==null))return;if($J==null)this.gWinCal=$w;else this.gWinCal=$J;if($K==null){this.gMonthName=null;this.gMonth=null;this.gYearly=true;}else{this.gMonthName=Calendar.get_month($K);this.gMonth=new Number($K);this.gYearly=false;};if($N==null)this.gType="POPUP";else this.gType=$N;if(this.gType=="INLINE"){this.WHO="";this.INLINE="Calendar";this.codeINLINE="";}else this.WHO="window.opener.";this.gYear=$L;this.gFormat=$M;this.gReturnItem=$I;this.gTitle="Softricks.com Calendar";};Calendar.get_month=Calendar_get_month;Calendar.get_daysofmonth=Calendar_get_daysofmonth;Calendar.get_dow=Calendar_get_dow;Calendar.calc_month_year=Calendar_calc_month_year;Calendar.print=Calendar_print;Calendar.CreateCalendarLayer=Calendar_CreateCalendarLayer;Calendar.Close=Calendar_Close;Calendar.Lwwrite=Calendar_Lwwrite;Calendar.MoveTo=Calendar_MoveTo;Calendar.isWeekend=Calendar_isWeekend;Calendar.isHoliday=Calendar_isHoliday;Calendar.processDateData=Calendar_processDateData;Calendar.readDate=Calendar_readDate;function Calendar_get_month($O,$P){if(!$P||$P=="E")return Calendar.EMonths[$O];else return Calendar.Months[$O];};function Calendar_get_dow($Q){return Calendar.DOW[$Q];};function Calendar_get_daysofmonth($O,$L){if(($L%4)==0){if(($L%100)==0&&($L%400)!=0)return Calendar.DOMonth[$O];return Calendar.lDOMonth[$O];}else return Calendar.DOMonth[$O];};function Calendar_calc_month_year($R,$S,$T){var $U=new Array();if($T==-1){if($R==0){$U[0]=11;$U[1]=parseInt($S,10)-1;}else{$U[0]=parseInt($R,10)-1;$U[1]=parseInt($S,10);}}else if($T==1){if($R==11){$U[0]=0;$U[1]=parseInt($S,10)+1;}else{$U[0]=parseInt($R,10)+1;$U[1]=parseInt($S,10);}};return $U;};function Calendar_print(){$w.print();};function Calendar_isWeekend($j){var i;for(i=0;i<$u.length;i++){if(parseInt($j)==parseInt($u[i]))return true;};return false;};function Calendar_isHoliday($j){var i=arrayElt($t,$j);if(parseInt(i)>-1)return true;return false;};function Calendar_processDateData($V,$W){var m;var td=Today();var $X=new RegExp("(Today)(([\\+\\-])([0-9]+))?","i");if((m=$V.match($X))!=null){if(m[1].toUpperCase()=="TODAY"&&m[0].length>5)return dateAdd(td,m[4],m[3]);else if(m[1].toUpperCase()=="TODAY")return td;}else{return Calendar.readDate($V,$W);}};function Calendar_readDate($l,$Y){var re="";var $Z=new Array();$Z.push("Dummy");var $00="";var $01="";var $02="";for(i=0;i<12;i++){$02+=Calendar.Months[i]+((i<11)?"|":"");$01+=Calendar.SMonths[i]+((i<11)?"|":"");};for(i=0;i<7;i++)$00+=Calendar.DOW[i]+((i<7)?"|":"");var $03=IESplit(new RegExp("(DD|MM|MONTH|MON|YYYY|YY|DOW)"),$Y.toUpperCase());for(i=0;i<$03.length;i++){switch($03[i].toUpperCase()){case "DD":re+="(\\d{1,2})";$Z.push($03[i]);break;case "DOW":re+="("+$00+")";$Z.push($03[i]);break;case "MM":re+="(\\d{1,2})";$Z.push($03[i]);break;case "MON":re+="("+$01+")";$Z.push($03[i]);break;case "MONTH":re+="("+$02+")";$Z.push($03[i]);break;case "YY":re+="(\\d{1,2})";$Z.push($03[i]);break;case "YYYY":re+="(\\d{4})";$Z.push($03[i]);break;default:re+=$03[i];}};var $04,$05,$06;var $07=new RegExp(re,"i");if($07.test($l)){var ma=$l.match($07);for(i=0;i<ma.length;i++){switch($Z[i]){case "DD":$04=parseInt(ma[i],10);break;case "MM":$05=parseInt(ma[i],10);break;case "MON":$05=parseInt(arrayElt(Calendar.SMonths,ma[i]),10)+1;break;case "MONTH":$05=parseInt(arrayElt(Calendar.Months,ma[i]),10)+1;break;case "YY":$08=parseInt(ma[i],10);$06=(($08>50)?($08+1900):($08+2000));break;case "YYYY":$06=parseInt(ma[i],10);break;}}};if(!($04||$05||$06))return null;else return(new Date($05+"/"+$04+"/"+$06));};function Calendar_Close($09,$0a){if($09=="POPUP")$w.close();if($09=="INLINE")Calendar.Lwwrite(Calendar.gInitText,$0a);$w=null;};new Calendar();Calendar.prototype.getMonthlyCalendarCode=function(){var $0b="";var $0z="";var $0d="";$0b=$0b+"<TABLE WIDTH='"+(v_Width-30)+"' BORDER=1>";$0z=this.cal_header();$0d=this.cal_data();$0b=$0b+$0z+$0d;$0b=$0b+"</TABLE>";return $0b;};Calendar.prototype.onclickfn=function(){var $0e=this.WHO+((this.gType=="POPUP")?"document."+v_NSHierarchy:"window.document."+v_NSHierarchy)+this.gReturnItem+".value";var $0f=(this.returnMode=="Replace")?" = ":" += ";var $0g="apchar = ''"+((this.returnMode=="Replace")?";":" + ")+"(("+$0e+" == '') ? '' : '"+this.appendChar+"');\n"+$0e+$0f+"apchar + pday;\n";return $0g;};Calendar.prototype.showSmartNavBar=function(){var $0h="<table border=0 class='innerColor'><tr><td rowspan=2>";$0h+="<select name='selMonth' class='monthEntryStyle' onchange=\""+this.WHO+"Build("+"'"+this.gReturnItem+"', document.frmCal.selMonth.selectedIndex, '"+this.gYear+"', '"+this.gFormat+"', '"+this.gType+"');\">\n";for(i=0;i<12;i++){$0h+="<option value=\"" + i + "\" ";if(parseInt(this.gMonth)==i)$0h+="selected";$0h+=" CLASS='monthEntryStyle'>"+Calendar.Months[i]+"</option>\n";};$0h+="<\/select>\n</td><td rowspan=2>";$0h+="<input name=\"cy\" size=4 maxlength=4 value=\""+this.gYear+"\" onchange=\""+"javascript:"+this.WHO+"Build("+"'"+this.gReturnItem+"', '"+this.gMonth+"', document.frmCal.cy.value, '"+this.gFormat+"', '"+this.gType+"');\" "+"onkeydown=\"javascript:kdwn(this);\" "+"class='yearEntryStyle'>\n";$0h+="</td><td>"+"<A title='Năm Sau' HREF=\"javascript:void(0);\" onClick=\"document.frmCal.cy.value++;document.frmCal.cy.onchange();return false;\" "+"class='yearArrowStyle'>5</A><br><A title='Năm Trước' HREF=\"javascript:void(0);\" onClick=\"document.frmCal.cy.value--;document.frmCal.cy.onchange();return false;\" "+"class='yearArrowStyle'>6</A>"+"</td></tr></table>";this.wwrite($0h);};Calendar.prototype.show=function(){var $0b="";if(this.gType=="POPUP")this.gWinCal.document.open();this.wwrite("<html>");this.wwrite("<head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'><title>Bộ Web Lịch</title>");if(this.gType=="POPUP")this.wwrite("<script language='javascript'>"+"function onClickFn(pday) {\n"+this.onclickfn()+"}\n<\/script>");else $i=this.onclickfn();if(v_SmartNav=="Yes"&&this.gType=="POPUP")this.wwrite("<script language='javascript'>\n"+"function kdwn(pthis) {"+"if (event.keyCode == 13) pthis.onchange(); else return false;}\n"+"</script>");this.wwrite("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"Calendar.css\">");this.wwrite("</head>");this.wwrite("<body bgcolor='#c7b7b7' topmargin='0' leftmargin='0'"+"LANGUAGE=javascript onload=\"window.focus();\">");this.wwrite("<form name=\"frmCal\" onsubmit=\"return false;\">");this.wwrite("<TABLE WIDTH='"+(v_Width-30)+"' BORDER=0 CELLPADDING=0 CLASS='borderColor'><TR><TD>"+"<TABLE BORDER=0 WIDTH='100%' CELLPADDING=1 CLASS='innerColor'>"+"<TR><TD CLASS='titleStyle'>"+this.gTitle+"</TD><TD CLASS='titleStyle' ALIGN=RIGHT>"+"<A HREF='javascript:"+this.WHO+"Calendar.Close(\"" + this.gType + "\", \"" + this.INLINE + "\");' "+"CLASS='titleStyle'>"+"</A></TD></TR><TR>");this.wwrite("<TD CLASS='headerStyle'>"+this.gMonthName+" "+this.gYear+"</TD>");this.wwriteA("<TD CLASS='headerStyle' ALIGN=RIGHT>"+((v_ShowFix=="No")?"":("Fix"+"<INPUT TYPE=CHECKBOX NAME=fixCheck "+((v_Fix=="Yes")?"CHECKED ":"")+"onClick=\""+((this.gType=="POPUP")?"alert('Fixing Window')":"fixCal(this.checked);")+"\">"))+"</TD></TR><TR><TD COLSPAN=2>");if(v_SmartNav=="Yes")this.showSmartNavBar();var $0i=Calendar.calc_month_year(this.gMonth,this.gYear,-1);var $0j=$0i[0];var $0k=$0i[1];var $0l=Calendar.calc_month_year(this.gMonth,this.gYear,1);var $0m=$0l[0];var $0n=$0l[1];if(v_Nav=="Yes"){this.wwrite("<TABLE WIDTH='"+(v_Width-30)+"' BORDER=1 CELLSPACING=0 CELLPADDING=0 CLASS='navStyle'><TR><TD ALIGN=center>");this.wwrite("[<A HREF=\""+"javascript:"+this.WHO+"Build("+"'"+this.gReturnItem+"', '"+this.gMonth+"', '"+(parseInt(this.gYear,10)-1)+"', '"+this.gFormat+"', '"+this.gType+"'"+");\"><<<\/A>]</TD><TD ALIGN=center>");this.wwrite("[<A HREF=\""+"javascript:"+this.WHO+"Build("+"'"+this.gReturnItem+"', '"+$0j+"', '"+$0k+"', '"+this.gFormat+"', '"+this.gType+"'"+");\"><<\/A>]</TD><TD ALIGN=center>");this.wwrite("[<A HREF=\"javascript:window.print();\">"+((v_ShortNames=="Yes")?"P":"Print")+"</A>]</TD><TD ALIGN=center>");this.wwrite("[<A HREF=\""+"javascript:"+this.WHO+"Build("+"'"+this.gReturnItem+"', '"+$v.getMonth()+"', '"+$v.getFullYear()+"', '"+this.gFormat+"', '"+this.gType+"'"+");\">"+((v_ShortNames=="Yes")?"*":"Today")+"<\/A>]</TD><TD ALIGN=center>");this.wwrite("[<A HREF=\""+"javascript:"+this.WHO+"Build("+"'"+this.gReturnItem+"', '"+$0m+"', '"+$0n+"', '"+this.gFormat+"', '"+this.gType+"'"+");\">><\/A>]</TD><TD ALIGN=center>");this.wwrite("[<A HREF=\""+"javascript:"+this.WHO+"Build("+"'"+this.gReturnItem+"', '"+this.gMonth+"', '"+(parseInt(this.gYear,10)+1)+"', '"+this.gFormat+"', '"+this.gType+"'"+");\">>><\/A>]</TD></TR></TABLE>");}$0b=this.getMonthlyCalendarCode();this.wwrite($0b);this.wwrite("</TD></TR></TABLE></TD></TR></TABLE>");this.wwrite("</form>");this.wwrite("</body></html>");if(this.gType=="POPUP")this.gWinCal.document.close();if(this.gType=="INLINE")Calendar.Lwwrite(this.codeINLINE,this.INLINE);};Calendar.prototype.cal_header=function(){var $0b="";var i=0,j=0;$0b=$0b+"<TR>";for(i=v_WeekStart,j=0;j<7;i++,j++,i=i%7)$0b=$0b+"<TD WIDTH='"+((i==6)?16:14)+"%' CLASS='weekdayHeaderStyle'>"+((v_ShortNames=="Yes")?Calendar.DOW[i].substring(0,1):Calendar.DOW[i].substring(0,3))+"</TD>";$0b=$0b+"</TR>";return $0b;};Calendar.prototype.cal_data=function(){var $0o=new Date();$0o.setDate(1);$0o.setMonth(this.gMonth);$0o.setFullYear(this.gYear);var $0p=$0o.getDay();var $0q=1;var $0r=Calendar.get_daysofmonth(this.gMonth,this.gYear);var $0s=0,j=0;var $0b="";if(this.closeable){$0t=((this.gType=="POPUP")?"window.close();":"");$0u="Calendar.Close(\"" + this.gType + "\", \"" + this.INLINE + "\"); ";}else{$0t="";$0u="void(0);' ";}var $0e=this.WHO+((this.gType=="POPUP")?"document.":"window.document.")+this.gReturnItem+".value";$0b=$0b+"<TR>";for(j=v_WeekStart,i=0;j!=$0p;j++,i++,j=j%7){$0b=$0b+"<TD WIDTH='14%' "+this.applySpecialStyle(0,j,"9999")+">&nbsp;</TD>";}for(j=$0p;i<7;j++,i++,j=j%7){$0b=this.createDates($0b,$0o,$0q,j);$0q=$0q+1;}$0b=$0b+"</TR>";for(k=2;k<7;k++){$0b=$0b+"<TR>";for(j=v_WeekStart,i=0;i<7;j++,i++,j=j%7){$0b=this.createDates($0b,$0o,$0q,j);$0q=$0q+1;if($0q>$0r){$0s=1;break;}}if(i==6)$0b=$0b+"</TR>";if($0s==1)break;}for(m=1;m<(7-i);m++){j=(j+1)%7;if(this.gYearly)$0b=$0b+"<TD WIDTH='14%'"+this.applySpecialStyle(0,j,"9999",1)+">&nbsp;</TD>";else $0b=$0b+"<TD WIDTH='14%' "+this.applySpecialStyle(0,j,"9999",1)+">"+m+"</TD>";}return $0b;};Calendar.prototype.createDates=function($0v,$0w,$0x,pj){var $0y="";var $0z="";var $0A="";$0w.setDate($0x);$0A=String(pad2(this.gMonth+1))+String(pad2($0x));if((this.gAllowWeekends=="Yes"&&Calendar.isWeekend(pj))||($0w<v_SelectAfter||$0w>v_SelectBefore)||(this.gAllowHolidays=="No"&&Calendar.isHoliday($0A))){$0y="";$0z="";}else{$0y="<A HREF='javascript:"+((this.CallFunction!="")?(this.WHO+this.CallFunction+"();"):"")+$0u+"' "+"onClick=\"onClickFn('"+((this.returnData=="Date")?this.format_data($0x):this.format_dow($0x))+"');"+((this.CallFunction!="")?(this.WHO+this.CallFunction+"();"):"")+$0t+"return true;"+"\" "+(Calendar.isHoliday($0A)?"CLASS='holidayLinkStyle'":"CLASS='linkStyle'")+">";$0z="<\/A>";}$0v=$0v+"<TD WIDTH='14%' "+this.applySpecialStyle($0x,pj,$0A)+">"+$0y+$0x+$0z+"</TD>";return $0v;};Calendar.prototype.applySpecialStyle=function($0B,$0Z,$0D,$0E){var $0F;if(this.gCurrentDate!="NONE")$0F=this.gCurrentDate;else $0F=$v;var $0G=$0F.getDate();var $0H=$0F.getMonth();var $0I=$0F.getFullYear();if($0D!="9999"&&Calendar.isHoliday($0D))return("CLASS='holidayStyle'");if(parseInt($0B)==$0G&&parseInt(this.gMonth)==$0H&&parseInt(this.gYear)==$0I)return "CLASS='todayStyle'";if(Calendar.isWeekend($0Z))return($0E==1?"CLASS='dimWeekendStyle'":"CLASS='weekendStyle'");if($0E==1)return "CLASS='dimStyle'";else return "CLASS='normalStyle'";};Calendar.prototype.format_data=function($0J){var $0K=this.gFormat;var $0L=1+this.gMonth;$0L=($0L.toString().length<2)?"0"+$0L:$0L;var $0M=Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();var $0N=Calendar.get_month(this.gMonth).toUpperCase();var $0O=new String(this.gYear);var $0P=new String(this.gYear.substr(2,2));var $0Q=($0J.toString().length<2)?"0"+$0J:$0J;var $0R=Calendar.get_dow(new Date($0L+"/"+$0Q+"/"+$0O).getDay());if((new RegExp("YYYY","ig")).test($0K))$0K=$0K.replace(/YYYY/ig,$0O);else if((new RegExp("YY","ig")).test($0K))$0K=$0K.replace(/YY/ig,$0P);if((new RegExp("DD","ig")).test($0K))$0K=$0K.replace(/DD/ig,$0Q);if((new RegExp("MM","ig")).test($0K))$0K=$0K.replace(/MM/ig,$0L);if((new RegExp("MONTH","ig")).test($0K))$0K=$0K.replace(/MONTH/ig,$0N);else if((new RegExp("MON","ig")).test($0K))$0K=$0K.replace(/MON/ig,$0M);if((new RegExp("DOW","ig")).test($0K))$0K=$0K.replace(/DOW/ig,$0R);return $0K;};Calendar.prototype.format_dow=function($0J){var $0K;var $0L=1+this.gMonth;$0L=($0L.toString().length<2)?"0"+$0L:$0L;var $0M=Calendar.get_month(this.gMonth).substr(0,3).toUpperCase();var $0N=Calendar.get_month(this.gMonth).toUpperCase();var $0O=new String(this.gYear);var $0Q=($0J.toString().length<2)?"0"+$0J:$0J;var $0o=new Date($0L+"\/"+$0Q+"\/"+$0O);$0K=Calendar.get_dow($0o.getDay());return $0K;};Calendar.prototype.wwrite=function($0S){if(this.gType=="POPUP")this.gWinCal.document.writeln($0S);else{this.codeINLINE+=$0S;}};Calendar.prototype.wwriteA=function($0S){if(this.gType=="POPUP")this.gWinCal.document.write($0S);else{this.codeINLINE+=$0S;}};function Calendar_CreateCalendarLayer($0T,$0U,pInitText){if(pInitText==null)pInitText=Calendar.gInitText;else Calendar.gInitText=pInitText;v_InlineX=$0T;v_InlineY=$0U;var Calendar_ID="Calendar";if($G)document.writeln("<DIV ID=\"" + Calendar_ID + "\" STYLE=\""+"position:absolute;zIndex:100;top:"+$0U+";left:"+$0T+";"+"\">" + pInitText + "<\/DIV>");else if($H)document.writeln("<DIV ID=\"" + Calendar_ID + "\" STYLE=\""+"position:absolute;zIndex:100;top:"+$0U+";left:"+$0T+";"+"\">" + pInitText + "<\/DIV>");else if($F)document.writeln("<DIV ID=\"" + Calendar_ID + "\" STYLE=\""+"position:absolute;zIndex:100;top:"+$0U+";left:"+$0T+";"+"\">" + pInitText + "<\/DIV>");}function Calendar_Lwwrite($0V,$0a){if($G){document.all[$0a].innerHTML=$0V;}else if($H){$0W=document.createRange();el=document.getElementById($0a);$0W.setStartBefore(el);$0X=$0W.createContextualFragment($0V);while(el.hasChildNodes())el.removeChild(el.lastChild);el.appendChild($0X);}else if($F){var $0Y=document.layers[$0a].document;$0Y.open();$0Y.write($0V);$0Y.close();}}function Calendar_MoveTo(pX,pY,$0a){if($G){document.all[$0a].style.top=pY;document.all[$0a].style.left=pX;}else if($H){document.getElementById($0a).style.top=pY;document.getElementById($0a).style.left=pX;}else if($F){document.layers[$0a].top=pY;document.layers[$0a].left=pX;}}$D=false;$E=false;function fixCal($0Z){if($0Z)initEvents(0);else initEvents(1);}function click(e){x=($G)?(event.x+document.body.scrollLeft):e.pageX;y=($G)?(event.y+document.body.scrollTop):e.pageY;cx=($G)?(x-parseInt($10.left)):(($H)?(x-parseInt($10.left)):(x-$x.x));cy=($G)?(y-parseInt($10.top)):(($H)?(y-parseInt($10.top)):(y-$x.y));$E=false;$D=true;}function unclick(e){$E=true;$D=false;}function handleMove(e){$z=($G)?(event.x+document.body.scrollLeft):e.pageX;$A=($G)?(event.y+document.body.scrollTop):e.pageY;if($D){window.status="DRAGGGGGG : X="+($z-cx)+", Y="+($A-cy);v_InlineX=$z-cx;v_InlineY=$A-cy;MoveLayer($z-cx,$A-cy,"myLayer");}else window.status="X="+$z+", Y="+$A;}function initEvents($11){if($11==1){if($F&&!$H){$x.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP|Event.MOUSEMOVE);}if($H&&$F){$x.addEventListener("mousemove",handleMove,true);$x.addEventListener("mousedown",click,true);$x.addEventListener("mouseup",unclick,true);}else{$x.onmousemove=handleMove;$x.onmousedown=click;$x.onmouseup=unclick;}}else{if($F&&!$H){$x.releaseEvents(Event.MOUSEDOWN|Event.MOUSEUP|Event.MOUSEMOVE);}if($H&&$F){$x.removeEventListener("mousemove",handleMove,true);$x.removeEventListener("mousedown",click,true);$x.removeEventListener("mouseup",unclick,true);}else{$x.onmousemove="";$x.onmousedown="";$x.onmouseup="";}}}function MoveLayer(pX,pY){$10.top=pY;$10.left=pX;}function drag_init($12){if($G){$10=document.all[$12].style;$x=document.all[$12];}else if($H){$10=document.getElementById($12).style;$x=document.getElementById($12);}else if($F){$10=document.layers[$12];$x=document.layers[$12];}if(v_ShowFix=="Yes"&&v_Fix=="Yes")initEvents(0);else initEvents(1);}function CalResize(){v_Height=$w.innerHeight;v_Width=$w.innerWidth;}function Build($I,$K,$L,$M,$N,$13,$14){if($14&&$14!=""){v_Resizable=undefined;v_SelectAfter=undefined;v_SelectBefore=undefined;v_NSHierarchy=undefined;v_CallFunction=undefined;v_Nav=undefined;v_ShowFix=undefined;v_SmartNav=undefined;v_Fix=undefined;v_WeekStart=undefined;v_Width=undefined;v_Height=undefined;v_ShortNames=undefined;v_Holidays=undefined;}if($L==""||($L!=""&&isNaN($L))){window.status="Invalid Year";return true;}else window.status="";if($13&&$13!=""){v_CurrentDate="";var $15=name_values($13);var $0e="document."+$I+".value";var $16=eval($0e);if($16!="")v_CurrentDate=$16;v_Weekends=chkVar("v_Weekends")?v_Weekends:"06";for(i=0;i<v_Weekends.length;i++)$u.push(parseInt(v_Weekends.charAt(i)));}else v_CurrentDate="";var $17;if(chkVar("v_CurrentDate")){if(v_CurrentDate.charAt(0)=='<'&&v_CurrentDate.charAt(v_CurrentDate.length-1)=='>'){var $18="document."+v_CurrentDate.substring(1,v_CurrentDate.length-1)+".value";v_CurrentDate=eval($18);}if(Calendar.processDateData(v_CurrentDate,$M)==null)$17=new Date();else $17=new Date(Calendar.processDateData(v_CurrentDate,$M));$K=$17.getMonth();$L=$17.getFullYear().toString();}else $17="NONE";v_Resizable=chkVar("v_Resizable")?v_Resizable:"No";v_SelectAfter=(typeof v_SelectAfter=="string")?new Date(Calendar.processDateData(v_SelectAfter,$M)):v_SelectAfter;v_SelectBefore=(typeof v_SelectBefore=="string")?new Date(Calendar.processDateData(v_SelectBefore,$M)):v_SelectBefore;v_NSHierarchy=$F?(chkVar("v_NSHierarchy")?(v_NSHierarchy+".document."):""):"";v_CallFunction=chkVar("v_CallFunction")?v_CallFunction:"";v_Nav=chkVar("v_Nav")?v_Nav:"Yes";v_SmartNav=chkVar("v_SmartNav")?v_SmartNav:"No";v_Fix=chkVar("v_Fix")?v_Fix:"Yes";v_ShowFix=chkVar("v_ShowFix")?v_ShowFix:"No";v_ShortNames=chkVar("v_ShortNames")?v_ShortNames:"No";v_WeekStart=chkVar("v_WeekStart")?parseInt(v_WeekStart):1;$t=chkVar("v_Holidays")?v_Holidays.split(","):"";var $19,$1a;v_Width=chkVar("v_Width")?v_Width:222;v_Height=chkVar("v_Height")?v_Height:222;if($N=="POPUP"){$1a=chkVar("v_Width")?v_Width:260;if($G)$19=chkVar("v_Height")?v_Height:250;else if($F)$19=chkVar("v_Height")?v_Height:250;if(v_SmartNav=="Yes")$19+=30;v_PopupX=chkVar("v_PopupX")?v_PopupX:-1;v_PopupY=chkVar("v_PopupY")?v_PopupY:-1;if(v_PopupX>=0&&v_PopupY>=0){if(!$w||$w.closed)$w=window.open("","Calendar","width="+$1a+",height="+$19+",status=no,dependent=yes,resizable="+v_Resizable+",screenX="+v_PopupX+",screenY="+v_PopupY+",left="+v_PopupX+",top="+v_PopupY);}else{if(!$w||$w.closed)$w=window.open("","Calendar","width="+$1a+",height="+$19+",status=no,dependent=yes,resizable="+v_Resizable);}$w.opener=self;var $J=$w;if($F&&!$H){$w.captureEvents(Event.RESIZE);}$w.onResize=CalResize;}$1b=new Calendar($I,$J,$K,$L,$M,$N);$1b.gCurrentDate=$17;$1b.gAllowWeekends=(chkVar("v_AllowWeekends")&&$s=="Yes")?"Yes":"No";$1b.gAllowHolidays=(chkVar("v_AllowHolidays")&&v_AllowHolidays=="No")?"No":"Yes";$1b.closeable=chkVar("v_CloseOnSelect")?((v_CloseOnSelect=="Yes")?true:false):true;$1b.returnMode=chkVar("v_AppendOrReplace")?v_AppendOrReplace:"Replace";$1b.returnData=chkVar("v_ReturnData")?v_ReturnData:"Date";$1b.appendChar=($1b.returnMode=="Append")?chkVar("v_AppendChar")?v_AppendChar:";":"";$1b.CallFunction=chkVar("v_CallFunction")?v_CallFunction:"";$1b.InlineX=chkVar("v_InlineX")?v_InlineX:100;$1b.InlineY=chkVar("v_InlineY")?v_InlineY:100;if($1b.gType=="INLINE"){Calendar.MoveTo($1b.InlineX,$1b.InlineY,$1b.INLINE);}$1b.gTitle=v_Title?v_Title:$1b.gMonthName+"/"+$1b.gYear;$1b.fontface="Arial";if($1b.gYearly)$1b.showY();else $1b.show();if($1b.gType=="INLINE"){drag_init($1b.INLINE);}}
function show_calendar(){$I=arguments[0];if(!chkArg(arguments[1]))$K=new String($v.getMonth());else $K=(typeof(arguments[1])=="number")?arguments[1].toString():((arguments[1]=="")?new String($v.getMonth()):arguments[1]);if(!chkArg(arguments[2]))$L=new String($v.getFullYear().toString());else $L=(typeof(arguments[2])=="number")?arguments[2].toString():arguments[2];if(!chkArg(arguments[3]))$M="DD/MM/YYYY";else $M=(typeof(arguments[3])=="string")?arguments[3]:"MM/DD/YYYY";if(!chkArg(arguments[4]))$N="POPUP";else $N=(typeof(arguments[4])=="string"&&(arguments[4]=="POPUP"||arguments[4]=="INLINE"))?arguments[4]:"POPUP";
if(!chkArg(arguments[5]))$13="CloseOnSelect=Yes;AppendOrReplace=Replace;AppendChar=';';ReturnData=Date;Title=Calendar;AllowWeekends=Yes;Nav=No;SmartNav=Yes;PopupX=200;PopupY=100;ShowFix=No;Holidays=0902,0430,0501;AllowHolidays=Yes;Resizable=No";else $13=typeof(arguments[5])=="string"?arguments[5]:"CloseOnSelect=Yes;AppendOrReplace=Replace;AppendChar=';';ReturnData=Date;Title=Calendar;AllowWeekends=Yes;Resizable=No";Build($I,$K,$L,$M,$N,$13,1);}Calendar.prototype.showY=function(){var $0b="";var i;var vr,vc,vx,vy;var $1z=285;var $1d=200;var $1e=10;var $1f;if($G)$1f=75;else if($H)$1f=25;else if($F)$1f=25;this.gWinCal.document.open();this.wwrite("<html>");this.wwrite("<head><title>Calendar</title>");this.wwrite("<style type='text/css'>\n<!--");for(i=0;i<12;i++){vc=i%3;if(i>=0&&i<=2)vr=0;if(i>=3&&i<=5)vr=1;if(i>=6&&i<=8)vr=2;if(i>=9&&i<=11)vr=3;vx=parseInt($1z*vc)+$1e;vy=parseInt($1d*vr)+$1f;this.wwrite(".lclass"+i+" {position:absolute;top:"+vy+";left:"+vx+";}");}this.wwrite("-->\n</style>");if(this.gType=="POPUP")this.wwrite("<script language='javascript'>"+"function onClickFn(pday) {\n"+this.onclickfn()+"};\n<\/script>");else $i=this.onclickfn();this.wwrite("</head>");this.wwrite("<FONT FACE='"+this.fontface+"' SIZE=2><B>");this.wwrite("Year : "+this.gYear);this.wwrite("</B><BR>");var $0k=parseInt(this.gYear,10)-1;var $0n=parseInt(this.gYear,10)+1;this.wwrite("<TABLE WIDTH='"+(v_Width-30)+"' BORDER=1 CELLSPACING=0 CELLPADDING=0 BGCOLOR='#e0e0e0'><TR><TD ALIGN=center>");this.wwrite("[<A HREF=\""+"javascript:window.opener.Build("+"'"+this.gReturnItem+"', null, '"+$0k+"', '"+this.gFormat+"'"+");"+"\" alt='Prev Year'><<<\/A>]</TD><TD ALIGN=center>");this.wwrite("[<A HREF=\"javascript:window.print();\">Print</A>]</TD><TD ALIGN=center>");this.wwrite("[<A HREF=\""+"javascript:window.opener.Build("+"'"+this.gReturnItem+"', null, '"+$0n+"', '"+this.gFormat+"'"+");"+"\">>><\/A>]</TD></TR></TABLE><BR>");var j;for(i=11;i>=0;i--){if($G)this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");else if($H)this.wwrite("<DIV ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");else if($F)this.wwrite("<LAYER ID=\"layer" + i + "\" CLASS=\"lclass" + i + "\">");this.gMonth=i;this.gMonthName=Calendar.get_month(this.gMonth);$0b=this.getMonthlyCalendarCode();this.wwrite(this.gMonthName+"/"+this.gYear+"<BR>");this.wwrite($0b);if($G)this.wwrite("</DIV>");else if($H)this.wwrite("</DIV>");else if($F)this.wwrite("</LAYER>");}this.wwrite("</font><BR></body></html>");this.gWinCal.document.close();};function show_yearly_calendar($I,$L,$M){if($L==null||$L=="")$L=new String($v.getFullYear().toString());else $L=(typeof($L)=="number")?$L.toString():$L;if($M==null||$M=="")$M="MM/DD/YYYY";var $w=window.open("","Calendar","scrollbars=yes");$w.opener=self;Build($I,null,$L,$M,"POPUP");}


