function inputCounter(valObj,outObj){outObj.innerHTML=String(Number(valObj.getAttribute('MAXLENGTH'))-valObj.value.length);}function wPop(obj){window.open(obj.href,"RefreshWindow");return false;}function clock(){var today=new Date();var y=today.getFullYear();var j=today.getMonth();var d=today.getDate();var h=today.getHours();var m=today.getMinutes();var s=today.getSeconds();h=padTens(h);m=padTens(m);s=padTens(s);document.getElementById('clock').innerHTML=d+"<sup>"+numberLetters(d)+"</sup>"+theMonths(j)+y+" "+h+":"+m+":"+s;t=setTimeout('clock();',1000);}function padTens(i){if(i<10)i="0"+i;return i;}function numberLetters(i){var string='';switch(i){case 1:case 21:case 31:string='st ';break;case 2:case 22:string='nd ';break;case 3:case 23:string='rd ';break;default:string='th ';break;}return string;}function theMonths(i){var string='';switch(i){case(0):string='January ';break;case(1):string='February ';break;case(2):string='March ';break;case(3):string='April ';break;case(4):string='May ';break;case(5):string='June ';break;case(6):string='July ';break;case(7):string='August ';break;case(8):string='September ';break;case(9):string='October ';break;case(10):string='November ';break;case(11):string='December ';break;}return string;}function mailValidate(){var errs=true;document.getElementById('alertName').innerHTML='';document.getElementById('alertEMail').innerHTML='';document.getElementById('alertNumber').innerHTML='';document.getElementById('alertContent').innerHTML='';if(document.getElementById('mailName').value==''){errs=false;document.getElementById('alertName').innerHTML='Please enter your name.';}if(document.getElementById('mailEMail').value==''){errs=false;document.getElementById('alertEMail').innerHTML='Please enter your email.';}if(document.getElementById('mailNumber').value==''){errs=false;document.getElementById('alertNumber').innerHTML='Please enter your number.';}if(document.getElementById('mailContent').value==''){errs=false;document.getElementById('alertContent').innerHTML='Please enter a message.';}return errs;}function jRm(obj){createCookie(obj.name,obj.value,7);}function jLd(){document.getElementById("mailName").value=readCookie("mailName");document.getElementById("mailEMail").value=readCookie("mailEMail");document.getElementById("mailNumber").value=readCookie("mailNumber");document.getElementById("mailContent").value=readCookie("mailContent");}function jCl(obj){obj.getElementById("mailName").value='';obj.getElementById("mailEMail").value='';obj.getElementById("mailNumber").value='';obj.getElementById("mailContent").value='';eraseCookie("mailName");eraseCookie("mailEMail");eraseCookie("mailNumber");eraseCookie("mailContent");}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}else var expires="";value=value.replace(/\r\n/gi,"\r").replace(/\n/gi,"\r").replace(/\r/gi,"<br />");document.cookie=name+"="+value+expires+"; path=/";}function readCookie(name){var nameEQ=name+"=";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(nameEQ)==0)return c.substring(nameEQ.length,c.length).replace(/\<br \/\>/gi,"\r\n");}return"";}function eraseCookie(name){createCookie(name,"",-1);}function mnExp(obj){mnExpdr=obj.nextSibling;if(!mnExpdr.style.width){mnExpdr.style.width="0px";mnExpdr.style.borderRight="0";}mnTO=setTimeout("mnExp2();",35);}function mnExp2(){var cur=Number(mnExpdr.style.width.replace("px",""));var diff=mnGp(cur);var newWidth=cur+diff;if(newWidth<=mnMWdt){mnExpdr.style.width=newWidth+"px";mnMM(diff);mnTO=setTimeout("mnExp2();",35);}else{mnExpdr.style.width=mnMWdt+"px";mnExpdr.style.borderRight="1px solid #fff";mnExpdr.childNodes[0].style.display="inline";mnMM(diff);}}function mnGp(cur){var theDiff=(mnMWdt-(2*cur))/(0-mnMWdt);if(theDiff<=0){theDiff=theDiff+1;}else{theDiff=theDiff-1;}theDiff=theDiff*theDiff;theDiff=(15*theDiff)+2;return theDiff;}function mnMM(diff){var theNodes=mnExpdr.parentNode.childNodes;for(var i=0;i<theNodes.length;i++){if(theNodes[i].nodeName.toUpperCase()=="DIV"){if(theNodes[i]!=mnExpdr){theNodes[i].childNodes[0].style.display="none";if(!theNodes[i].style.width){theNodes[i].style.width="0px";theNodes[i].style.borderRight="0";}else{var thisWidth=Number(theNodes[i].style.width.replace("px",""));if(thisWidth-diff>=0){var thisNew=thisWidth-diff;theNodes[i].style.width=thisNew+"px";}else{theNodes[i].style.width="0px";theNodes[i].style.borderRight="0";}}}}}}function flashFader(){var theName="";var padTp=0;var padLt=0;var padRt=0;switch(theAd){case 1:theName="fBk1";if(theOpaq==0)theAd=2;padTp=25+2*theOpaq;padRt=30+(100-theOpaq)*(100-theOpaq)/40;break;case 2:theName="fBk2";if(theOpaq==0)theAd=3;padTp=225-2*theOpaq;padLt=25+theOpaq*theOpaq/32;break;case 3:theName="fBk3";if(theOpaq==0)theAd=4;padTp=25+2*theOpaq;padRt=50+(50-theOpaq)*(50-theOpaq)/8;break;case 4:theName="fBk4";if(theOpaq==0)theAd=5;padTp=215-2*theOpaq;padLt=25+(100-theOpaq)*(100-theOpaq)/25;break;case 5:theName="fBk5";if(theOpaq==0)theAd=6;padTp=42+2*theOpaq;padRt=80+theOpaq*theOpaq/40;break;case 6:theName="fBk6";if(theOpaq==0)theAd=1;padTp=205-2*theOpaq;padLt=75+(50-theOpaq)*(50-theOpaq)/8;break;}theObj=document.getElementById(theName);if(theOpaq==0){theObj.style.display="none";document.getElementById("flashDiv").style.background="url(/resources/"+theName+".jpg) top left no-repeat transparent";}else{theObj.style.display="block";theObj.childNodes[0].style.paddingTop=padTp+"px";if(padLt!=0)theObj.childNodes[0].style.paddingLeft=padLt+"px";if(padRt!=0)theObj.childNodes[0].style.paddingRight=padRt+"px";}setOpacity(theObj,theOpaq);theOpaq+=1;if(theOpaq==100){theOpaq=0;setTimeout("flashFader()",835);}else{setTimeout("flashFader()",35);}}function setOpacity(obj,value){obj.style.opacity=value/100;obj.style.filter="alpha(opacity="+value+")";}var mnExpdr=null;var mnMWdt=200;var theOpaq=0;var theAd=6;
