function SetFocus(b){var c=0;if(b!=""){for(i=0;i<document.forms.length;i++){if(document.forms[i].name==b){c=i;break}}}var a=document.forms[c];for(i=0;i<a.length;i++){if((a.elements[i].type!="image")&&(a.elements[i].type!="hidden")&&(a.elements[i].type!="reset")&&(a.elements[i].type!="submit")){a.elements[i].focus();if((a.elements[i].type=="text")||(a.elements[i].type=="password")){a.elements[i].select()}break}}}function RemoveFormatString(b,a){if(b.value==a){b.value=""}b.select()}function CheckDateRange(b,a){if(Date.parse(b.value)<=Date.parse(a.value)){return true}else{return false}}function IsValidDate(k,r){var n;var b;var p;var c;var h;var l;var g;var m;var o;var j;var f=-1;var e=-1;var d=new Array("-"," ","/",".");var q=new Array("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");var a=new Array(31,28,31,30,31,30,31,31,30,31,30,31);n=k.toLowerCase();c=r.toLowerCase();if(n.length!=c.length){return false}for(i=0;i<d.length;i++){if(c.indexOf(d[i])!=-1){e=i;break}}for(i=0;i<d.length;i++){if(n.indexOf(d[i])!=-1){f=i;break}}if(f!=e){return false}if(f!=-1){p=c.split(d[e]);if(p.length!=3){return false}b=n.split(d[f]);if(b.length!=3){return false}for(i=0;i<p.length;i++){if(p[i]=="mm"||p[i]=="mmm"){l=b[i]}if(p[i]=="dd"){h=b[i]}if(p[i]=="yyyy"){g=b[i]}}}else{if(r.length>7){if(c.indexOf("mmm")==-1){l=n.substring(c.indexOf("mm"),2)}else{l=n.substring(c.indexOf("mmm"),3)}h=n.substring(c.indexOf("dd"),2);g=n.substring(c.indexOf("yyyy"),2)}else{return false}}if(g.length!=4){return false}m=parseInt(h,10);if(isNaN(m)){return false}if(m<1){return false}o=parseInt(l,10);if(isNaN(o)){for(i=0;i<q.length;i++){if(l==q[i]){o=i+1;break}}if(isNaN(o)){return false}}if(o>12||o<1){return false}j=parseInt(g,10);if(isNaN(j)){return false}if(IsLeapYear(j)==true){a[1]=29}if(m>a[o-1]){return false}return true}function IsLeapYear(a){if(a%100==0){if(a%400==0){return true}}else{if((a%4)==0){return true}}return false}function popWindow_hp(theURL,vars,winName,htmlName,features){eval(winName+"=window.open('"+theURL+"?"+vars+"','"+htmlName+"','"+features+"')");if(window.focus){eval(winName+".focus()")}}var selected;var submitter=null;function submitFunction(){submitter=1}function popupWindow(a){window.open(a,"popupWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150")}function selectRowEffect(a,b){if(!selected){if(document.getElementById){selected=document.getElementById("defaultSelected")}else{selected=document.all.defaultSelected}}if(selected){selected.className="moduleRow"}a.className="moduleRowSelected";selected=a;if(document.getElementById("payment"[0])){document.getElementById("payment"[b]).checked=true}else{}}function rowOverEffect(a){if(a.className=="moduleRow"){a.className="moduleRowOver"}}function rowOutEffect(a){if(a.className=="moduleRowOver"){a.className="moduleRow"}}function popupImageWindow(a){window.open(a,"popupImageWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150")}function escapeZoomURL(b){if(b.indexOf("title=")>-1||b.indexOf("alt=")>-1){var a=b.split("&");b="";for(i=0;i<a.length;i++){var c=a[i].split("=");b=b+c[0]+"="+escape(c[1]);if(i<a.length){b+="&"}}}return b}var winpop;function popup(a,g,c,b,d,h,j,e){var k=(screen.availWidth)?screen.availWidth:800;var f=(screen.availHeight)?screen.availHeight:600;if((g!=null)&&(g<=100)){g=100}if((g==null)||(g<100)||(g>k)){g=k-100}if((c!=null)&&(c<=100)){c=100}if((c==null)||(c<100)||(c>f-120)){c=f-120}if((b==null)||(b<0)||(k<b+g)){b=(k-g)/2}if((d==null)||(d<0)||(f<d+c)){d=(f-c)/2-20}if(d<0){d=0}if(winpop&&(winpop.closed!=true)){winpop.close()}if(!j){j="toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1"}if(!e){e="w"}winpop=window.open(escapeZoomURL(a),e,j+",width="+g+",height="+c+",left="+b+",top="+d);if(h){winpop.w=h}winpop.focus();return false}function ddtabcontent(a){this.tabinterfaceid=a;this.tabs=document.getElementById(a).getElementsByTagName("a");this.enabletabpersistence=true;this.hottabspositions=[];this.subcontentids=[];this.revcontentids=[];this.selectedClassTarget="link"}ddtabcontent.getCookie=function(a){var b=new RegExp(a+"=[^;]+","i");if(document.cookie.match(b)){return document.cookie.match(b)[0].split("=")[1]}return""};ddtabcontent.setCookie=function(a,b){document.cookie=a+"="+b+";path=/"};ddtabcontent.prototype={expandit:function(c){this.cancelautorun();var a="";try{if(typeof c=="string"&&document.getElementById(c).getAttribute("rel")){a=document.getElementById(c)}else{if(parseInt(c)!=NaN&&this.tabs[c].getAttribute("rel")){a=this.tabs[c]}}}catch(b){alert("Invalid Tab ID or position entered!")}if(a!=""){this.expandtab(a)}},setpersist:function(a){this.enabletabpersistence=a},setselectedClassTarget:function(a){this.selectedClassTarget=a||"link"},getselectedClassTarget:function(a){return(this.selectedClassTarget==("linkparent".toLowerCase()))?a.parentNode:a},expandtab:function(c){var b=c.getAttribute("rel");var a=(c.getAttribute("rev"))?","+c.getAttribute("rev").replace(/\s+/,"")+",":"";this.expandsubcontent(b);this.expandrevcontent(a);for(var d=0;d<this.tabs.length;d++){this.getselectedClassTarget(this.tabs[d]).className=(this.tabs[d].getAttribute("rel")==b)?"selected":""}if(this.enabletabpersistence){ddtabcontent.setCookie(this.tabinterfaceid,c.tabposition)}},expandsubcontent:function(a){for(var c=0;c<this.subcontentids.length;c++){var b=document.getElementById(this.subcontentids[c]);b.style.display=(b.id==a)?"block":"none"}},expandrevcontent:function(a){var b=this.revcontentids;for(var c=0;c<b.length;c++){document.getElementById(b[c]).style.display=(a.indexOf(","+b[c]+",")!=-1)?"block":"none"}},autorun:function(){var b=this.automode_currentTabIndex;var a=this.hottabspositions;this.expandtab(this.tabs[a[b]]);this.automode_currentTabIndex=(b<a.length-1)?b+1:0},cancelautorun:function(){if(typeof this.autoruntimer!="undefined"){clearInterval(this.autoruntimer)}},init:function(a){var e=ddtabcontent.getCookie(this.tabinterfaceid);var d=true;this.automodeperiod=a||0;for(var b=0;b<this.tabs.length;b++){this.tabs[b].tabposition=b;if(this.tabs[b].getAttribute("rel")){var c=this;this.hottabspositions[this.hottabspositions.length]=b;this.subcontentids[this.subcontentids.length]=this.tabs[b].getAttribute("rel");this.tabs[b].onclick=function(){c.expandtab(this);c.cancelautorun();return false};if(this.tabs[b].getAttribute("rev")){this.revcontentids=this.revcontentids.concat(this.tabs[b].getAttribute("rev").split(/\s*,\s*/))}if(this.enabletabpersistence&&parseInt(e)==b||!this.enabletabpersistence&&this.getselectedClassTarget(this.tabs[b]).className=="selected"){this.expandtab(this.tabs[b]);d=false;this.automode_currentTabIndex=(b>0)?0:1}}}if(d){this.expandtab(this.tabs[this.hottabspositions[0]])}if(parseInt(this.automodeperiod)>500&&this.hottabspositions.length>1){this.automode_currentTabIndex=this.automode_currentTabIndex||0;this.autoruntimer=setInterval(function(){c.autorun()},this.automodeperiod)}}};