function MM_preloadImages() { //v3.0  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}}function MM_swapImgRestore() { //v3.0  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;}function MM_findObj(n, d) { //v4.01  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_swapImage() { //v3.0  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}}function MM_jumpMenu(targ,selObj,restore){ //v3.0  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");  if (restore) selObj.selectedIndex=0;}function MM_openBrWindow(theURL,winName,features) { //v2.0  window.open(theURL,winName,features);}function Lvl_openWin(u,n,w,h,l,t,c,f) { //v1.0 4LevelWebs  var ww=((screen.width-w)/2);if(c==1){l=ww;t=(screen.height-h)/2;}if(c==2){l=ww}	f+=',top='+t+',left='+l;LvlWin = window.open(u,n,f);LvlWin.focus();}function MM_validateForm() { //v4.0  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);    if (val) { nm=val.id; if ((val=val.value)!="") {      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');        if (p<1 || p==(val.length-1)) errors+='> The "'+nm+'" field must contain an e-mail address.\n';      } else if (test!='R') { num = parseFloat(val);        if (isNaN(val)) errors+='> The "'+nm+'" field must contain a number.\n';        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');          min=test.substring(8,p); max=test.substring(p+1);          if (num<min || max<num) errors+='> The "'+nm+'" field must contain a number between '+min+' and '+max+'.\n';    } } } else if (test.charAt(0) == 'R') errors+='> The "'+nm+'" field is required.\n'; }  } if (errors) alert('Oops, you missed something we need:\n'+errors);  document.MM_returnValue = (errors == '');}function YY_checkform() { //v4.65//copyright (c)1998,2002 Yaromat.com  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;  for (var i=1; i<args.length;i=i+4){    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}    var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));    myV=myObj.value;    if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){      if (myReq&&myObj.value.length==0){addErr=true}      if ((myV.length>0)&&(args[i+2]==1)){ //fromto        var myMa=args[i+1].split('_');if(isNaN(parseInt(myV))||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}      } else if ((myV.length>0)&&(args[i+2]==2)){          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;      } else if ((myV.length>0)&&(args[i+2]==3)){ // date        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);        if(myAt){          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];          var myDate=new Date(myY,myM,myD);          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};        }else{addErr=true}      } else if ((myV.length>0)&&(args[i+2]==4)){ // time        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}      } else if (myV.length>0&&args[i+2]==5){ // check this 2            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];            if(!myObj1.checked){addErr=true}      } else if (myV.length>0&&args[i+2]==6){ // the same            var myObj1 = MM_findObj(args[i+1]);            if(myV!=myObj1.value){addErr=true}      }    } else    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;      if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}      if (args[i+2]==2){        var myDot=false;        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}        if(!myDot){myErr+='> ' +args[i+3]+'\n'}      }    } else if (myObj.type=='checkbox'){      if(args[i+2]==1&&myObj.checked==false){addErr=true}      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}    } else if (myObj.type=='select-one'||myObj.type=='select-multiple'){      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}    }else if (myObj.type=='textarea'){      if(myV.length<args[i+1]){addErr=true}    }    if (addErr){myErr+='> '+args[i+3]+'\n'; addErr=false}  }  if (myErr!=''){alert('Required fields are marked with a *.\nPlease correct the form and resubmit.\t\t\t\t\t\n\n'+myErr)}  document.MM_returnValue = (myErr=='');}function placeFocus() {if (document.forms.length > 0) {var field = document.forms[0];for (i = 0; i < field.length; i++) {if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {document.forms[0].elements[i].focus();break;         }      }   }}//  // ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||// // Coded by Travis Beckham// http://www.squidfingers.com | http://www.podlob.com// If want to use this code, feel free to do so, but please leave this message intact.//// ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||// --- version date: 02/04/03 ---------------------------------------------------------/*If you use a DOCTYPE that puts Explorer 6 in standards compliant mode, some properties of document.body are reassigned to document.documentElement. In Explorer 5 the properties still belong to document.body. Checking if the documentElement exists is not enough, since it exists in all W3C DOM compatible browsers, so we also have to see if it has the property we are trying to access.For more info on this topic visit http://www.xs4all.nl/~ppk/js/doctypes.html*/var ScrollWin = {	w3c : document.getElementById,	iex : document.all,	scrollLoop : false, 	scrollInterval : null, // setInterval id	currentBlock : null,   // object reference	getWindowHeight : function(){		if(this.iex) return (document.documentElement.clientHeight) ? document.documentElement.clientHeight : document.body.clientHeight;		else return window.innerHeight;	},	getScrollLeft : function(){		if(this.iex) return (document.documentElement.scrollLeft) ? document.documentElement.scrollLeft : document.body.scrollLeft;		else return window.pageXOffset;	},	getScrollTop : function(){		if(this.iex) return (document.documentElement.scrollTop) ? document.documentElement.scrollTop : document.body.scrollTop;		else return window.pageYOffset;	},	getElementYpos : function(el){		var y = 0;		while(el.offsetParent){			y += el.offsetTop			el = el.offsetParent;		}		return y;	},	scroll : function(num){		if(!this.w3c){			location.href = "#"+this.anchorName+num;			return;		}		if(this.scrollLoop){			clearInterval(this.scrollInterval);			this.scrollLoop = false;			this.scrollInterval = null;		}		if(this.currentBlock != null) this.currentBlock.className = this.offClassName;		this.currentBlock = document.getElementById(this.blockName+num);		this.currentBlock.className = this.onClassName;		var doc = document.getElementById(this.containerName);		var documentHeight = this.getElementYpos(doc) + doc.offsetHeight;		var windowHeight = this.getWindowHeight();		var ypos = this.getElementYpos(this.currentBlock);		if(ypos > documentHeight - windowHeight) ypos = documentHeight - windowHeight;		this.scrollTo(0,ypos);	},	scrollTo : function(x,y){		if(this.scrollLoop){			var left = this.getScrollLeft();			var top = this.getScrollTop();			if(Math.abs(left-x) <= 1 && Math.abs(top-y) <= 1){				window.scrollTo(x,y);				clearInterval(this.scrollInterval);				this.scrollLoop = false;				this.scrollInterval = null;			}else{				window.scrollTo(left+(x-left)/2, top+(y-top)/2);			}		}else{			this.scrollInterval = setInterval("ScrollWin.scrollTo("+x+","+y+")",100);			this.scrollLoop = true;		}	}};// ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||/*using the following line, IE/PC returns an incorrect number when getting the document height.var document_height = document.all ? document.body.offsetHeight : window.document.height;To fix this problem, a container div is wrapped around the content so the correct height can be determined.*/// Edit these variablesScrollWin.containerName = "content"; // The id name of the div containing the contentScrollWin.anchorName    = "anchor";    // The alpha portion of the anchor namesScrollWin.blockName     = "block";     // The alpha portion of the content blocksScrollWin.onClassName   = "active";    // The CSS class name for the 'on' stateScrollWin.offClassName  = "visited";   // The CSS class name for the 'off' state// ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
