function article(programName,width,height){var temp="menubar=no,toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width="+width+",height="+height;window.open(programName,"mywindow",temp)}function StoreValue(){var cntl1=document.getElementById(arguments[0]);cntl1.value=arguments[1];document.forms[0].submit()}function PostQuote(){if(arguments[1]==1)location.href="PostForum.aspx?T=Q&ID="+arguments[0]+"&FID="+arguments[2];else if(arguments[1]==2)if(arguments[2]==arguments[3])location.href="PostForum.aspx?T=E&ID="+arguments[0]+"&FID="+arguments[5];else{var cntl1=document.getElementById(arguments[4]),cntl2=document.getElementById("TopLink");cntl1.style.visibility="visible";location.href="#top"}}function ShowNode(){ var cntl1=document.getElementById("Node"+arguments[0]),cntl2=document.getElementById("NImg"+arguments[0]);if(cntl1.style.visibility=="hidden"){cntl1.style.visibility="visible";cntl1.style.display="block";cntl2.src="../images/forums/expand.gif";}else{cntl1.style.visibility="hidden";cntl1.style.display="none";cntl2.src="../images/forums/collapse.gif";}}function CheckEmptyOfPostForum(){if(CheckEmpty(arguments[0],"Subject"))if(CheckEmpty(arguments[1],"Description")){var cntl1=document.getElementById(arguments[1]),cntl2=document.getElementById(arguments[2]);cntl2.value=cntl1.value;return true}else return false;else return false}function CheckEmpty(){var cntl=document.getElementById(arguments[0]);if(cntl.value==""||CountWords(cntl.id)==0){alert("Please Enter "+arguments[1]);cntl.focus();return false}else return true}function Focus(){var cntl=document.getElementById(arguments[0]);cntl.focus()}function SignInValidate(){return true}function validate(){var cntl=document.getElementById(arguments[0]),cnt2=document.getElementById(arguments[1]),cnt3=document.getElementById(arguments[2]),cnt4=document.getElementById(arguments[3]),cnt5=document.getElementById(arguments[4]),cnt6=document.getElementById(arguments[5]),cnt7=document.getElementById(arguments[6]),cnt8=document.getElementById(arguments[7]);if(isEmpty(cntl.value,"Name")==true){cntl.focus();return false}if(cnt2.value=="--Select--"){alert("Please select the Education");cnt2.focus();return false}if(cnt3.value=="--Select--"){alert("Please select the Profession");cnt3.focus();return false}if(isEmpty(cnt4.value,"Flat No & Street")==true){cnt4.focus();return false}if(isEmpty(cnt5.value,"Area")==true){cnt5.focus();return false}if(cnt6.selectedIndex==0){alert("Please select the Country");cnt6.focus();return false}if(cnt7.selectedIndex==0){alert("Please select the State");cnt6.focus();return false}if(cnt8.selectedIndex==0){alert("Please select the City");cnt8.focus();return false}return true}function ApplicationTypevalidate(){var cntl=document.getElementById(arguments[0]),cnt2=document.getElementById(arguments[1]),cnt3=document.getElementById(arguments[2]);if(isEmpty(cntl.value,"Name")==true){cntl.focus();return false}if(isEmpty(cnt2.value,"ImageName")==true){cnt2.focus();return false}if(isEmpty(cnt3.value,"Extension")==true){cnt3.focus();return false}return true}function isEmpty(sVal,sTitle){if(sVal.length==0){alert("Please Enter "+sTitle);return true}}function isNumeric(sVal,sTitle){var iLen,ival,str;str=sVal;iLen=sVal.length;for(ival=0;ival<iLen;ival++)if(isNaN(str.substr(ival,1))==false){alert("Please enter the Characters in "+sTitle);return true}}function validEmail(strEmail){var i,iEmailLen,blnAt,blnDot,blnMail;blnAt=false;blnDot=false;blnMail=false;i=0;iEmailLen=strEmail.length;while(i<iEmailLen){if(strEmail.substr(i,1)=="@")blnAt=true;if(strEmail.substr(i,1)=="."){blnDot=true;break}else i=i+1}if(blnAt==true&&blnDot==true)blnMail=true;if(blnMail==false){alert("Please enter the valid Email ID");return false}}function PostBack(){if(event.keyCode==13){var cntl=document.getElementById(arguments[1]);__doPostBack(cntl.id,"")}}function SendID(){var cntl=document.getElementById(arguments[1]);cntl.value=arguments[0];document.forms[0].submit()}function ShowInner(){var cntl=document.getElementById(arguments[0]),cntl1=document.getElementById("B"+arguments[0]);if(cntl.style.visibility=="visible"){cntl.style.visibility="hidden";cntl.style.display="none";cntl1.value="+"}else if(cntl.style.visibility=="hidden"){cntl.style.visibility="visible";cntl.style.display="block";cntl1.value="-"}}function CheckValidDate(){var cntl1=document.getElementById(arguments[0]),cntl2=document.getElementById(arguments[1]);if(CheckEmpty(cntl1.id,"From Date"))if(CheckGreaterDate(cntl1.id,"From Date"))if(CheckEmpty(cntl2.id,"To Date"))if(CheckGreaterDate(cntl2.id,"To Date"))if(CheckGreaterWithBoth(cntl1.id,cntl2.id))return true;else return false;else return false;else return false;else return false;else return false}function CheckGreaterDate(){var cntl=document.getElementById(arguments[0]),dateValue=new Date(cntl.value),newDate=new Date,newDate1=new Date(newDate.getFullYear(),newDate.getMonth(),newDate.getDate());if(!ValidateDateFormat(arguments[0]))return false;else if(dateValue>=newDate1)return true;else{alert(arguments[1]+" should be equal or greater than today.");return false}}function SetDate(){var cntls=document.getElementsByTagName("input");for(var i=0;i<=cntls.length-1;i++)if(cntls[i].id.indexOf(arguments[1])>=0)popUpCalendar(arguments[0],cntls[i].id,"mmm/dd/yyyy")}function DeleteCategories(){var cntl=document.getElementById(arguments[0]);if(cntl.selectedIndex<0){alert("Please choose a news category");return false}else{cntl.remove(cntl.selectedIndex);return false}}function CheckFirstItem(){var cntl=document.getElementById(arguments[0]);if(cntl!=null)if(cntl.selectedIndex==0){alert("Please choose option from "+arguments[1]);cntl.focus();return false}else return true}function ControlFocus(){var cntl=document.getElementById(arguments[0]);cntl.focus()}function CheckGreaterWithBoth(){return true}function CountWords(control){var y=document.getElementById(control).value,r=0;a=y.replace("\n","");a=a.split(" ");for(z=0;z<a.length;z++)if(a[z].length>0)r++;return r}function DisableGroup(){var cntl1=document.getElementById(arguments[0]),cntl2=document.getElementById(arguments[1]);if(cntl1.checked==true)cntl2.disabled=true;else cntl2.disabled=false}function GetImage(){document.getElementById(arguments[0]).src="Image.aspx?ID="+arguments[0]}var fixedX=-1,fixedY=-1,startAt=1,showWeekNumber=1,showToday=1,imgDir="../Images/",gotoString="Go To Current Month",todayString="Today is",weekString="Wk",scrollLeftMessage="Click to scroll to previous month. Hold mouse button to scroll automatically.",scrollRightMessage="Click to scroll to next month. Hold mouse button to scroll automatically.",selectMonthMessage="Click to select a month.",selectYearMessage="Click to select a year.",selectDateMessage="Select [date] as date.",crossobj,crossMonthObj,crossYearObj,monthSelected,yearSelected,dateSelected,omonthSelected,oyearSelected,odateSelected,monthConstructed,yearConstructed,intervalID1,intervalID2,timeoutID1,timeoutID2,ctlToPlaceValue,ctlNow,dateFormat,nStartingYear,tempctlToPlaceValue,bPageLoaded=false,ie=document.all,dom=document.getElementById,ns4=document.layers,today=new Date,dateNow=today.getDate(),monthNow=today.getMonth(),yearNow=today.getYear(),imgsrc=new Array("drop1.gif","drop2.gif","left1.gif","left2.gif","right1.gif","right2.gif"),img=new Array,bShow=false;function hideElement(elmID,overDiv){if(ie)for(i=0;i<document.all.tags(elmID).length;i++){obj=document.all.tags(elmID)[i];if(!obj||!obj.offsetParent)continue;objLeft=obj.offsetLeft;objTop=obj.offsetTop;objParent=obj.offsetParent;while(objParent.tagName.toUpperCase()!="BODY"){objLeft+=objParent.offsetLeft;objTop+=objParent.offsetTop;objParent=objParent.offsetParent}objHeight=obj.offsetHeight;objWidth=obj.offsetWidth;if(overDiv.offsetLeft+overDiv.offsetWidth<=objLeft);else if(overDiv.offsetTop+overDiv.offsetHeight<=objTop);else if(overDiv.offsetTop>=objTop+objHeight);else if(overDiv.offsetLeft>=objLeft+objWidth);else obj.style.visibility="hidden"}}function showElement(elmID){if(ie)for(i=0;i<document.all.tags(elmID).length;i++){obj=document.all.tags(elmID)[i];if(!obj||!obj.offsetParent)continue;obj.style.visibility=""}}function HolidayRec(d,m,y,desc){this.d=d;this.m=m;this.y=y;this.desc=desc}var HolidaysCounter=0,Holidays=new Array;function addHoliday(d,m,y,desc){Holidays[HolidaysCounter++]=new HolidayRec(d,m,y,desc)}if(dom){for(i=0;i<imgsrc.length;i++){img[i]=new Image;img[i].src=imgDir+imgsrc[i]}document.write("<div onclick='bShow=true' id='calendar'\tstyle='display:none;z-index:+999;position:absolute;visibility:hidden;'><table\twidth="+(showWeekNumber==1?250:220)+" style='display:none;font-family:arial;font-size:11px;border-width:1;border-style:solid;border-color:#a0a0a0;font-family:arial; font-size:11px}' bgcolor='#ffffff'><tr bgcolor='#00678A'><td><table width='"+(showWeekNumber==1?248:218)+"'><tr><td style='padding:2px;font-family:arial; font-size:11px;'><font color='#ffffff'><B><span id='caption'></span></B></font></td><td align=right><a href='javascript:hideCalendar()'><IMG SRC='"+imgDir+"close.gif' WIDTH='15' HEIGHT='13' BORDER='0' ALT='Close the Calendar'></a></td></tr></table></td></tr><tr><td style='padding:5px' bgcolor=#ffffff><span id='content'></span></td></tr>");if(showToday==1)document.write("<tr bgcolor=#f0f0f0><td style='padding:5px' align=center><span id='lblToday'></span></td></tr>");document.write("</table></div><div id='selectMonth' style='z-index:+999;position:absolute;visibility:hidden;'></div><div id='selectYear' style='z-index:+999;position:absolute;visibility:hidden;'></div>")}var monthName1=new Array("January","February","March","April","May","June","July","August","September","October","November","December"),monthName=new Array("01","02","03","04","05","06","07","08","09","10","11","12");if(startAt==0)dayName=new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");else dayName=new Array("Mon","Tue","Wed","Thu","Fri","Sat","Sun");var styleAnchor="text-decoration:none;color:black;",styleLightBorder="border-style:solid;border-width:1px;border-color:#a0a0a0;";function swapImage(srcImg,destImg){if(ie)document.getElementById(srcImg).setAttribute("src",imgDir+destImg)}function checkdate(){var vDate=new Date,cDate;vmonth=vDate.getMonth();vdate=vDate.getDate();vyear=vDate.getFullYear();vtime=vdate+" "+monthName1[vmonth]+" "+vyear;document.forms(1).mybut.value=vtime}function init(){if(!ns4){if(!ie)yearNow+=1900;crossobj=dom?document.getElementById("calendar").style:ie?document.all.calendar:document.calendar;hideCalendar();crossMonthObj=dom?document.getElementById("selectMonth").style:ie?document.all.selectMonth:document.selectMonth;crossYearObj=dom?document.getElementById("selectYear").style:ie?document.all.selectYear:document.selectYear;monthConstructed=false;yearConstructed=false;if(showToday==1)document.getElementById("lblToday").innerHTML=todayString+" <a onmousemove='window.status=\""+gotoString+"\"' onmouseout='window.status=\"\"' title='"+gotoString+"' style='"+styleAnchor+"' href='javascript:monthSelected=monthNow;yearSelected=yearNow;constructCalendar();'>"+dayName[today.getDay()-startAt==-1?6:today.getDay()-startAt]+", "+dateNow+" "+monthName1[monthNow].substring(0,3)+"\t"+yearNow+"</a>";sHTML1='<span id=\'spanLeft\'\tstyle=\'border-style:solid;border-width:1;border-color:#3366FF;cursor:pointer\' onmouseover=\'swapImage("changeLeft","left2.gif");this.style.borderColor="#88AAFF";window.status="'+scrollLeftMessage+"\"' onclick='javascript:decMonth()' onmouseout='clearInterval(intervalID1);swapImage(\"changeLeft\",\"left1.gif\");this.style.borderColor=\"#3366FF\";window.status=\"\"' onmousedown='clearTimeout(timeoutID1);timeoutID1=setTimeout(\"StartDecMonth()\",500)'\tonmouseup='clearTimeout(timeoutID1);clearInterval(intervalID1)'>&nbsp<IMG id='changeLeft' SRC='"+imgDir+"left1.gif' width=10 height=11 BORDER=0>&nbsp</span>&nbsp;";sHTML1+='<span id=\'spanRight\' style=\'border-style:solid;border-width:1;border-color:#3366FF;cursor:pointer\'\tonmouseover=\'swapImage("changeRight","right2.gif");this.style.borderColor="#88AAFF";window.status="'+scrollRightMessage+"\"' onmouseout='clearInterval(intervalID1);swapImage(\"changeRight\",\"right1.gif\");this.style.borderColor=\"#3366FF\";window.status=\"\"' onclick='incMonth()' onmousedown='clearTimeout(timeoutID1);timeoutID1=setTimeout(\"StartIncMonth()\",500)'\tonmouseup='clearTimeout(timeoutID1);clearInterval(intervalID1)'>&nbsp<IMG id='changeRight' SRC='"+imgDir+"right1.gif'\twidth=10 height=11 BORDER=0>&nbsp</span>&nbsp";sHTML1+='<span id=\'spanMonth\' style=\'border-style:solid;border-width:1;border-color:#3366FF;cursor:pointer\'\tonmouseover=\'swapImage("changeMonth","drop2.gif");this.style.borderColor="#88AAFF";window.status="'+selectMonthMessage+'"\' onmouseout=\'swapImage("changeMonth","drop1.gif");this.style.borderColor="#3366FF";window.status=""\' onclick=\'popUpMonth()\'></span>&nbsp;';sHTML1+='<span id=\'spanYear\' style=\'border-style:solid;border-width:1;border-color:#3366FF;cursor:pointer\' onmouseover=\'swapImage("changeYear","drop2.gif");this.style.borderColor="#88AAFF";window.status="'+selectYearMessage+'"\'\tonmouseout=\'swapImage("changeYear","drop1.gif");this.style.borderColor="#3366FF";window.status=""\'\tonclick=\'popUpYear()\'></span>&nbsp;';document.getElementById("caption").innerHTML=sHTML1;bPageLoaded=true}}function hideCalendar(){crossobj.visibility="hidden";if(crossMonthObj!=null)crossMonthObj.visibility="hidden";if(crossYearObj!=null)crossYearObj.visibility="hidden";showElement("SELECT");showElement("APPLET")}function padZero(num){return num<10?"0"+num:num}function constructDate(d,m,y){sTmp=dateFormat;sTmp=sTmp.replace("dd","<e>");sTmp=sTmp.replace("d","<d>");sTmp=sTmp.replace("<e>",padZero(d));sTmp=sTmp.replace("<d>",d);sTmp=sTmp.replace("mmmm","<p>");sTmp=sTmp.replace("mmm","<o>");sTmp=sTmp.replace("mm","<n>");sTmp=sTmp.replace("m","<m>");sTmp=sTmp.replace("<m>",m+1);sTmp=sTmp.replace("<n>",padZero(m+1));sTmp=sTmp.replace("<o>",monthName[m]);sTmp=sTmp.replace("<p>",monthName1[m]);sTmp=sTmp.replace("yyyy",y);return sTmp.replace("yy",padZero(y%100))}function closeCalendar(){var sTmp;hideCalendar();eval("document.forms(1)."+ctlToPlaceValue+".value=constructDate(dateSelected,monthSelected,yearSelected)")}function StartDecMonth(){intervalID1=setInterval("decMonth()",80)}function StartIncMonth(){intervalID1=setInterval("incMonth()",80)}function incMonth(){monthSelected++;if(monthSelected>11){monthSelected=0;yearSelected++}constructCalendar()}function decMonth(){monthSelected--;if(monthSelected<0){monthSelected=11;yearSelected--}constructCalendar()}function constructMonth(){popDownYear();if(!monthConstructed){sHTML="";for(i=0;i<12;i++){sName=monthName1[i];if(i==monthSelected)sName="<B>"+sName+"</B>";sHTML+="<tr><td id='m"+i+"' onmouseover='this.style.backgroundColor=\"#FFCC99\"' onmouseout='this.style.backgroundColor=\"\"' style='cursor:pointer' onclick='monthConstructed=false;monthSelected="+i+";constructCalendar();popDownMonth();event.cancelBubble=true'>&nbsp;"+sName+"&nbsp;</td></tr>"}document.getElementById("selectMonth").innerHTML="<table width=70\tstyle='font-family:arial; font-size:11px; border-width:1; border-style:solid; border-color:#a0a0a0;' bgcolor='#FFFFDD' cellspacing=0 onmouseover='clearTimeout(timeoutID1)'\tonmouseout='clearTimeout(timeoutID1);timeoutID1=setTimeout(\"popDownMonth()\",100);event.cancelBubble=true'>"+sHTML+"</table>";monthConstructed=true}}function popUpMonth(){constructMonth();crossMonthObj.visibility=dom||ie?"visible":"show";crossMonthObj.left=parseInt(crossobj.left)+50;crossMonthObj.top=parseInt(crossobj.top)+26;hideElement("SELECT",document.getElementById("selectMonth"));hideElement("APPLET",document.getElementById("selectMonth"))}function popDownMonth(){crossMonthObj.visibility="hidden"}function incYear(){for(i=0;i<7;i++){newYear=i+nStartingYear+1;if(newYear==yearSelected)txtYear="&nbsp;<B>"+newYear+"</B>&nbsp;";else txtYear="&nbsp;"+newYear+"&nbsp;";document.getElementById("y"+i).innerHTML=txtYear}nStartingYear++;bShow=true}function decYear(){for(i=0;i<7;i++){newYear=i+nStartingYear-1;if(newYear==yearSelected)txtYear="&nbsp;<B>"+newYear+"</B>&nbsp;";else txtYear="&nbsp;"+newYear+"&nbsp;";document.getElementById("y"+i).innerHTML=txtYear}nStartingYear--;bShow=true}function selectYear(nYear){yearSelected=parseInt(nYear+nStartingYear);yearConstructed=false;constructCalendar();popDownYear()}function constructYear(){popDownMonth();sHTML="";if(!yearConstructed){sHTML="<tr><td align='center'\tonmouseover='this.style.backgroundColor=\"#FFCC99\"' onmouseout='clearInterval(intervalID1);this.style.backgroundColor=\"\"' style='cursor:pointer'\tonmousedown='clearInterval(intervalID1);intervalID1=setInterval(\"decYear()\",30)' onmouseup='clearInterval(intervalID1)'>-</td></tr>";j=0;nStartingYear=yearSelected-3;for(i=yearSelected-3;i<=yearSelected+3;i++){sName=i;if(i==yearSelected)sName="<B>"+sName+"</B>";sHTML+="<tr><td id='y"+j+"' onmouseover='this.style.backgroundColor=\"#FFCC99\"' onmouseout='this.style.backgroundColor=\"\"' style='cursor:pointer' onclick='selectYear("+j+");event.cancelBubble=true'>&nbsp;"+sName+"&nbsp;</td></tr>";j++}sHTML+="<tr><td align='center' onmouseover='this.style.backgroundColor=\"#FFCC99\"' onmouseout='clearInterval(intervalID2);this.style.backgroundColor=\"\"' style='cursor:pointer' onmousedown='clearInterval(intervalID2);intervalID2=setInterval(\"incYear()\",30)'\tonmouseup='clearInterval(intervalID2)'>+</td></tr>";document.getElementById("selectYear").innerHTML="<table width=44 style='font-family:arial; font-size:11px; border-width:1; border-style:solid; border-color:#a0a0a0;'\tbgcolor='#FFFFDD' onmouseover='clearTimeout(timeoutID2)' onmouseout='clearTimeout(timeoutID2);timeoutID2=setTimeout(\"popDownYear()\",100)' cellspacing=0>"+sHTML+"</table>";yearConstructed=true}}function popDownYear(){clearInterval(intervalID1);clearTimeout(timeoutID1);clearInterval(intervalID2);clearTimeout(timeoutID2);crossYearObj.visibility="hidden"}function popUpYear(){var leftOffset;constructYear();crossYearObj.visibility=dom||ie?"visible":"show";leftOffset=parseInt(crossobj.left)+document.getElementById("spanYear").offsetLeft;if(ie)leftOffset+=6;crossYearObj.left=leftOffset;crossYearObj.top=parseInt(crossobj.top)+26}function WeekNbr(n){year=n.getFullYear();month=n.getMonth()+1;if(startAt==0)day=n.getDate()+1;else day=n.getDate();a=Math.floor((14-month)/12);y=year+4800-a;m=month+12*a-3;b=Math.floor(y/4)-Math.floor(y/100)+Math.floor(y/400);J=day+Math.floor((153*m+2)/5)+365*y+b-32045;d4=(J+31741-J%7)%146097%36524%1461;L=Math.floor(d4/1460);d1=(d4-L)%365+L;week=Math.floor(d1/7)+1;return week}function constructCalendar(){var aNumDays=Array(31,0,31,30,31,30,31,31,30,31,30,31),dateMessage,startDate=new Date(yearSelected,monthSelected,1),endDate;if(monthSelected==1){endDate=new Date(yearSelected,monthSelected+1,1);endDate=new Date(endDate-24*60*60*1000);numDaysInMonth=endDate.getDate()}else numDaysInMonth=aNumDays[monthSelected];datePointer=0;dayPointer=startDate.getDay()-startAt;if(dayPointer<0)dayPointer=6;sHTML="<table\t border=0 style='font-family:verdana;font-size:10px;'><tr>";if(showWeekNumber==1)sHTML+="<td width=27><b>"+weekString+"</b></td><td width=1 rowspan=7 bgcolor='#d0d0d0' style='padding:0px'><img src='"+imgDir+"divider.gif' width=1></td>";for(i=0;i<7;i++)sHTML+="<td width='27' align='right'><B>"+dayName[i]+"</B></td>";sHTML+="</tr><tr>";if(showWeekNumber==1)sHTML+="<td align=right>"+WeekNbr(startDate)+"&nbsp;</td>";for(var i=1;i<=dayPointer;i++)sHTML+="<td>&nbsp;</td>";for(datePointer=1;datePointer<=numDaysInMonth;datePointer++){dayPointer++;sHTML+="<td align=right>";sStyle=styleAnchor;if(datePointer==odateSelected&&monthSelected==omonthSelected&&yearSelected==oyearSelected)sStyle+=styleLightBorder;sHint="";for(k=0;k<HolidaysCounter;k++)if(parseInt(Holidays[k].d)==datePointer&&parseInt(Holidays[k].m)==monthSelected+1)if(parseInt(Holidays[k].y)==0||parseInt(Holidays[k].y)==yearSelected&&parseInt(Holidays[k].y)!=0){sStyle+="background-color:#FFDDDD;";sHint+=sHint==""?Holidays[k].desc:"\n"+Holidays[k].desc}var regexp=/\"/g;sHint=sHint.replace(regexp,"&quot;");dateMessage="onmousemove='window.status=\""+selectDateMessage.replace("[date]",constructDate(datePointer,monthSelected,yearSelected))+"\"' onmouseout='window.status=\"\"' ";if(datePointer==dateNow&&monthSelected==monthNow&&yearSelected==yearNow)sHTML+="<b><a "+dateMessage+' title="'+sHint+"\" style='"+sStyle+"' href='javascript:dateSelected="+datePointer+";closeCalendar();'><font color=#ff0000>&nbsp;"+datePointer+"</font>&nbsp;</a></b>";else if(dayPointer%7==startAt*-1+1)sHTML+="<a "+dateMessage+' title="'+sHint+"\" style='"+sStyle+"' href='javascript:dateSelected="+datePointer+";closeCalendar();'>&nbsp;<font color=#909090>"+datePointer+"</font>&nbsp;</a>";else sHTML+="<a "+dateMessage+' title="'+sHint+"\" style='"+sStyle+"' href='javascript:dateSelected="+datePointer+";closeCalendar();'>&nbsp;"+datePointer+"&nbsp;</a>";sHTML+="";if((dayPointer+startAt)%7==startAt){sHTML+="</tr><tr>";if(showWeekNumber==1&&datePointer<numDaysInMonth)sHTML+="<td align=right>"+WeekNbr(new Date(yearSelected,monthSelected,datePointer+1))+"&nbsp;</td>"}}document.getElementById("content").innerHTML=sHTML;document.getElementById("spanMonth").innerHTML="&nbsp;"+monthName1[monthSelected]+"&nbsp;<IMG id='changeMonth' SRC='"+imgDir+"drop1.gif' WIDTH='12' HEIGHT='10' BORDER=0>";document.getElementById("spanYear").innerHTML="&nbsp;"+yearSelected+"&nbsp;<IMG id='changeYear' SRC='"+imgDir+"drop1.gif' WIDTH='12' HEIGHT='10' BORDER=0>"}function popUpCalendar(ctl,ctl2,format){var leftpos=0,toppos=0;if(bPageLoaded){if(crossobj.visibility=="hidden"){ctlToPlaceValue=ctl2;dateFormat=format;formatChar=" ";aFormat=dateFormat.split(formatChar);if(aFormat.length<3){formatChar="/";aFormat=dateFormat.split(formatChar);if(aFormat.length<3){formatChar=".";aFormat=dateFormat.split(formatChar);if(aFormat.length<3){formatChar="-";aFormat=dateFormat.split(formatChar);if(aFormat.length<3)formatChar=""}}}tokensChanged=0;if(tokensChanged!=3||isNaN(dateSelected)||isNaN(monthSelected)||isNaN(yearSelected)){dateSelected=dateNow;monthSelected=monthNow;yearSelected=yearNow}odateSelected=dateSelected;omonthSelected=monthSelected;oyearSelected=yearSelected;aTag=ctl;do{aTag=aTag.offsetParent;leftpos+=aTag.offsetLeft;toppos+=aTag.offsetTop}while(aTag.tagName!="BODY");crossobj.left=fixedX==-1?ctl.offsetLeft+leftpos:fixedX;crossobj.top=fixedY==-1?ctl.offsetTop+toppos+ctl.offsetHeight+2:fixedY;constructCalendar(1,monthSelected,yearSelected);crossobj.visibility=dom||ie?"visible":"show";hideElement("SELECT",document.getElementById("calendar"));hideElement("APPLET",document.getElementById("calendar"));bShow=true}else{hideCalendar();if(ctlNow!=ctl)popUpCalendar(ctl,ctl2,format)}ctlNow=ctl}}document.onkeypress=function hidecal1(){if(event.keyCode==27)hideCalendar()};document.onclick=function hidecal2(){if(!bShow)hideCalendar();bShow=false};if(ie)init();else window.onload=init;function Show(){var win=window.open(arguments[0],"","")}var clickStar=0;function FillStar(){for(i=1;i<=5;i++){var cntl=eval("document.getElementById('Star"+i+"')");cntl.src="images/FullWhiteStar.gif"}for(i=1;i<=arguments[0];i++){cntl=eval("document.getElementById('Star"+i+"')");cntl.src="images/FullBlueStar.gif";cntl.alt="Click to rate : "+i+" out of 5 Stars"}}function PostComment(){clickStar=arguments[0]}function FillStarCliked(){for(i=1;i<=arguments[0];i++){var cntl=eval("document.getElementById('Star"+i+"')");cntl.src="images/FullBlueStar.gif";cntl.alt="Click to rate : "+i+" out of 5 Stars"}}function SetGoldStar(){for(i=1;i<=clickStar;i++){var cntl=eval("document.getElementById('Star"+i+"')");cntl.src="images/FullGoldStar.gif"}}function RemoveStar(){for(i=1;i<=5;i++){var cntl=eval("document.getElementById('Star"+i+"')");cntl.src="images/FullWhiteStar.gif"}}function CheckLengthCounter(){var cntl1=document.getElementById(arguments[0]),cntl2=document.getElementById(arguments[2]),cntl3=document.getElementById(arguments[3]);document.getElementById(arguments[3]).innerHTML="Remaining Characters :";document.getElementById(arguments[1]).innerHTML=arguments[4]-cntl1.value.length;if(cntl1.value.length>arguments[4]){document.getElementById(arguments[3]).innerHTML="";document.getElementById(arguments[1]).innerHTML="You entered "+cntl1.value.length+" characters. Please enter 255 or fewer characters."}if(cntl1.value.length>0&cntl1.value.length<arguments[4])cntl2.disabled=false;else if(cntl1.value.length>arguments[4])cntl2.disabled=true;else cntl2.disabled=true}function Url(){var cntl1=document.getElementById(arguments[0]),strNewUrl,strimgUrl="images/FullGoldStar.gif",sta5=eval("document.getElementById('Star5')"),sta4=eval("document.getElementById('Star4')"),sta3=eval("document.getElementById('Star3')"),sta2=eval("document.getElementById('Star2')"),sta1=eval("document.getElementById('Star1')"),Count=0;if(strimgUrl==Right(sta5.src,23))Count=5;else if(strimgUrl==Right(sta4.src,23))Count=4;else if(strimgUrl==Right(sta3.src,23))Count=3;else if(strimgUrl==Right(sta2.src,23))Count=2;else if(strimgUrl==Right(sta1.src,23))Count=1;strNewUrl="./Comments.aspx?Tem="+arguments[1]+"&Rating="+Count;cntl1.href=strNewUrl}function Right(str,n){if(n<=0)return "";else if(n>String(str).length)return str;else{var iLen=String(str).length;return String(str).substring(iLen,iLen-n)}}function Statevalidate(){var cntl=document.getElementById(arguments[0]),cnt2=document.getElementById(arguments[1]);if(cntl.selectedIndex==0){alert("Please select the country");cntl.focus();return false}if(isEmpty(cnt2.value,"Name")==true){cnt2.focus();return false}if(CountWords(cnt2.id)==0){alert("Please Enter the state");cnt2.focus();return false}return true}function Cityvalidate(){var cntl=document.getElementById(arguments[0]),cnt2=document.getElementById(arguments[1]),cnt3=document.getElementById(arguments[2]);if(cntl.selectedIndex==0){alert("Please select the country");cntl.focus();return false}if(cnt2.selectedIndex==0){alert("Please select the state");cnt2.focus();return false}if(isEmpty(cnt3.value,"City Name")==true){cnt3.focus();return false}if(CountWords(cnt3.id)==0){alert("Please enter the city name");cnt3.focus();return false}return true}function ForumGroupvalidate(){var cntl=document.getElementById(arguments[0]),cnt2=document.getElementById(arguments[1]),cnt3=document.getElementById(arguments[2]),cnt4=document.getElementById(arguments[3]);if(isEmpty(cntl.value,"Name")==true){cntl.focus();return false}if(isEmpty(cnt2.value,"description")==true){cnt2.focus();return false}if(cnt4.checked==false)if(cnt3.options[0].selected==true){alert("Please select a group");cnt4.focus();return false}return true}function UploadTemplateValidate(){var cntl=document.getElementById(arguments[0]),cnt2=document.getElementById(arguments[1]);if(isEmpty(cntl.value,"Template Name")==true){cntl.focus();return false}if(CountWords(cntl.id)==0){alert("Please enter the template name");cntl.focus();return false}if(isEmpty(cnt2.value,"Template File Name")==true){cnt2.focus();return false}return true}function isEmpty(sVal,sTitle){if(sVal.length==0){alert("Please Enter "+sTitle);return true}}function CountWords(control){var y=document.getElementById(control).value,r=0;a=y.replace("\n","");a=a.split(" ");for(z=0;z<a.length;z++)if(a[z].length>0)r++;return r}var dtCh="/",minYear=1900,maxYear=9999;function isInteger(s){var i;for(i=0;i<s.length;i++){var c=s.charAt(i);if(c<"0"||c>"9")return false}return true}function stripCharsInBag(s,bag){var i,returnString="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(bag.indexOf(c)==-1)returnString+=c}return returnString}function daysInFebruary(year){return year%4==0&&(!(year%100==0)||year%400==0)?29:28}function DaysArray(n){for(var i=1;i<=n;i++){this[i]=31;if(i==4||i==6||i==9||i==11)this[i]=30;if(i==2)this[i]=29}return this}function isDate(dtStr){var daysInMonth=DaysArray(12),pos1=dtStr.indexOf(dtCh),pos2=dtStr.indexOf(dtCh,pos1+1),strMonth=dtStr.substring(0,pos1),strDay=dtStr.substring(pos1+1,pos2),strYear=dtStr.substring(pos2+1);strYr=strYear;if(strDay.charAt(0)=="0"&&strDay.length>1)strDay=strDay.substring(1);if(strMonth.charAt(0)=="0"&&strMonth.length>1)strMonth=strMonth.substring(1);for(var i=1;i<=3;i++)if(strYr.charAt(0)=="0"&&strYr.length>1)strYr=strYr.substring(1);month=parseInt(strMonth);day=parseInt(strDay);year=parseInt(strYr);if(pos1==-1||pos2==-1){alert("The date format should be : mm/dd/yyyy");return false}if(strMonth.length<1||month<1||month>12){alert("Please enter a valid month");return false}if(strDay.length<1||day<1||day>31||month==2&&day>daysInFebruary(year)||day>daysInMonth[month]){alert("Please enter a valid day");return false}if(strYear.length!=4||year==0||year<minYear||year>maxYear){alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear);return false}if(dtStr.indexOf(dtCh,pos2+1)!=-1||isInteger(stripCharsInBag(dtStr,dtCh))==false){alert("Please enter a valid date");return false}return true}function ValidateDateFormat(){var dt=document.getElementById(arguments[0]);if(isDate(dt.value)==false){dt.focus();return false}return true}