//Function to setdate relaetd variables for use on the site. now = new Date(); day = new Object(); month = new Object(); day[0] = "Sunday"; day[1] = "Monday"; day[2] = "Tuesday"; day[3] = "Wednesday"; day[4] = "Thursday"; day[5] = "Friday"; day[6] = "Saturday"; month[0] = "January"; month[1] = "February"; month[2] = "March"; month[3] = "April"; month[4] = "May"; month[5] = "June"; month[6] = "July"; month[7] = "August"; month[8] = "September"; month[9] = "October"; month[10] = "November"; month[11] = "December"; year = now.getYear(); if (year < 1000) year += 1900; //Function to set focus to the first editable control in a document //Just call it from the onload event of the body element function set_first_control_focus(strCN) { //working variables var Fid=0; var Eid=0; var ErrTxt=''; var fControl; if (strCN && strCN.length>0) { strCN.focus(); } else { //loop through the forms in the current doc for (Fid=0; Fid < window.document.forms.length; Fid++) { //loop through the elements in the current form for (Eid=0; Eid < window.document.forms[Fid].length; Eid++) { //get the ref to the element el=window.document.forms[Fid].elements[Eid]; if ((el.type=="text" | el.type=="password" | el.type=="select-one" | el.type=="textarea") && el.readonly!=true) { if (el.type=="text" | el.type=="password") { el.select(el.length); } el.focus(); break; } } } } }