﻿OPERA="opera";IE="msie";MOZILLA="mozilla";SAFARI="safari";FIREFOX="firefox";xBrowser={_agent:null,_appVer:null,name:null,__init:function(){var aa=this._agent;var ba=this._appVer;aa=navigator.userAgent.toLowerCase();ba=navigator.appVersion.toLowerCase();if(aa.indexOf(OPERA)!=-1)this.name=OPERA;else if(aa.indexOf(IE)!=-1)this.name=IE;else if(aa.indexOf(FIREFOX)!=-1)this.name=FIREFOX;else if(aa.indexOf(SAFARI)!=-1)this.name=SAFARI;},version:{minor:-1,major:-1,init:function(da,ea){this.major=da;this.minor=ea;}}};xBrowser.__init();xBrowserCookie={create:function(fa,ga,ha){if(ha){var ia=new Date();ia.setTime(ia.getTime()+(ha*24*60*60*1000));var ja="; expires="+ia.toGMTString();}
else var ja="";document.cookie=fa+"="+ga+ja+"; path=/";},read:function(ka){var la=ka+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(la)==0)return c.substring(la.length,c.length);}
return null;},remove:function(ma){createCookie(ma,"",-1);}};String.PAD_LEFT=0;String.PAD_RIGHT=1;String.PAD_BOTH=2;String.prototype.pad=function(na,oa,pa){var qa=this;var ra=new String();na=isNaN(na)?0:na-qa.length;oa=typeof(oa)=='string'?oa:' ';if(pa==String.PAD_BOTH){qa=qa.pad(Math.floor(na/2)+qa.length,oa,String.PAD_LEFT);return(qa.pad(Math.ceil(na/2)+qa.length,oa,String.PAD_RIGHT));}
while((na-=oa.length)>0)ra+=oa;ra+=oa.substr(0,na+oa.length);return(pa==String.PAD_LEFT?ra.concat(qa):qa.concat(ra));};Math.randomInt=function(sa,ta){if(!isFinite(sa))sa=0;if(!isFinite(ta))ta=1;return(Math.floor((Math.random()%1)*(ta-sa+1)+sa));};String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');};String.prototype.rtrim=function(ua){var va=ct.fromCharCode(32);var fs=ua.length;var wa="";if(fs<0){return "";}
var xa=fs-1;while(xa>-1){if(ua.charAt(xa)==va){}
else{wa=ua.substring(0,xa+1);break;}
xa--;}
return wa;};String.prototype.ltrim=function(ya){var za=ct.fromCharCode(32);if(v_length<1){return "";}
var Aa=ya.length;var Ba="";var Ca=0;while(Ca<Aa){if(ya.charAt(Ca)==za){}
else{Ba=ya.substring(Ca,Aa);break;}
Ca++;}
return Ba;};String.prototype.escapeHTML=function(){var Da=document.createElement('div');var Ea=document.createTextNode(this);Da.appendChild(Ea);return Da.innerHTML;};String.prototype.escapeQuotes=function(){var Fa=this;Fa=Fa.replace(new RegExp("<","g"),"&lt;");Fa=Fa.replace(new RegExp(">","g"),"&gt;");Fa=Fa.replace(new RegExp("\'","g"),"~0x27");return Fa;}
String.prototype.unescapeQuotes=function(){var Ga=this;Ga=Ga.replace(new RegExp("&lt;BR&gt;","g"),"<BR>");Ga=Ga.replace(new RegExp("\~0x27","g"),"\'");return Ga;};String.prototype.unescapeBrackets=function(){var Ha=this;Ha=Ha.replace(new RegExp("&lt;","g"),"<");Ha=Ha.replace(new RegExp("&gt;","g"),">");return Ha;};Array.prototype.remove=function(Ia){var Ja=this.length-1;if(Ia<0||Ja<0||Ja<Ia)return null;var Ka=this[Ia];this.splice(Ia,1);return Ka;};xGuid={empty:'00000000-0000-0000-0000-000000000000',newGuid:function(){var La=this.getRandomString(8);var Ma=this.getRandomString(4);var Na='4'+this.getRandomString(3);var Oa=Math.randomInt(0,0xFF);Oa=((Oa&~(1<<6))|(1<<7)).toString(16);var Pa=this.getRandomString(2);var Qa=this.getRandomString(12);return(La+'-'+Ma+'-'+Na+'-'+Oa+Pa+'-'+Qa);},getRandomString:function(Ra){var Sa=Math.randomInt(0,Math.pow(16,Ra)-1);return(Sa.toString(16).pad(Ra,'0',String.PAD_LEFT));}};var dtCh="/";var minYear=1900;var maxYear=2100;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,Ta){var i;var Ua="";for(i=0;i<s.length;i++){var c=s.charAt(i);if(Ta.indexOf(c)==-1)Ua+=c;}
return Ua;}
function daysInFebruary(Va){return(((Va%4==0)&&((!(Va%100==0))||(Va%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(Wa){var Xa=DaysArray(12);var Ya=Wa.indexOf(dtCh);var Za=Wa.indexOf(dtCh,Ya+1);var $a=Wa.substring(0,Ya);var ab=Wa.substring(Ya+1,Za);var bb=Wa.substring(Za+1);strYr=bb;if(ab.charAt(0)=="0"&&ab.length>1)ab=ab.substring(1);if($a.charAt(0)=="0"&&$a.length>1)$a=$a.substring(1);for(var i=1;i<=3;i++){if(strYr.charAt(0)=="0"&&strYr.length>1)strYr=strYr.substring(1);}
month=parseInt($a);day=parseInt(ab);year=parseInt(strYr);if(Ya==-1||Za==-1){alert("The date format should be : mm/dd/yyyy");return false;}
if($a.length<1||month<1||month>12){alert("Please enter a valid month");return false;}
if(ab.length<1||day<1||day>31||(month==2&&day>daysInFebruary(year))||day>Xa[month]){alert("Please enter a valid day");return false;}
if(bb.length!=4||year==0||year<minYear||year>maxYear){alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear);return false;}
if(Wa.indexOf(dtCh,Za+1)!=-1||isInteger(stripCharsInBag(Wa,dtCh))==false){alert("Please enter a valid date");return false;}
return true;}
function ValidateForm(){var dt=document.frmSample.txtDate;if(isDate(dt.value)==false){dt.focus();return false;}
return true;}﻿xElement={createNew:function(cb){return xElement.create(document.createElement(cb));},create:function(db){if(typeof(element)=="string")db=document.getElementById(db);if(db==null){return;}
db.isXElement=true;db.tag='';db.add=function(db){try{this.appendChild(db);}catch(ex){}};db.addClass=function(eb){xElement.addClass(this,eb);};db.removeClass=function(fb){xElement.removeClass(this,fb);};db.addListener=function(gb,hb){xElement.addListener(this,gb,hb);};db.removeListener=function(ib,jb){xElement.removeListener(this,ib,jb);};db.show=function(){xElement.show(this);};db.hide=function(){xElement.hide(this);};db.isVisible=function(){return xElement.isVisible(this);};db.moveTo=function(kb){xElement.moveTo(this,kb);};db.setSize=function(lb){xElement.setSize(this,lb);};db.setRect=function(mb){xElement.setRect(this,mb);};db.setZIndex=function(nb){xElement.setZIndex(this,nb);};db.getRect=function(){return xElement.getRect(this);};db.findParentByTag=function(ob){return xElement.findParentByTag(this,ob);};db.findParentByID=function(pb){return xElement.findParentByTag(this,pb);};db.calcExactLocation=function(){return xElement.calcExactLocation(this);};db.getSource=function(){if(this.outerHTML)return this.outerHTML;else{var qb=document.createElement("div");qb.appendChild(this.cloneNode(true));source=qb.innerHTML;return source;}};db.getParent=function(){return(this.parentElement)?this.parentElement:this.parentNode;};db.remove=function(){this.getParent().removeChild(this);};return db;},isVisible:function(rb){if(rb.style.display=='none'||rb.style.visibility=='hidden')return false;return true;},getRect:function(sb){var tb=(sb.style.top=='')?sb.offsetTop:parseInt(sb.style.top);var ub=(sb.style.left=='')?sb.offsetLeft:parseInt(sb.style.left);var vb=(sb.style.width=='')?sb.offsetWidth:parseInt(sb.style.width);var wb=(sb.style.height=='')?sb.offsetHeight:parseInt(sb.style.height);var xb={top:tb,left:ub,width:vb,height:wb};return xb;},calcExactLocation:function(yb){var zb=0,left=0;do{rect=$(yb).getRect();zb+=rect.top;left+=rect.left;yb=yb.offsetParent;}
while(yb);return{"top":zb,"left":left}},show:function(Ab){Ab.style.display="block";Ab.style.visibility="visible";},hide:function(Bb){Bb.style.display="none";Bb.style.visibility="hidden";},addClass:function(Cb,Db){Cb.className=Cb.className+" "+Db;},removeClass:function(Eb,Fb){},addListener:function(Gb,Hb,Ib){hookListener(Gb,Hb,Ib);},removeListener:function(Jb,Kb,Lb){unhookListener(Jb,Kb,Lb);},moveTo:function(Mb,Nb){Mb.style.left=Nb.left+"px";Mb.style.top=Nb.top+"px";},setSize:function(Ob,Pb){Ob.style.width=(Pb.width<0)?0:Pb.width+"px";Ob.style.height=(Pb.height<0)?0:Pb.height+"px";},setRect:function(Qb,Rb){xElement.moveTo(Qb,Rb);xElement.setSize(Qb,Rb);},setZIndex:function(Sb,Tb){Sb.style.zIndex=Tb;},findParentByTag:function(Ub,Vb){var Wb=Ub.parentNode;while(Wb!=null){if(Wb.tagName==Vb)return Wb;Wb=Wb.parentNode;}
return null;},findParentByID:function(Xb,Yb){var Zb=Xb.parentNode;while(Zb!=null){if(Zb.id==Yb)return Zb;Zb=Zb.parentNode;}
return null;}};function validateReturnKey(e){}
function $($b){if($b==null)return null;if(typeof($b)=="string")$b=document.getElementById($b);return xElement.create($b);}
function hookListener(ac,bc,cc){if(typeof(ac)=="string")ac=document.getElementById(ac);if(ac==null)return;if(ac.addEventListener)ac.addEventListener(bc,cc,false);else if(ac.attachEvent)ac.attachEvent("on"+bc,cc);}
function unhookListener(dc,ec,fc){if(typeof(dc)=="string")dc=document.getElementById(dc);if(dc==null)return false;if(dc.removeEventListener){dc.removeEventListener(ec,fc,false);}
else if(dc.detachEvent)dc.detachEvent("on"+ec,fc);return true;}
function cancelListener(e){e=getEventObject(e);if(e.stopPropagation)e.stopPropagation();if(e.preventDefault)e.preventDefault();e.cancelBubble=true;e.cancel=true;e.returnValue=false;return false;}
function getEventObject(e){return(e)?e:window.event;}
function getEventTarget(e){e=getEventObject(e);return(e.target)?e.target:e.srcElement;}
function eventCallbackRouter(e){e=getEventTarget(e);e.cancel=false;e.target=getEventTarget(e);callback(e);if(e.cancel){cancelEvent(e);return false;}}
function disableSelection(gc){if(!gc)return null;if(typeof gc.onselectstart!="undefined"){gc.onselectstart=function(){return false;}}
else if(typeof gc.style.MozUserSelect!="undefined"){gc.style.MozUserSelect="none";}
else{try{gc.addListener("mousedown",function(e){e=getEventObject(e);return cancelListener(e);});}
catch(error){}}
gc.style.cursor="default";}
function addListener(hc,ic){hookListener(window,hc,ic);}
function removeListener(jc,kc){unhookListener(window,jc,kc);}﻿RequestMethod={Get:'GET',Post:'POST'};RequestFormat={Text:'Text',Xml:'XML',Json:'JSON'};function AjaxRequest(lc,mc){if(lc==''||lc==null)return null;if(mc==''||mc==null)mc=RequestMethod.Get;this.url=lc;this.method=mc;this.format=RequestFormat.Text;this.indicatorElm=null;this.allowCache=false;this.httpRequestObj=null;this.parameters=null;this.tag=null;this.onError=null;this.onSuccess=null;this.onRequestStart=null;this.onRequestEnd=null;};AjaxRequest.prototype.initHttpRequest=function(){if(this.allowCache==true&&this.httpRequestObj!=null)return;if(window.XMLHttpRequest)this.httpRequestObj=new XMLHttpRequest();else if(window.ActiveXObject){try{this.httpRequestObj=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e){try{this.httpRequestObj=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e){this.httpRequestObj=null;}}}
else{this.httpRequestObj=null;}};AjaxRequest.prototype.send=function(){try{if(this.url==null||this.url==''){throw("Url can not be null or empty");}
if(this.httpRequestObj!=null){if(this.allowCache==false){this.initHttpRequest();var nc="uid="+new Date().getTime();this.url+=(this.url.indexOf("?")+1)?"&":"?";this.url+=nc;}}else{this.initHttpRequest();}
var oc=this.httpRequestObj;var pc=this;if(oc==null)throw("Can not process Ajax Request, Request object is null");if(oc.overrideMimeType)oc.overrideMimeType('text/xml');this.onRequestStartHandler();if(this.method==RequestMethod.Post){var qc=this.url.split("\?");this.url=qc[0];this.parameters=qc[1];oc.open(this.method,this.url,true);oc.setRequestHeader("Content-type","application/x-www-form-urlencoded");oc.setRequestHeader("Content-length",this.parameters.length);oc.setRequestHeader("Connection","close");}else{oc.open(this.method,this.url,true);}
oc.onreadystatechange=function(){if(oc.readyState==4){if(oc.status==200){var rc='';if(pc.format==RequestFormat.Xml)rc=oc.responseXml;else{rc=oc.responseText;if(pc.format==RequestFormat.Json){rc=rc.replace(/[\n\r]/g,"");if(rc=="")rc=null;else rc=eval("("+rc+")");}
pc.onSuccessHandler(rc);}}
else{pc.onErrorHandler(oc.status);}
pc.onRequestEndHandler();}};this.httpRequestObj.send(this.parameters);}
catch(exception){this.onErrorHandler(exception);}};AjaxRequest.prototype.onSuccessHandler=function(sc){if(this.onSuccess)this.onSuccess(this,sc);};AjaxRequest.prototype.onErrorHandler=function(tc){if(this.onError)this.onError(this,tc);};AjaxRequest.prototype.onRequestStartHandler=function(){if(this.onRequestStart!=null){if(this.indicatorElm!=null){this.indicatorElm.style.display='block';}
this.onRequestStart(this);}};AjaxRequest.prototype.onRequestEndHandler=function(){if(this.onRequestEnd!=null){if(this.indicatorElm!=null){this.indicatorElm.style.display='none';}
this.onRequestEnd(this);}};﻿header=null;content=null;initialized=false;baseUrl=null;userID=null;offsetSize=0;documentCover=null;formContainer=null;loader=null;doc=null;headerHeight=0;pageWidth=0;pageHeight=0;mainForm=null;function pageInit(){}
function pageResize(){}
function doInit(){header=$("header_div");content=$("content_div");loader=$("loader_div");document.documentElement.style.height="100%";document.documentElement.style.width="100%";offsetSize=(xBrowser.name==IE)?1:0;initialized=true;documentCover=$("documentCover_Div");formContainer=$("formContainer_Div");mainForm=$(mainFormID);mainForm.addListener("keypress",function(e){e=getEventObject(e);var uc=false;keycode=(e.keyCode)?e.keyCode:e.which;if(keycode==13){return cancelListener(e);}});doc=$("doc_body");doc.style.display="block";doResize();pageInit();content.show();status="Done";}
function doResize(){if(!initialized)return false;width=document.documentElement.offsetWidth;height=document.documentElement.offsetHeight;pageWidth=width;pageHeight=height;headerHeight=header.getRect().height;header.setRect({top:0,left:0,width:width,height:headerHeight});content.setRect({top:headerHeight+1,left:0,width:width-7-offsetSize,height:height-headerHeight-7-offsetSize});var vc=formContainer.offsetWidth;var wc=formContainer.offsetHeight;formContainer.moveTo({left:(width-vc)/2,top:(height-wc)/2});documentCover.moveTo({left:0,top:0,width:width,height:height});pageResize();}
document.ondragstart=function(e){return cancelListener(e);};