﻿var redirectVars=[["brandCode","6c"],["regionCode","1"],["localeCode","en"],["city",""],["state",""],["country",""],["hotelCode",""],["rateCode",""],["hide_rateCode",""],["IATAno",""],["hide_IATAno",""],["corpNum",""],["hide_corpNum",""],["GPC",""],["hide_GPC",""],["searchHI",""],["searchEX",""],["searchCP",""],["searchIC",""],["searchSB",""],["searchCW",""],["searchIN",""]];for(var i=0;i<redirectVars.length;i++){var evalString="var "+redirectVars[i][0]+'="'+redirectVars[i][1]+'";';eval(evalString)}var st=["","AB","AK","AL","AR","AZ","BC","CA","CO","CT","DC","DE","FL","GA","HI","IA","ID","IL","IN","KS","KY","LA","MA","MB","MD","ME","MI","MN","MO","MS","MT","NB","NC","ND","NE","NF","NH","NJ","NM","NS","NV","NY","OH","OK","ON","OR","PA","PE","QC","RI","SC","SD","SK","TN","TX","UT","VA","VT","WA","WI","WV","WY"];var b=[["0001","United States"],["0140","Andorra"],["0150","Argentina"],["0100","Aruba"],["0160","Australia"],["0165","Austria"],["0180","Bahamas"],["0181","Bahrain"],["0190","Belgium"],["0185","Bosnia & Herzegovina"],["0220","Brazil"],["0255","Cambodia"],["0260","Canada"],["0107","Caribbean"],["0268","Cayman Islands"],["0275","Chile"],["0280","China-Peoples Rep"],["0285","Colombia"],["0295","Costa Rica"],["0305","Cyprus"],["0311","Czech Republic"],["0320","Dominican Republic"],["0325","Ecuador"],["0922","Egypt"],["0330","El Salvador"],["0926","England"],["0327","Eritrea"],["0338","Fiji Islands"],["0340","Finland"],["0350","France"],["0367","French Polynesia"],["0388","Gabon"],["0394","Germany"],["0400","Greece"],["0066","Guam"],["0415","Guatemala"],["0430","Honduras"],["0435","Hong Kong"],["0445","Hungary"],["0455","India"],["0458","Indonesia"],["0470","Ireland"],["0475","Israel"],["0480","Italy"],["0487","Jamaica"],["0490","Japan"],["0500","Jordan"],["0525","Kazakhstan"],["0505","Kenya"],["0515","Korea-Republic Of"],["0520","Kuwait"],["0540","Lebanon"],["0532","Lithuania"],["0573","Macau"],["0574","Macedonia"],["0580","Malaysia"],["0590","Malta"],["0595","Mexico"],["0610","Morocco"],["0615","Mozambique"],["0625","Nepal"],["0630","Netherlands"],["0660","New Zealand"],["0665","Nicaragua"],["0616","Oman"],["0700","Pakistan"],["0710","Panama"],["0712","Papua New Guinea"],["0720","Peru"],["0725","Philippines"],["0730","Poland"],["0735","Portugal"],["0072","Puerto Rico"],["0747","Qatar"],["0755","Romania"],["0825","Russia"],["0785","Saudi Arabia"],["0760","Scotland"],["0795","Singapore"],["0796","Slovakia"],["0801","South Africa"],["0830","Spain"],["0272","Sri Lanka"],["0855","Switzerland"],["0281","Taiwan"],["0865","Tanzania"],["0875","Thailand"],["0887","Trinidad & Tobago"],["0890","Tunisia"],["0905","Turkey"],["0888","United Arab Emirates"],["0925","United Kingdom"],["0930","Uruguay"],["0001","United States"],["0078","US Virgin Islands"],["0931","Uzbekistan"],["0548","Vanuatu"],["0940","Venezuela"],["0950","Wales"],["0968","Yemen"],["0990","Zambia"],["0818","Zimbabwe"]];function writeSelectNumbers(a){for(var c=1;c<a;c++){document.write("<option value="+c+">"+c+"</option>")}document.close()}function monthName(a){switch(a){case 0:return"January";case 1:return"Feburary";case 2:return"March";case 3:return"April";case 4:return"May";case 5:return"June";case 6:return"July";case 7:return"August";case 8:return"September";case 9:return"October";case 10:return"November";case 11:return"December"}document.close()}function writeMonthYear(){var a=new Date();var d=a.getMonth();var f=a.getFullYear();var e;for(var c=d;c<d+12;c++){e=f;if(c>11){e=e+1}document.write("<option value="+(c%12)+e+">"+monthName(c%12)+" "+e+"</option>")}document.close()}function writeStateId(c){for(var a=0;a<61;a++){if((st[a]==c)&&(c!="")){document.write('<option selected value="'+st[a]+'">'+st[a]+"</option>")}else{document.write('<option value="'+st[a]+'">'+st[a]+"</option>")}}document.close()}function writeCountryId(a){document.write("<select name=countryId class=f12quickres>");for(var c=0;c<102;c++){if((b[c][0]==a)||(b[c][1]==a)){document.write("<option selected value="+b[c][0]+">"+b[c][1]+"</option>")}else{document.write("<option value="+b[c][0]+">"+b[c][1]+"</option>")}}document.write("</select>");document.close()}function populateCheckOut(){var a=document.searchForm;if((a.checkOutMonthYear.selectedIndex==0)||(a.checkOutMonthYear.selectedIndex<a.checkInMonthYear.selectedIndex)||((a.checkOutMonthYear.selectedIndex==a.checkInMonthYear.selectedIndex)&&(a.checkOutDate.selectedIndex<=a.checkInDate.selectedIndex))){if(a.checkInMonthYear.selectedIndex!=0){if(a.checkInDate.selectedIndex>29){a.checkOutDate.selectedIndex=1;a.checkOutMonthYear.selectedIndex=a.checkInMonthYear.selectedIndex+1}else{if((a.checkInDate.selectedIndex==29)&&((a.checkInMonthYear.selectedIndex==4)||(a.checkInMonthYear.selectedIndex==6)||(a.checkInMonthYear.selectedIndex==9)||(a.checkInMonthYear.selectedIndex==11))){a.checkOutDate.selectedIndex=1;a.checkOutMonthYear.selectedIndex=a.checkInMonthYear.selectedIndex+1}else{a.checkOutDate.selectedIndex=a.checkInDate.selectedIndex+1;a.checkOutMonthYear.selectedIndex=a.checkInMonthYear.selectedIndex}}}}}var calendarSwap=0;function setDateFields(){var c=new Date();if(calendarSwap==0){var a=document.searchForm.firstinput.value;dateArray=a.split("/");document.searchForm.checkInDate.selectedIndex=dateArray[1];index=0;for(i=2003;i<=dateArray[2];i++){index=index+1}if((dateArray[0]-1)<c.getMonth()){document.searchForm.checkInMonthYear.selectedIndex=(12-c.getMonth()+1)+(dateArray[0]-1)}else{document.searchForm.checkInMonthYear.selectedIndex=(dateArray[0])-(c.getMonth())}if(document.searchForm.checkOutMonthYear.selectedIndex==0){populateCheckOut()}}else{var a=document.searchForm.firstinput.value;dateArray=a.split("/");document.searchForm.checkOutDate.selectedIndex=dateArray[1];index=0;for(i=2003;i<=dateArray[2];i++){index=index+1}if((dateArray[0]-1)<c.getMonth()){document.searchForm.checkOutMonthYear.selectedIndex=(12-c.getMonth()+1)+(dateArray[0]-1)}else{document.searchForm.checkOutMonthYear.selectedIndex=(dateArray[0])-(c.getMonth())}}}function showSearch(a,e,c,d){if(a!=null){city=a}if(e!=null){state=e}if(c!=null){country=c}if(d!=null){IATAno=d}document.write('<script language="JavaScript" type="text/javascript" src="http://images.ichotelsgroup.com/jsquickres/JSSearchCalendar.js"></script>');document.write('<link rel="stylesheet" type="text/css" href="http://images1.ichotelsgroup.com/css/6c_styles.css">');document.write('<form action="http://www.ichotelsgroup.com/redirect" name="searchForm" target="_blank" method="POST" onSubmit=" dcsMultiTrack(\'DCSext.ecommercedelivery\', \'Customers Delivered to Booking Engine\', \'DCSext.ecommercecompleted\', \'Customers Delivered to Booking Engine\');si_trackingDRSB();">');document.write("<INPUT type=hidden name=firstinput>");document.write('<INPUT type="hidden" name="path" value="asearch">');document.write('<INPUT type="hidden" name="regionCode" value="'+regionCode+'">');document.write('<INPUT type="hidden" name="localeCode" value="'+localeCode+'">');document.write('<INPUT type="hidden" name="brandCode" value="'+brandCode+'">');if((searchHI!="")||(searchEX!="")||(searchCP!="")||(searchIC!="")||(searchSB!="")||(searchCW!="")||(searchIN!="")){if(searchHI!=""){document.write('<INPUT type="hidden" name="searchGroupCodes" value="HI">')}if(searchEX!=""){document.write('<INPUT type="hidden" name="searchGroupCodes" value="EX">')}if(searchCP!=""){document.write('<INPUT type="hidden" name="searchGroupCodes" value="CP">')}if(searchIC!=""){document.write('<INPUT type="hidden" name="searchGroupCodes" value="IC">')}if(searchSB!=""){document.write('<INPUT type="hidden" name="searchGroupCodes" value="SB">')}if(searchCW!=""){document.write('<INPUT type="hidden" name="searchGroupCodes" value="CW">')}if(searchIN!=""){document.write('<INPUT type="hidden" name="searchGroupCodes" value="IN">')}}else{document.write('<INPUT type="hidden" name="searchGroupCodes" value="all">')}document.write('<table width="258" border="0" cellpadding="0" cellspacing="0">');document.write("    <tr>");if(hotelCode==""){document.write('         <td><a href="http://www.ichotelsgroup.com/h/d/6c/1/en/hotelsearch"><img  src="http://images1.ichotelsgroup.com/cq/etc/media_library/common/1/en/qres.Par.0001.Image.gif" height="28" width="258" border="0"></a></td>')}else{document.write('         <td width="252" height="28" class="qresHeader" nowrap>&nbsp;&nbsp;&nbsp;RESERVE THIS HOTEL</td>')}document.write("    </tr>");document.write("    <tr>");document.write('         <td colspan="1"><img  src="http://images1.ichotelsgroup.com/cq/etc/media_library/common.Par.0001.Image.gif" height="1" width="258"></td>');document.write("    </tr>");document.write("</table>");document.write('<table width="258" border="0" cellspacing="0" cellpadding="0" class=qresHome>');document.write("    <tr>");document.write('    <td height=1 bgcolor="ffffff"></td>');document.write("    </tr>");document.write("    <tr>");document.write("    <td>");document.write('    <table width="100%" border="0" cellspacing="3" cellpadding="0">');document.write("    <tr>");document.write("    <td>");document.write('    <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHome>');document.write("    ");if(hotelCode==""){document.write("    <tr> ");document.write("     <td> ");document.write('        <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHome>');document.write("          <tr class=qresHome> ");document.write('            <td colspan="2" >');document.write('              <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHome>');document.write("                 <tr class=qresHome> ");document.write('                  <td align="left">City:</td>');document.write('                  <td align="right">State/Prov. (US/Canada)</td>');document.write("                 </tr>");document.write("              </table>");document.write("            </td>");document.write("          </tr>");document.write("          <tr> ");document.write('           <td width="50%">');document.write('              <input type="text" name="city" width="115" size="18" maxlength="35" class="f12quickres" value="'+city+'">');document.write("            </td>");document.write('            <td width="50%" align="left">&nbsp;&nbsp;');document.write('              <select name=stateId class="f12quickres">');writeStateId(state);document.write("        </select>");document.write("            </td>");document.write("          </tr>");document.write("          <tr>");document.write('            <td width="50%">Country:</td>');document.write('            <td width="50%"></td>');document.write("          </tr>");document.write("          <tr>");document.write('            <td width="50%">');writeCountryId(country);document.write("            </td>");document.write('            <td width="50%"></td>');document.write("          </tr>");document.write("        </table>");document.write("      </td>");document.write("    </tr>");document.write("    <tr> ");document.write("      <td>&nbsp;</td>");document.write("    </tr>")}else{city=null;state=null;country=null;document.write('<INPUT type="hidden" name="hotelCode" value="'+hotelCode+'">')}document.write("    <tr>");document.write("    <td>");document.write('    <table width="100%" border="0" cellspacing="2" cellpadding="0" bgcolor="#000000">');document.write("    <tr>");document.write("    <td class=qresHomeOption>");document.write('    <table width="100%" border="0" cellspacing="3" cellpadding="0" class=qresHomeOption>');document.write("    <tr class=qresHomeOption>");document.write("    <td>");document.write('    <table width="100%" border="0" cellspacing="0" cellpadding="0">');document.write("");document.write("    <tr> ");document.write("      <td>");document.write('        <table width="100%" border="0" cellspacing="0" cellpadding="0">');document.write("          <tr>");document.write("           <td>");document.write('             <table width="100%" border="0" cellspacing="0" cellpadding="0">');document.write("               <tr>");document.write('                 <td class="qresHomeOptionBold">Optional Travel Information</td>');document.write("               </tr>");document.write("               <tr>");document.write('                 <td class="f11">Check-In Date:</td>');document.write("               </tr>");document.write("               <tr>");document.write("                 <td>");document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');document.write("                    <tr> ");document.write('                       <td class="qresHomeOption" width="12%"> ');document.write('                         <select name="checkInDate" class="f11" onchange=\'javascript:populateCheckOut()\'>');document.write('                                  <option value="-1" ></option>');writeSelectNumbers(32);document.write("                               </select>");document.write("                        </td>");document.write('                        <td class="qresHomeOption" width="44%"> ');document.write('                          <select name="checkInMonthYear" class="f11" onchange=\'javascript:populateCheckOut()\'>');document.write('                                  <option value="-1" ></option>');writeMonthYear();document.write("                               </select>");document.write("                        </td>");document.write('                        <td class="qresHomeOption" valign="bottom" align="right" width="40%">');document.write('                                  <a onclick="javascript:calendarSwap=0; javascript:showCal(\'Calendar1\')" href="#"><img  src="http://images1.ichotelsgroup.com/cq/etc/media_library/common/1/en/calendar.Par.0002.Image.gif" alt="Calendar" name="Calendar"  align="top" border="0"></a>');document.write("                             </td>");document.write('                        <td class="qresHomeOption" valign="bottom" align="left" width="4%">');document.write("                             </td>");document.write("                      </tr>");document.write("                    </table>");document.write("                  </td>");document.write("                </tr>");document.write("                <tr>");document.write('                  <td class="f11">Check-Out Date:</td>');document.write("                </tr>");document.write("                <tr>");document.write("                  <td>");document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHomeOption>');document.write("                      <tr> ");document.write('                        <td width="12%"> ');document.write('                          <select name="checkOutDate" class="f11" onchange=\'javascript:populateCheckOut()\'>');document.write('                                   <option value="-1" ></option>');writeSelectNumbers(32);document.write("                               </select>");document.write("                        </td>");document.write('                        <td width="44%"> ');document.write('                          <select name="checkOutMonthYear" class="f11" onchange=\'javascript:populateCheckOut()\'>');document.write('                             <option value="-1" ></option>');writeMonthYear();document.write("                               </select>");document.write("                        </td>");document.write('                        <td class="qresHomeOption" valign="bottom" align="right" width="40%">');document.write('                                  <a href="javascript:calendarSwap=1; javascript:showCal(\'Calendar1\')"><img  src="http://images1.ichotelsgroup.com/cq/etc/media_library/common/1/en/calendar.Par.0002.Image.gif" alt="Calendar" name="Calendar" align="top" border="0"></a>');document.write("                             </td>");document.write('                        <td class="qresHomeOption" valign="bottom" align="left" width="4%">');document.write("                             </td>");document.write("                      </tr>");document.write("                    </table>");document.write("                  </td>");document.write("                </tr>");document.write("              </table>");document.write("            </td>");document.write(" </tr><tr>");document.write("            <td>");document.write('              <table width="100%" border="0" cellspacing="0" cellpadding="0" >');document.write("                <tr> ");document.write('                  <td height="8"></td>');document.write("                </tr>");document.write("                <tr> ");document.write("                  <td> ");document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');document.write('                      <tr class="f11"> ');document.write("                        <td>Adult(s):</td>");document.write("                        <td>&nbsp;</td>");document.write("                        <td>Child(ren)</td>");document.write("                        <td>&nbsp;</td>");document.write("                        <td>Room(s):</td>");document.write("                      </tr>");document.write("                      <tr> ");document.write("                        <td> ");document.write('                          <select name="numberOfAdults" class="f11">');writeSelectNumbers(21);document.write("                               </select>");document.write("                        </td>");document.write("                        <td>&nbsp;</td>");document.write("                       <td> ");document.write('                          <select name= "numberOfChildren" class="f11">');document.write("                                  <option value=0>0</option>");writeSelectNumbers(21);document.write("                               </select>");document.write("                        </td>");document.write("                        <td>&nbsp;</td>");document.write("                        <td> ");document.write('                          <select name="numberOfRooms" class="f11">');writeSelectNumbers(10);document.write("                               </select>");document.write("                        </td>");document.write("                      </tr>");document.write("                    </table>");document.write("                  </td>");document.write("                </tr>");document.write("                <tr> ");document.write('                  <td height="9"></td>');document.write("                </tr>");if(hide_rateCode==""){if(rateCode==""){document.write("                <tr> ");document.write("                  <td>");document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');document.write("                      <tr>");document.write('                        <td class="f11">Rate Preference:</td>');document.write("                        <td>&nbsp;</td>");document.write("                      </tr>");document.write("                      <tr>");document.write("                        <td>");document.write('                         <select name="rateTypeCodes" class="f11">');document.write('                                  <option value="6CBARC">&#34;Best Available.** &#34;');document.write('                                  <OPTION VALUE="IDAAA" >AAA-CAA*</OPTION><BR><OPTION VALUE="IDARP" >AARP*</OPTION><BR><OPTION VALUE="IMCGV" >Canadian Govt*</OPTION><BR><OPTION VALUE="IDADC" >German Automobile Club*</OPTION><BR><OPTION VALUE="IMGOV" >Gov\'t-Military*</OPTION><BR><OPTION VALUE="IVANI" >Reward Nights*</OPTION><BR><OPTION VALUE="IMSTI" >State-Gov\'t Rate*</OPTION><BR>');document.write("                               </select>");document.write("                        </td>");document.write("                        <td>&nbsp;</td>");document.write("                      </tr>");document.write("                    </table>");document.write("                  </td>");document.write("                </tr>")}else{document.write('<INPUT type="hidden" name="rateTypeCodes" value="'+rateCode+'">')}}else{if(rateCode==""){rateCode="6CBARC"}document.write('<INPUT type="hidden" name="rateTypeCodes" value="'+rateCode+'">')}if(hotelCode!=""){document.write("                <tr> ");document.write('                  <td height="9"></td>');document.write("                </tr>");document.write("                <tr> ");document.write("                  <td>");document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');document.write("                      <tr>");if(hide_corpNum==""){document.write('                        <td class="f11">Corporate ID:</td>')}if(hide_IATAno==""){document.write('                        <td class="f11">IATA #:</td>')}document.write("                      </tr>");document.write("                      <tr>");if(hide_corpNum==""){document.write('                        <td class="f12quickres">');if(corpNum!=""){document.write("                                  "+corpNum);document.write('<INPUT type="hidden" name="corpNum" value="'+corpNum+'">')}else{document.write('                                  <input type="text" name="corpNum" width="115" size="16" maxlength="35" class="f12quickres" value="'+corpNum+'">')}document.write("                        </td>")}else{document.write('<td><INPUT type="hidden" name="corpNum" value="'+corpNum+'"></td>')}if(hide_IATAno==""){document.write('                        <td class="f12quickres">');if(IATAno!=""){document.write("                                  "+IATAno);document.write('<INPUT type="hidden" name="_IATAno" value="'+IATAno+'">')}else{document.write('                                   <input type="text" name="_IATAno" width="115" size="16" maxlength="35" class="f12quickres" value="'+IATAno+'">')}document.write("                        </td>")}else{document.write('<td><INPUT type="hidden" name="_IATAno" value="'+IATAno+'"></td>')}document.write("                      </tr>");document.write("                    </table>");document.write("                  </td>");document.write("                </tr>");document.write("                <tr> ");document.write('                  <td height="9"></td>');document.write("                </tr>");if(hide_GPC==""){document.write("                <tr> ");document.write("                  <td>");document.write('                    <table width="100%" border="0" cellspacing="0" cellpadding="0">');document.write("                      <tr>");document.write('                        <td class="f11">Group Booking Code:</td>');document.write('                        <td class="f11">&nbsp;</td>');document.write("                      </tr>");document.write("                      <tr>");document.write('                        <td class="f12quickres">');if(GPC!=""){document.write("                                  "+GPC);document.write('<INPUT type="hidden" name="GPC" value="'+GPC+'">')}else{document.write('                                   <input type="text" name="GPC" width="115" size="16" maxlength="35" class="f12quickres" value="'+GPC+'">')}document.write("                        </td>");document.write("                        <td>&nbsp;</td>");document.write("                      </tr>");document.write("                    </table>");document.write("                  </td>");document.write("                </tr>")}else{document.write('<INPUT type="hidden" name="GPC" value="'+GPC+'">')}}else{if(IATAno!=""){document.write('<td><INPUT type="hidden" name="_IATAno" value="'+IATAno+'"></td>')}if(corpNum!=""){document.write('<INPUT type="hidden" name="corpNum" value="'+corpNum+'">')}if(GPC!=""){document.write('<INPUT type="hidden" name="GPC" value="'+GPC+'">')}}document.write("              </table>");document.write("            </td>");document.write("          </tr>");document.write("        </table>");document.write("      </td>");document.write("    </tr>");document.write("    </table>");document.write("    </td></tr></table></td></tr></table></td></tr>");document.write("    <tr> ");document.write("      <td>");document.write('        <table width="100%" border="0" cellspacing="0" cellpadding="0" class=qresHome>');document.write("          <tr>");document.write("            <td>&nbsp;</td>");document.write('            <td align=center><font size="2" face="Arial, Helvetica, sans-serif">');if(hotelCode==""){document.write('        <input type="image" src="http://images1.ichotelsgroup.com/cq/etc/media_library/cn/0/en/reservation/qres.Par.0002.Image.gif" name="smartQuickSearch">')}else{document.write('        <input type="image" src="http://images1.ichotelsgroup.com/cq/etc/media_library/cn/0/en/reservation/qres.Par.0004.Image.gif" name="hotelDetailAvailabilitySearch">')}document.write("        </font></td>");document.write("          </tr>");document.write("        </table>");document.write("      </td>");document.write("    </tr>");document.write("  </table>");document.write("  </td>");document.write("  </tr>");document.write(" </table>");document.write("  </td>");document.write("  </tr>");document.write("  </table>");document.write("  </form>");document.close()}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(a){return(a<0||a>9?"":"0")+a}function isDate(d,c){var a=getDateFromFormat(d,c);if(a==0){return false}return true}function compareDates(d,f,e,g){var a=getDateFromFormat(d,f);var c=getDateFromFormat(e,g);if(a==0||c==0){return -1}else{if(a>c){return 1}}return 0}function formatDate(g,n){n=n+"";var F="";var t=0;var e="";var J="";var N=g.getYear()+"";var A=g.getMonth()+1;var f=g.getDate();var l=g.getDay();var p=g.getHours();var z=g.getMinutes();var G=g.getSeconds();var P,O,D,C,j,q,o,B,I,a,r,p,x,v,w,u;var L=new Object();if(N.length<4){N=""+(N-0+1900)}L.y=""+N;L.yyyy=N;L.yy=N.substring(2,4);L.M=A;L.MM=LZ(A);L.MMM=MONTH_NAMES[A-1];L.NNN=MONTH_NAMES[A+11];L.d=f;L.dd=LZ(f);L.E=DAY_NAMES[l+7];L.EE=DAY_NAMES[l];L.H=p;L.HH=LZ(p);if(p==0){L.h=12}else{if(p>12){L.h=p-12}else{L.h=p}}L.hh=LZ(L.h);if(p>11){L.K=p-12}else{L.K=p}L.k=p+1;L.KK=LZ(L.K);L.kk=LZ(L.k);if(p>11){L.a="PM"}else{L.a="AM"}L.m=z;L.mm=LZ(z);L.s=G;L.ss=LZ(G);while(t<n.length){e=n.charAt(t);J="";while((n.charAt(t)==e)&&(t<n.length)){J+=n.charAt(t++)}if(L[J]!=null){F=F+L[J]}else{F=F+J}}return F}function _isInteger(d){var a="1234567890";for(var c=0;c<d.length;c++){if(a.indexOf(d.charAt(c))==-1){return false}}return true}function _getInt(e,a,d,c){for(var g=c;g>=d;g--){var f=e.substring(a,a+g);if(f.length<d){return null}if(_isInteger(f)){return f}}return null}function getDateFromFormat(u,g){u=u+"";g=g+"";var l=0;var k=0;var d="";var s="";var t="";var v,w;var q=new Date();var z=q.getYear();var n=q.getMonth()+1;var e=1;var h=q.getHours();var m=q.getMinutes();var r=q.getSeconds();var a="";while(k<g.length){d=g.charAt(k);s="";while((g.charAt(k)==d)&&(k<g.length)){s+=g.charAt(k++)}if(s=="yyyy"||s=="yy"||s=="y"){if(s=="yyyy"){v=4;w=4}if(s=="yy"){v=2;w=2}if(s=="y"){v=2;w=4}z=_getInt(u,l,v,w);if(z==null){return 0}l+=z.length;if(z.length==2){if(z>70){z=1900+(z-0)}else{z=2000+(z-0)}}}else{if(s=="MMM"||s=="NNN"){n=0;for(var j=0;j<MONTH_NAMES.length;j++){var o=MONTH_NAMES[j];if(u.substring(l,l+o.length).toLowerCase()==o.toLowerCase()){if(s=="MMM"||(s=="NNN"&&j>11)){n=j+1;if(n>12){n-=12}l+=o.length;break}}}if((n<1)||(n>12)){return 0}}else{if(s=="EE"||s=="E"){for(var j=0;j<DAY_NAMES.length;j++){var f=DAY_NAMES[j];if(u.substring(l,l+f.length).toLowerCase()==f.toLowerCase()){l+=f.length;break}}}else{if(s=="MM"||s=="M"){n=_getInt(u,l,s.length,2);if(n==null||(n<1)||(n>12)){return 0}l+=n.length}else{if(s=="dd"||s=="d"){e=_getInt(u,l,s.length,2);if(e==null||(e<1)||(e>31)){return 0}l+=e.length}else{if(s=="hh"||s=="h"){h=_getInt(u,l,s.length,2);if(h==null||(h<1)||(h>12)){return 0}l+=h.length}else{if(s=="HH"||s=="H"){h=_getInt(u,l,s.length,2);if(h==null||(h<0)||(h>23)){return 0}l+=h.length}else{if(s=="KK"||s=="K"){h=_getInt(u,l,s.length,2);if(h==null||(h<0)||(h>11)){return 0}l+=h.length}else{if(s=="kk"||s=="k"){h=_getInt(u,l,s.length,2);if(h==null||(h<1)||(h>24)){return 0}l+=h.length;h--}else{if(s=="mm"||s=="m"){m=_getInt(u,l,s.length,2);if(m==null||(m<0)||(m>59)){return 0}l+=m.length}else{if(s=="ss"||s=="s"){r=_getInt(u,l,s.length,2);if(r==null||(r<0)||(r>59)){return 0}l+=r.length}else{if(s=="a"){if(u.substring(l,l+2).toLowerCase()=="am"){a="AM"}else{if(u.substring(l,l+2).toLowerCase()=="pm"){a="PM"}else{return 0}}l+=2}else{if(u.substring(l,l+s.length)!=s){return 0}else{l+=s.length}}}}}}}}}}}}}}if(l!=u.length){return 0}if(n==2){if(((z%4==0)&&(z%100!=0))||(z%400==0)){if(e>29){return 0}}else{if(e>28){return 0}}}if((n==4)||(n==6)||(n==9)||(n==11)){if(e>30){return 0}}if(h<12&&a=="PM"){h=h-0+12}else{if(h>11&&a=="AM"){h-=12}}var p=new Date(z,n-1,e,h,m,r);return p.getTime()}function parseDate(k){var h=(arguments.length==2)?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");var a=new Array("generalFormats",h?"dateFirst":"monthFirst",h?"monthFirst":"dateFirst");var c=null;for(var e=0;e<a.length;e++){var g=window[a[e]];for(var f=0;f<g.length;f++){c=getDateFromFormat(k,g[f]);if(c!=0){return new Date(c)}}}return null}function getAnchorPosition(a){var k=false;var c=new Object();var l=0,m=0;var h=false,g=false,j=false;if(document.getElementById){h=true}else{if(document.all){g=true}else{if(document.layers){j=true}}}if(h&&document.all){l=AnchorPosition_getPageOffsetLeft(document.all[a]);m=AnchorPosition_getPageOffsetTop(document.all[a])}else{if(h){var f=document.getElementById(a);l=AnchorPosition_getPageOffsetLeft(f);m=AnchorPosition_getPageOffsetTop(f)}else{if(g){l=AnchorPosition_getPageOffsetLeft(document.all[a]);m=AnchorPosition_getPageOffsetTop(document.all[a])}else{if(j){var d=0;for(var e=0;e<document.anchors.length;e++){if(document.anchors[e].name==a){d=1;break}}if(d==0){c.x=0;c.y=0;return c}l=document.anchors[e].x;m=document.anchors[e].y}else{c.x=0;c.y=0;return c}}}}c.x=l;c.y=m;return c}function getAnchorWindowPosition(a){var c=getAnchorPosition(a);var d=0;var e=0;if(document.getElementById){if(isNaN(window.screenX)){d=c.x-document.body.scrollLeft+window.screenLeft;e=c.y-document.body.scrollTop+window.screenTop}else{d=c.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;e=c.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}else{if(document.all){d=c.x-document.body.scrollLeft+window.screenLeft;e=c.y-document.body.scrollTop+window.screenTop}else{if(document.layers){d=c.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;e=c.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}}}c.x=d;c.y=e;return c}function AnchorPosition_getPageOffsetLeft(a){var c=a.offsetLeft;while((a=a.offsetParent)!=null){c+=a.offsetLeft}return c}function AnchorPosition_getWindowOffsetLeft(a){return AnchorPosition_getPageOffsetLeft(a)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(a){var c=a.offsetTop;while((a=a.offsetParent)!=null){c+=a.offsetTop}return c}function AnchorPosition_getWindowOffsetTop(a){return AnchorPosition_getPageOffsetTop(a)-document.body.scrollTop}function PopupWindow_getXYPosition(a){var c;if(this.type=="WINDOW"){c=getAnchorWindowPosition(a)}else{c=getAnchorPosition(a)}this.x=c.x;this.y=c.y}function PopupWindow_setSize(c,a){this.width=c;this.height=a}function PopupWindow_populate(a){this.contents=a;this.populated=false}function PopupWindow_setUrl(a){this.url=a}function PopupWindow_setWindowProperties(a){this.windowProperties=a}function PopupWindow_refresh(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).innerHTML=this.contents}else{if(this.use_css){document.all[this.divName].innerHTML=this.contents}else{if(this.use_layers){var a=document.layers[this.divName];a.document.open();a.document.writeln(this.contents);a.document.close()}}}}else{if(this.popupWindow!=null&&!this.popupWindow.closed){if(this.url!=""){this.popupWindow.location.href=this.url}else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);this.popupWindow.document.close()}this.popupWindow.focus()}}}function PopupWindow_showPopup(a){this.getXYPosition(a);this.x+=this.offsetX;this.y+=this.offsetY;if(!this.populated&&(this.contents!="")){this.populated=true;this.refresh()}if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.left=this.x;document.getElementById(this.divName).style.top=this.y;document.getElementById(this.divName).style.visibility="visible"}else{if(this.use_css){document.all[this.divName].style.left=this.x;document.all[this.divName].style.top=this.y;document.all[this.divName].style.visibility="visible"}else{if(this.use_layers){document.layers[this.divName].left=this.x;document.layers[this.divName].top=this.y;document.layers[this.divName].visibility="visible"}}}}else{if(this.popupWindow==null||this.popupWindow.closed){if(this.x<0){this.x=0}if(this.y<0){this.y=0}if(screen&&screen.availHeight){if((this.y+this.height)>screen.availHeight){this.y=screen.availHeight-this.height}}if(screen&&screen.availWidth){if((this.x+this.width)>screen.availWidth){this.x=screen.availWidth-this.width}}this.popupWindow=window.open("about:blank","window_"+a,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"")}this.refresh()}}function PopupWindow_hidePopup(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.visibility="hidden"}else{if(this.use_css){document.all[this.divName].style.visibility="hidden"}else{if(this.use_layers){document.layers[this.divName].visibility="hidden"}}}}else{if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null}}}function PopupWindow_isClicked(d){if(this.divName!=null){if(this.use_layers){var a=d.pageX;var c=d.pageY;var f=document.layers[this.divName];if((a>f.left)&&(a<f.left+f.clip.width)&&(c>f.top)&&(c<f.top+f.clip.height)){return true}else{return false}}else{if(document.all){var f=window.event.srcElement;while(f.parentElement!=null){if(f.id==this.divName){return true}f=f.parentElement}return false}else{if(this.use_gebi){var f=d.originalTarget;while(f.parentNode!=null){if(f.id==this.divName){return true}f=f.parentNode}return false}}}return false}return false}function PopupWindow_hideIfNotClicked(a){if(this.autoHideEnabled&&!this.isClicked(a)){this.hidePopup()}}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(a){for(var c=0;c<popupWindowObjects.length;c++){if(popupWindowObjects[c]!=null){var d=popupWindowObjects[c];d.hideIfNotClicked(a)}}}function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP)}window.popupWindowOldEventListener=document.onmouseup;if(window.popupWindowOldEventListener!=null){document.onmouseup=new Function("window.popupWindowOldEventListener();PopupWindow_hidePopupWindows();")}else{document.onmouseup=PopupWindow_hidePopupWindows}}function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex=0}if(!window.popupWindowObjects){window.popupWindowObjects=new Array()}if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener()}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.divName=null;this.popupWindow=null;this.width=0;this.height=0;this.populated=false;this.visible=false;this.autoHideEnabled=false;this.contents="";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){this.type="DIV";this.divName=arguments[0]}else{this.type="WINDOW"}this.use_gebi=false;this.use_css=false;this.use_layers=false;if(document.getElementById){this.use_gebi=true}else{if(document.all){this.use_css=true}else{if(document.layers){this.use_layers=true}else{this.type="WINDOW"}}}this.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked}function CalendarPopup(){var a;if(arguments.length>0){a=new PopupWindow(arguments[0])}else{a=new PopupWindow();a.setSize(150,175)}a.offsetX=-152;a.offsetY=25;a.autoHide();a.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");a.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");a.dayHeaders=new Array("S","M","T","W","T","F","S");a.returnFunction="CalendarPopup_tmpReturnFunction";a.returnMonthFunction="CalendarPopup_tmpReturnMonthFunction";a.returnQuarterFunction="CalendarPopup_tmpReturnQuarterFunction";a.returnYearFunction="CalendarPopup_tmpReturnYearFunction";a.weekStartDay=0;a.isShowYearNavigation=false;a.displayType="date";a.disabledWeekDays=new Object();a.disabledDatesExpression="";a.yearSelectStartOffset=2;a.currentDate=null;a.todayText="Today";window.CalendarPopup_targetInput=null;window.CalendarPopup_dateFormat="mm/dd/yyyy";a.setReturnFunction=CalendarPopup_setReturnFunction;a.setReturnMonthFunction=CalendarPopup_setReturnMonthFunction;a.setReturnQuarterFunction=CalendarPopup_setReturnQuarterFunction;a.setReturnYearFunction=CalendarPopup_setReturnYearFunction;a.setMonthNames=CalendarPopup_setMonthNames;a.setMonthAbbreviations=CalendarPopup_setMonthAbbreviations;a.setDayHeaders=CalendarPopup_setDayHeaders;a.setWeekStartDay=CalendarPopup_setWeekStartDay;a.setDisplayType=CalendarPopup_setDisplayType;a.setDisabledWeekDays=CalendarPopup_setDisabledWeekDays;a.addDisabledDates=CalendarPopup_addDisabledDates;a.setYearSelectStartOffset=CalendarPopup_setYearSelectStartOffset;a.setTodayText=CalendarPopup_setTodayText;a.showYearNavigation=CalendarPopup_showYearNavigation;a.showCalendar=CalendarPopup_showCalendar;a.hideCalendar=CalendarPopup_hideCalendar;a.getStyles=CalendarPopup_getStyles;a.refreshCalendar=CalendarPopup_refreshCalendar;a.getCalendar=CalendarPopup_getCalendar;a.select=CalendarPopup_select;return a}function CalendarPopup_tmpReturnFunction(f,e,a){if(window.CalendarPopup_targetInput!=null){var c=new Date(f,e-1,a,0,0,0);window.CalendarPopup_targetInput.value=formatDate(c,window.CalendarPopup_dateFormat)}else{alert("Use setReturnFunction() to define which function will get the clicked results!")}}function CalendarPopup_tmpReturnMonthFunction(c,a){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+c+" , month="+a)}function CalendarPopup_tmpReturnQuarterFunction(c,a){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+c+" , quarter="+a)}function CalendarPopup_tmpReturnYearFunction(a){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+a)}function CalendarPopup_setReturnFunction(a){this.returnFunction=a}function CalendarPopup_setReturnMonthFunction(a){this.returnMonthFunction=a}function CalendarPopup_setReturnQuarterFunction(a){this.returnQuarterFunction=a}function CalendarPopup_setReturnYearFunction(a){this.returnYearFunction=a}function CalendarPopup_setMonthNames(){for(var a=0;a<arguments.length;a++){this.monthNames[a]=arguments[a]}}function CalendarPopup_setMonthAbbreviations(){for(var a=0;a<arguments.length;a++){this.monthAbbreviations[a]=arguments[a]}}function CalendarPopup_setDayHeaders(){for(var a=0;a<arguments.length;a++){this.dayHeaders[a]=arguments[a]}}function CalendarPopup_setWeekStartDay(a){this.weekStartDay=a}function CalendarPopup_showYearNavigation(){this.isShowYearNavigation=true}function CalendarPopup_setDisplayType(a){if(a!="date"&&a!="week-end"&&a!="month"&&a!="quarter"&&a!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false}this.displayType=a}function CalendarPopup_setYearSelectStartOffset(a){this.yearSelectStartOffset=a}function CalendarPopup_setDisabledWeekDays(){this.disabledWeekDays=new Object();for(var a=0;a<arguments.length;a++){this.disabledWeekDays[arguments[a]]=true}}function CalendarPopup_addDisabledDates(c,a){if(arguments.length==1){a=c}if(c==null&&a==null){return}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+="||"}if(c!=null){c=parseDate(c);c=""+c.getFullYear()+LZ(c.getMonth()+1)+LZ(c.getDate())}if(a!=null){a=parseDate(a);a=""+a.getFullYear()+LZ(a.getMonth()+1)+LZ(a.getDate())}if(c==null){this.disabledDatesExpression+="(ds<="+a+")"}else{if(a==null){this.disabledDatesExpression+="(ds>="+c+")"}else{this.disabledDatesExpression+="(ds>="+c+"&&ds<="+a+")"}}}function CalendarPopup_setTodayText(a){this.todayText=a}function CalendarPopup_hideCalendar(){if(arguments.length>0){window.popupWindowObjects[arguments[0]].hidePopup()}else{this.hidePopup()}}function CalendarPopup_refreshCalendar(c){var a=window.popupWindowObjects[c];if(arguments.length>1){a.populate(a.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]))}else{a.populate(a.getCalendar())}a.refresh()}function CalendarPopup_showCalendar(a){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date()}else{this.currentDate=new Date(parseDate(arguments[1]))}}this.populate(this.getCalendar());this.showPopup(a)}function CalendarPopup_select(c,d,a){var e=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}if(c.type!="text"&&c.type!="hidden"&&c.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CalendarPopup_targetInput=null;return}window.CalendarPopup_targetInput=c;this.currentDate=null;var f=0;if(e!=null){f=getDateFromFormat(e,a)}else{if(c.value!=""){f=getDateFromFormat(c.value,a)}}if(e!=null||c.value!=""){if(f==0){this.currentDate=null}else{this.currentDate=new Date(f)}}window.CalendarPopup_dateFormat=a;this.showCalendar(d)}function CalendarPopup_getStyles(){var a="";a+="<STYLE>\n";a+="TD.cal,TD.calday,TD.calmonth,TD.caltoday,A.textlink,.disabledtextlink{font-family:arial;font-size: 8pt;}\n";a+="TD.calday{border:solid thin #C0C0C0;border-width:0 0 1 0;}\n";a+="TD.calmonth{text-align:right;}\n";a+="TD.caltoday{text-align:right;color:white;background-color:#C0C0C0;border-width:1;border:solid thing #800000;}\n";a+="TD.textlink{border:solid thin #C0C0C0;border-width:1 0 0 0;}\n";a+="A.textlink{height:20px;color:black;}\n";a+=".disabledtextlink{height:20px;color:#808080;}\n";a+="A.cal{text-decoration:none;color:#000000;}\n";a+="A.calthismonth{text-decoration:none;color:#000000;}\n";a+="A.calothermonth{text-decoration:none;color:#808080;}\n";a+=".calnotclickable{color:#808080;}\n";a+=".disabled{color:#D0D0D0;text-decoration:line-through;}\n";a+="</STYLE>\n";return a}function CalendarPopup_getCalendar(){var now=new Date();if(this.type=="WINDOW"){var windowref="window.opener."}else{var windowref=""}var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+="<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n"}else{result+='<TABLE WIDTH=144 BORDER=1 BORDERWIDTH=1 BORDERCOLOR="#808080" CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}var t144="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null){this.currentDate=now}if(arguments.length>0){var month=arguments[0]}else{var month=this.currentDate.getMonth()+1}if(arguments.length>1){var year=arguments[1]}else{var year=this.currentDate.getFullYear()}var daysinmonth=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if(((year%4==0)&&(year%100!=0))||(year%400==0)){daysinmonth[2]=29}var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;if(weekday>=this.weekStartDay){offset=weekday-this.weekStartDay}else{offset=7-this.weekStartDay+weekday}if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--}display_date=daysinmonth[display_month]-offset+1}var next_month=month+1;var next_month_year=year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(this.type!="WINDOW"){result+=t144}result+='<TR BGCOLOR="#C0C0C0">\n';var refresh="javascript:"+windowref+"CalendarPopup_refreshCalendar";var td='<TD BGCOLOR="#C0C0C0" CLASS="cal" ALIGN=CENTER VALIGN=MIDDLE WIDTH=';if(this.isShowYearNavigation){result+=td+'10><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+last_month+","+last_month_year+');">&lt;</A></B></TD>';result+=td+"58>"+this.monthNames[month-1]+"</TD>";result+=td+'10><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');">&gt;</A></B></TD>';result+=td+"10>&nbsp;</TD>";result+=td+'10><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+month+","+(year-1)+');">&lt;</A></B></TD>';result+=td+"36>"+year+"</TD>";result+=td+'10><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+month+","+(year+1)+');">&gt;</A></B></TD>'}else{result+=td+'22><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+last_month+","+last_month_year+');">&lt;&lt;</A></B></TD>\n';result+=td+"100>"+this.monthNames[month-1]+" "+year+"</TD>\n";result+=td+'22><B><A CLASS="cal" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');">&gt;&gt;</A></B></TD>\n'}result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";result+="<TR>\n";var td='     <TD CLASS="calday" ALIGN=RIGHT WIDTH=14%>';for(var j=0;j<7;j++){result+=td+this.dayHeaders[(this.weekStartDay+j)%7]+"</TD>\n"}result+="</TR>\n";for(var row=1;row<=6;row++){result+="<TR>\n";for(var col=1;col<=7;col++){if(display_month==month){date_class="calthismonth"}else{date_class="calothermonth"}if((display_month==this.currentDate.getMonth()+1)&&(display_date==this.currentDate.getDate())&&(display_year==this.currentDate.getFullYear())){td_class="caltoday"}else{td_class="calmonth"}var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+this.disabledDatesExpression+")")}if(disabled||this.disabledWeekDays[col-1]){date_class=(disabled)?"disabled":"calnotclickable";result+='  <TD CLASS="'+td_class+'"><SPAN CLASS="'+date_class+'">'+display_date+"</SPAN></TD>\n"}else{var selected_date=display_date;var selected_month=display_month;var selected_year=display_year;if(this.displayType=="week-end"){var d=new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate()+(7-col));selected_year=d.getYear();if(selected_year<1000){selected_year+=1900}selected_month=d.getMonth()+1;selected_date=d.getDate()}result+='   <TD CLASS="'+td_class+'"><A HREF="javascript:'+windowref+this.returnFunction+"("+selected_year+","+selected_month+","+selected_date+");"+windowref+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+display_date+"</A></TD>\n"}display_date++;if(display_date>daysinmonth[display_month]){display_date=1;display_month++}if(display_month>12){display_month=1;display_year++}}result+="</TR>"}var current_weekday=now.getDay()-this.weekStartDay;if(current_weekday<0){current_weekday+=7}result+="<TR>\n";result+=' <TD COLSPAN=7 ALIGN=CENTER CLASS="textlink">\n';if(this.disabledWeekDays[current_weekday+1]){result+='      <SPAN CLASS="disabledtextlink">'+this.todayText+"</SPAN>\n"}else{result+='        <A CLASS="textlink" HREF="javascript:'+windowref+this.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+windowref+"CalendarPopup_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n"}result+="        <BR>\n";result+=" </TD></TR></TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){if(arguments.length>0){var year=arguments[0]}else{if(this.displayType=="year"){var year=now.getFullYear()-this.yearSelectStartOffset}else{var year=now.getFullYear()}}if(this.displayType!="year"&&this.isShowYearNavigation){result+=t144;result+='<TR BGCOLOR="#C0C0C0">\n';result+='   <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+"CalendarPopup_refreshCalendar("+this.index+","+(year-1)+');">&lt;&lt;</A></B></TD>\n';result+='     <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=100 ALIGN=CENTER>'+year+"</TD>\n";result+='     <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=22 ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+"CalendarPopup_refreshCalendar("+this.index+","+(year+1)+');">&gt;&gt;</A></B></TD>\n';result+="</TR></TABLE>\n"}}if(this.displayType=="month"){result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<4;i++){result+="<TR>";for(var j=0;j<3;j++){var monthindex=((i*3)+j);result+='<TD WIDTH=33% ALIGN=CENTER><A CLASS="textlink" HREF="javascript:'+windowref+this.returnMonthFunction+"("+year+","+(monthindex+1)+");"+windowref+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="quarter"){result+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<2;i++){result+="<TR>";for(var j=0;j<2;j++){var quarter=((i*2)+j+1);result+='<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="textlink" HREF="javascript:'+windowref+this.returnQuarterFunction+"("+year+","+quarter+");"+windowref+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+"</A><BR><BR></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="year"){var yearColumnSize=4;result+=t144;result+='<TR BGCOLOR="#C0C0C0">\n';result+='    <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=50% ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+"CalendarPopup_refreshCalendar("+this.index+","+(year-(yearColumnSize*2))+');">&lt;&lt;</A></B></TD>\n';result+='  <TD BGCOLOR="#C0C0C0" CLASS="cal" WIDTH=50% ALIGN=CENTER VALIGN=MIDDLE><B><A CLASS="cal" HREF="javascript:'+windowref+"CalendarPopup_refreshCalendar("+this.index+","+(year+(yearColumnSize*2))+');">&gt;&gt;</A></B></TD>\n';result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear=year+(j*yearColumnSize)+i;result+='<TD WIDTH=50% ALIGN=CENTER><A CLASS="textlink" HREF="javascript:'+windowref+this.returnYearFunction+"("+currentyear+");"+windowref+"CalendarPopup_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+currentyear+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.type=="WINDOW"){result+="</BODY></HTML>\n"}return result}document.write(CalendarPopup_getStyles());var cal=new CalendarPopup();cal.showYearNavigation();cal.setTodayText("");cal.setReturnFunction("setD");function setD(f,e,a){document.checkaressrch.year.value=f;document.checkaressrch.month.selectedIndex=--e;for(var c=0;c<document.checkaressrch.day.options.length;c++){if(document.checkaressrch.day.options[c].value==a){document.checkaressrch.day.selectedIndex=c}}}var cal2=new CalendarPopup();cal2.showYearNavigation();cal2.setTodayText("");cal2.setReturnFunction("setD2");function setD2(f,e,a){document.checkaressrch.dyear.value=f;document.checkaressrch.dmonth.selectedIndex=--e;for(var c=0;c<document.checkaressrch.dday.options.length;c++){if(document.checkaressrch.dday.options[c].value==a){document.checkaressrch.dday.selectedIndex=c}}}var rfpcal=new CalendarPopup();rfpcal.showYearNavigation();rfpcal.setTodayText("");rfpcal.setReturnFunction("setrfp");function setrfp(e,c,a){document.tg.value=c+"/"+a+"/"+e}function getDateString(h,f,c){var g=h.options[h.selectedIndex].value;var e=f.options[f.selectedIndex].value;var a=c.options[c.selectedIndex].value;if(g==""||e==""){return null}if(a==""){a=1}return str=g+"-"+e+"-"+a}var advancedDay=3;function isLeapYear(d){var a=false;var c=parseInt(d,10);if(c%4==0){a=true}return a}function getDaysInMonth(c,d){var a=31;if(c==1){if(isLeapYear(d)){a=29}else{a=28}}if(c==3||c==5||c==8||c==10){a=30}return a}function init(){var e=new Date();var g=e.getFullYear();var a=e.getFullYear();var f=e.getMonth();var c=e.getDate();var d=getDaysInMonth(f,g);if(c+advancedDay>d){c=((c+advancedDay)%d);if(f==11){f=0;g++}else{f++}}else{c=c+advancedDay}c--;g-=a;document.checkaressrch.month.selectedIndex=f;document.checkaressrch.day.selectedIndex=c;document.checkaressrch.year.selectedIndex=g;var d=getDaysInMonth(f,g);c+=1;if(c+1>d){c=(c%d);if(f==11){f=0;g++}else{f++}}else{c}document.checkaressrch.dmonth.selectedIndex=f;document.checkaressrch.dday.selectedIndex=c;document.checkaressrch.dyear.selectedIndex=g;return}(function(a){a.fn.jCarouselLite=function(f){f=a.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},f||{});return this.each(function(){var p=false,g=f.vertical?"top":"left",q=f.vertical?"height":"width";var j=a(this),t=a("ul",j),s=a("li",t),r=s.size(),w=f.visible;if(f.circular){t.prepend(s.slice(r-w-1+1).clone()).append(s.slice(0,w).clone());f.start+=w}var n=a("li",t),m=n.size(),h=f.start;j.css("visibility","visible");n.css({overflow:"hidden","float":f.vertical?"none":"left"});t.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});j.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var o=f.vertical?d(n):e(n);var u=o*m;var k=o*w;n.css({width:n.width(),height:n.height()});t.css(q,u+"px").css(g,-(h*o));j.css(q,k+"px");if(f.btnPrev){a(f.btnPrev).click(function(){return l(h-f.scroll)})}if(f.btnNext){a(f.btnNext).click(function(){return l(h+f.scroll)})}if(f.btnGo){a.each(f.btnGo,function(v,y){a(y).click(function(){return l(f.circular?f.visible+v:v)})})}if(f.mouseWheel&&j.mousewheel){j.mousewheel(function(y,v){return v>0?l(h-f.scroll):l(h+f.scroll)})}if(f.auto){setInterval(function(){l(h+f.scroll)},f.auto+f.speed)}function x(){return n.slice(h).slice(0,w)}function l(v){if(!p){if(f.beforeStart){f.beforeStart.call(this,x())}if(f.circular){if(v<=f.start-w-1){t.css(g,-((m-(w*2))*o)+"px");h=v==f.start-w-1?m-(w*2)-1:m-(w*2)-f.scroll}else{if(v>=m-w+1){t.css(g,-((w)*o)+"px");h=v==m-w+1?w+1:w+f.scroll}else{h=v}}}else{if(v<0||v>m-w){return}else{h=v}}p=true;t.animate(g=="left"?{left:-(h*o)}:{top:-(h*o)},f.speed,f.easing,function(){if(f.afterEnd){f.afterEnd.call(this,x())}p=false});if(!f.circular){a(f.btnPrev+","+f.btnNext).removeClass("disabled");a((h-f.scroll<0&&f.btnPrev)||(h+f.scroll>m-w&&f.btnNext)||[]).addClass("disabled")}}return false}})};function c(f,g){return parseInt(a.css(f[0],g))||0}function e(f){return f[0].offsetWidth+c(f,"marginLeft")+c(f,"marginRight")}function d(f){return f[0].offsetHeight+c(f,"marginTop")+c(f,"marginBottom")}})(jQuery);var IEPNGFix=window.IEPNGFix||{};IEPNGFix.tileBG=function(l,u,z){var k=this.data[l.uniqueID],n=Math.max(l.clientWidth,l.scrollWidth),m=Math.max(l.clientHeight,l.scrollHeight),c=l.currentStyle.backgroundPositionX,e=l.currentStyle.backgroundPositionY,a=l.currentStyle.backgroundRepeat;if(!k.tiles){k.tiles={elm:l,src:"",cache:[],img:new Image(),old:{}}}var D=k.tiles,v=D.img.width,t=D.img.height;if(u){if(!z&&u!=D.src){D.img.onload=function(){this.onload=null;IEPNGFix.tileBG(l,u,1)};return D.img.src=u}}else{if(D.src){z=1}v=t=0}D.src=u;if(!z&&n==D.old.w&&m==D.old.h&&c==D.old.x&&e==D.old.y&&a==D.old.r){return}var w={top:"0%",left:"0%",center:"50%",bottom:"100%",right:"100%"},E,G,r;E=w[c]||c;G=w[e]||e;if(r=E.match(/(\d+)%/)){E=Math.round((n-v)*(parseInt(r[1])/100))}if(r=G.match(/(\d+)%/)){G=Math.round((m-t)*(parseInt(r[1])/100))}E=parseInt(E);G=parseInt(G);var A={repeat:1,"repeat-x":1}[a],B={repeat:1,"repeat-y":1}[a];if(A){E%=v;if(E>0){E-=v}}if(B){G%=t;if(G>0){G-=t}}this.hook.enabled=0;if(!({relative:1,absolute:1}[l.currentStyle.position])){l.style.position="relative"}var h=0,F,p=A?n:E+0.1,H,q=B?m:G+0.1,j,C,o;if(v&&t){for(F=E;F<p;F+=v){for(H=G;H<q;H+=t){o=0;if(!D.cache[h]){D.cache[h]=document.createElement("div");o=1}var g=(F+v>n?n-F:v),f=(H+t>m?m-H:t);j=D.cache[h];C=j.style;C.behavior="none";C.left=F+"px";C.top=H+"px";C.width=g+"px";C.height=f+"px";C.clip="rect("+(H<0?0-H:0)+"px,"+g+"px,"+f+"px,"+(F<0?0-F:0)+"px)";C.display="block";if(o){C.position="absolute";C.zIndex=-999;if(l.firstChild){l.insertBefore(j,l.firstChild)}else{l.appendChild(j)}}this.fix(j,u,0);h++}}}while(h<D.cache.length){this.fix(D.cache[h],"",0);D.cache[h++].style.display="none"}this.hook.enabled=1;D.old={w:n,h:m,x:c,y:e,r:a}};IEPNGFix.update=function(){for(var a in IEPNGFix.data){var c=IEPNGFix.data[a].tiles;if(c&&c.elm&&c.src){IEPNGFix.tileBG(c.elm,c.src)}}};IEPNGFix.update.timer=0;if(window.attachEvent&&!window.opera){window.attachEvent("onresize",function(){clearTimeout(IEPNGFix.update.timer);IEPNGFix.update.timer=setTimeout(IEPNGFix.update,100)})}var animatedcollapse={divholders:{},divgroups:{},lastactiveingroup:{},preloadimages:[],show:function(a){if(typeof a=="object"){for(var c=0;c<a.length;c++){this.showhide(a[c],"show")}}else{this.showhide(a,"show")}},hide:function(a){if(typeof a=="object"){for(var c=0;c<a.length;c++){this.showhide(a[c],"hide")}}else{this.showhide(a,"hide")}},toggle:function(a){if(typeof a=="object"){a=a[0]}this.showhide(a,"toggle")},addDiv:function(c,a){this.divholders[c]=({id:c,$divref:null,attrs:a});this.divholders[c].getAttr=function(e){var d=new RegExp(e+"=([^,]+)","i");return(d.test(this.attrs)&&parseInt(RegExp.$1)!=0)?RegExp.$1:null};this.currentid=c;return this},showhide:function(d,c){var a=this.divholders[d].$divref;if(this.divholders[d]&&a.length==1){var e=this.divgroups[a.attr("groupname")];if(a.attr("groupname")&&e.count>1&&(c=="show"||c=="toggle"&&a.css("display")=="none")){if(e.lastactivedivid&&e.lastactivedivid!=d){this.slideengine(e.lastactivedivid,"hide")}this.slideengine(d,"show");e.lastactivedivid=d}else{this.slideengine(d,c)}}},slideengine:function(f,d){var a=this.divholders[f].$divref;var c=this.divholders[f].$togglerimage;if(this.divholders[f]&&a.length==1){var e={height:d};if(a.attr("fade")){e.opacity=d}a.animate(e,a.attr("speed")?parseInt(a.attr("speed")):500,function(){if(c){c.attr("src",(a.css("display")=="none")?c.data("srcs").closed:c.data("srcs").open)}if(animatedcollapse.ontoggle){try{animatedcollapse.ontoggle(jQuery,a.get(0),a.css("display"))}catch(g){alert('An error exists inside your "ontoggle" function:\n\n'+g+"\n\nAborting execution of function.")}}});return false}},generatemap:function(){var c={};for(var a=0;a<arguments.length;a++){if(arguments[a][1]!=null){c[arguments[a][0]]=arguments[a][1]}}return c},init:function(){var a=this;jQuery(document).ready(function(c){animatedcollapse.ontoggle=animatedcollapse.ontoggle||null;var g=animatedcollapse.urlparamselect();var f=a.getCookie("acopendivids");var e=a.getCookie("acgroupswithpersist");if(f!=null){f=(f=="nada")?[]:f.split(",")}e=(e==null||e=="nada")?[]:e.split(",");jQuery.each(a.divholders,function(){this.$divref=c("#"+this.id);if((this.getAttr("persist")||jQuery.inArray(this.getAttr("group"),e)!=-1)&&f!=null){var h=(jQuery.inArray(this.id,f)!=-1)?"block":"none"}else{var h=this.getAttr("hide")?"none":null}if(g[0]=="all"||jQuery.inArray(this.id,g)!=-1){h="block"}else{if(g[0]=="none"){h="none"}}this.$divref.css(a.generatemap(["height",this.getAttr("height")],["display",h]));this.$divref.attr(a.generatemap(["groupname",this.getAttr("group")],["fade",this.getAttr("fade")],["speed",this.getAttr("speed")]));if(this.getAttr("group")){var j=a.divgroups[this.getAttr("group")]||(a.divgroups[this.getAttr("group")]={});j.count=(j.count||0)+1;if(jQuery.inArray(this.id,g)!=-1){j.lastactivedivid=this.id;j.overridepersist=1}if(!j.lastactivedivid&&this.$divref.css("display")!="none"||h=="block"&&typeof j.overridepersist=="undefined"){j.lastactivedivid=this.id}this.$divref.css({display:"none"})}});jQuery.each(a.divgroups,function(){if(this.lastactivedivid&&g[0]!="none"){a.divholders[this.lastactivedivid].$divref.show()}});if(animatedcollapse.ontoggle){jQuery.each(a.divholders,function(){animatedcollapse.ontoggle(jQuery,this.$divref.get(0),this.$divref.css("display"))})}var d=c("a[rel]").filter('[rel^="collapse["], [rel^="expand["], [rel^="toggle["]');d.each(function(){this._divids=this.getAttribute("rel").replace(/(^\w+)|(\s+)/g,"").replace(/[\[\]']/g,"");if(this.getElementsByTagName("img").length==1&&a.divholders[this._divids]){animatedcollapse.preloadimage(this.getAttribute("data-openimage"),this.getAttribute("data-closedimage"));$togglerimage=c(this).find("img").eq(0).data("srcs",{open:this.getAttribute("data-openimage"),closed:this.getAttribute("data-closedimage")});a.divholders[this._divids].$togglerimage=c(this).find("img").eq(0);a.divholders[this._divids].$togglerimage.attr("src",(a.divholders[this._divids].$divref.css("display")=="none")?$togglerimage.data("srcs").closed:$togglerimage.data("srcs").open)}c(this).click(function(){var j=this.getAttribute("rel");var h=(this._divids=="")?[]:this._divids.split(",");if(h.length>0){animatedcollapse[/expand/i.test(j)?"show":/collapse/i.test(j)?"hide":"toggle"](h);return false}})});c(window).bind("unload",function(){a.uninit()})})},uninit:function(){var c="",a="";jQuery.each(this.divholders,function(){if(this.$divref.css("display")!="none"){c+=this.id+","}if(this.getAttr("group")&&this.getAttr("persist")){a+=this.getAttr("group")+","}});c=(c=="")?"nada":c.replace(/,$/,"");a=(a=="")?"nada":a.replace(/,$/,"");this.setCookie("acopendivids",c);this.setCookie("acgroupswithpersist",a)},getCookie:function(a){var c=new RegExp(a+"=[^;]*","i");if(document.cookie.match(c)){return document.cookie.match(c)[0].split("=")[1]}return null},setCookie:function(d,e,a){if(typeof a!="undefined"){var c=new Date();c.setDate(c.getDate()+a);document.cookie=d+"="+e+"; path=/; expires="+c.toGMTString()}else{document.cookie=d+"="+e+"; path=/"}},urlparamselect:function(){window.location.search.match(/expanddiv=([\w\-_,]+)/i);return(RegExp.$1!="")?RegExp.$1.split(","):[]},preloadimage:function(){var c=this.preloadimages;for(var a=0;a<arguments.length;a++){if(arguments[a]&&arguments[a].length>0){c[c.length]=new Image();c[c.length-1].src=arguments[a]}}}};var wmonths=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function do_opt(a,d,c){if(!d&&d!=0){d=1}if(a=="mo"){for(var e=0;e<wmonths.length;e++){document.write("<option value="+(e+1)+">"+(wmonths[e]))}}else{for(var e=d;e<=a;e++){sel=(c==e)?" selected ":"";document.write("<option value="+(e)+sel+">"+(e))}}}function findRes(e,a){var f,c,g;if(!a){a=document}if((f=e.indexOf("?"))>0&&parent.frames.length){a=parent.frames[e.substring(f+1)].document;e=e.substring(0,f)}if(!(g=a[e])&&a.all){g=a.all[e]}for(c=0;!g&&c<a.forms.length;c++){g=a.forms[c][e]}for(c=0;!g&&a.layers&&c<a.layers.length;c++){g=findRes(e,a.layers[c].document)}if(!g&&a.getElementById){g=a.getElementById(e)}return g}function resPop(){var c,e,f,d,a=resPop.arguments;for(c=0;c<(a.length-2);c+=3){if((d=findRes(a[c]))!=null){f=a[c+2];if(d.style){d=d.style;f=(f=="show")?"visible":(f=="hide")?"hidden":f}d.visibility=f}}}$(document).ready(function(){$("#navListHolder ul li:nth-child(6),#navListHolder ul li:nth-child(7),#navListHolder ul li:nth-child(8)").hover(function(){$("#month,#day,#year,#dmonth").addClass("hideMe")},function(){$("#month,#day,#year,#dmonth").removeClass("hideMe")})});
