var DH=0,an=0,al=0,ai=0;if(document.getElementById)DH=ai=1;else if(document.all)DH=al=1;else{browserVersion=parseInt(navigator.appVersion);if(navigator.appName.indexOf("Netscape")!=-1&&browserVersion==4)DH=an=1}function fd(a,b){if(ai)return b?document.getElementById(a).style:document.getElementById(a);if(al)return b?document.all[a].style:document.all[a];if(an)return document.layers[a]}
function pw(){return window.innerWidth!=null?window.innerWidth:document.body.clientWidth!=null?document.body.clientWidth:null}function mouseX(a){return a.pageX?a.pageX:a.clientX?a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft):null}function mouseY(a){return a.pageY?a.pageY:a.clientY?a.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop):null}
function popUp(a,b){if(DH){var f=pw();ds=fd(b,1);dm=fd(b,0);st=ds.visibility;if(dm.offsetWidth)ew=dm.offsetWidth;else if(dm.clip.width)ew=dm.clip.width;if(st=="visible"||st=="show")ds.visibility="hidden";else{tv=mouseY(a)+20;lv=mouseX(a)-ew/4;if(lv<2)lv=2;else if(lv+ew>f)lv-=ew/2;if(!an){lv+="px";tv+="px"}ds.left=lv;ds.top=tv;ds.visibility="visible"}}}function formrule(a){if(a.defaultValue==a.value)a.value=""}function formrule2(a){if(a.value=="")a.value=a.defaultValue}
function MM_findObj(a,b){var f,e;b||(b=document);if((f=a.indexOf("?"))>0&&parent.frames.length){b=parent.frames[a.substring(f+1)].document;a=a.substring(0,f)}if(!(e=b[a])&&b.all)e=b.all[a];for(f=0;!e&&f<b.forms.length;f++)e=b.forms[f][a];for(f=0;!e&&b.layers&&f<b.layers.length;f++)e=MM_findObj(a,b.layers[f].document);if(!e&&b.getElementById)e=b.getElementById(a);return e}
function YY_checkform(){var a=YY_checkform.arguments,b=true,f=b="",e=false,i,d,h,c,g;for(g=1;g<a.length;g+=4){if(a[g+1].charAt(0)=="#"){i=true;a[g+1]=a[g+1].substring(1)}else i=false;d=MM_findObj(a[g].replace(/\[\d+\]/ig,""));h=MM_findObj(a[g+1].replace(/\[\d+\]/ig,""));b=d.value;c=a[g+2];if(d.type=="text"||d.type=="password"||d.type=="hidden"){if(i&&b.length==0)e=true;if(b.length>0)if(c==1){c=a[g+1].split("_");if(isNaN(b)||b<c[0]/1||b>c[1]/1)e=true}else if(c==2){d=/^[\w.=-]+@[\w\.-]+\.[a-zA-Z]{2,4}$/;
d.test(b)||(e=true)}else if(c==3){c=a[g+1].split("#");if(b=b.match(c[0])){d=b[c[1]]?b[c[1]]:1;h=b[c[2]]-1;b=b[c[3]];c=new Date(b,h,d);if(c.getFullYear()!=b||c.getDate()!=d||c.getMonth()!=h)e=true}else e=true}else if(c==4){c=a[g+1].split("#");(b=b.match(c[0]))||(e=true)}else if(c==5){if(h.length)h=h[a[g+1].replace(/(.*\[)|(\].*)/ig,"")];h.checked||(e=true)}else if(c==6)if(b!=MM_findObj(a[g+1]).value)e=true}else if(!d.type&&d.length>0&&d[0].type=="radio"){b=a[g].match(/(.*)\[(\d+)\].*/i);o2=d.length>
1?d[b[2]]:d;if(c==1&&o2&&o2.checked&&h&&h.value.length/1==0)e=true;if(c==2){b=false;for(h=0;h<d.length;h++)b=b||d[h].checked;b||(f+="* "+a[g+3]+"\n")}}else if(d.type=="checkbox"){if(c==1&&d.checked==false||c==2&&d.checked&&h&&h.value.length/1==0)e=true}else if(d.type=="select-one"||d.type=="select-multiple"){if(c==1&&d.selectedIndex/1==0)e=true}else if(d.type=="textarea")if(b.length<a[g+1])e=true;if(e){f+="* "+a[g+3]+"\n";e=false}}f!=""&&alert("The required information is incomplete or contains errors:\t\t\t\t\t\n\n"+
f);document.MM_returnValue=f==""};
