<!--
function pw(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth};function mouseX(evt){return evt.clientX?evt.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft):evt.pageX;}function mouseY(evt){return evt.clientY?evt.clientY+(document.documentElement.scrollTop||document.body.scrollTop):evt.pageY}function popUp(evt,oi){if(document.getElementById){var wp=pw();dm=document.getElementById(oi);ds=dm.style;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(evt)+ 20;lv=mouseX(evt)-(ew/4);if(lv<2)lv=2;else if(lv+ ew>wp)lv-=ew/2;lv+='px';tv+='px';ds.left=lv;ds.top=tv;ds.visibility="visible";}}}
function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage;}}
else if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH)location.reload();}
MM_reloadPage(true);function MM_findObj(n,d){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_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v=='hide')?'hidden':v;}
obj.visibility=v;}}
function MM_preloadImages(){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_swapImage(){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_swapImgRestore(){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_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function toggleDiv(divid){if(document.getElementById(divid).style.display=='none'){document.getElementById(divid).style.display='block';}else{document.getElementById(divid).style.display='none';}}
function hideDiv(divid){document.getElementById(divid).style.display='none';}
function showDiv(divid){document.getElementById(divid).style.display='block';}
function cleanUpCreditCardNo(myValue){myValue=myValue.replace(/[^0-9]+/g,'');return myValue;}
function alphaNumericize(myValue){myValue=myValue.replace(/[^0-9a-z]+/g,'');return myValue;}
function showProperStateSelector()
{hideDiv('stateUSA');hideDiv('stateCanada');hideDiv('stateWritein');currentCountry=document.getElementById('selectCountry').value;if(currentCountry=='US'){showDiv('stateUSA');}else if(currentCountry=='CA'){showDiv('stateCanada');}else{showDiv('stateWritein');}}
function formatCurrency(amount)
{var i=parseFloat(amount);if(isNaN(i)){i=0.00;}
var minus='';if(i<0){minus='-';}
i=Math.abs(i);i=parseInt((i+.005)*100);i=i/100;s=new String(i);if(s.indexOf('.')<0){s+='.00';}
if(s.indexOf('.')==(s.length- 2)){s+='0';}
s=minus+ s;return s;}
function updateSearchMenu(action)
{showDiv('eventsClosed');hideDiv('eventsOpen');showDiv('teachersClosed');hideDiv('teachersOpen');showDiv('centersClosed');hideDiv('centersOpen');showDiv('searchClosed');hideDiv('searchOpen');if(action=='showEventSearch'){hideDiv('eventsClosed');showDiv('eventsOpen');return(false);}else if(action=='showTeacherSearch'){hideDiv('teachersClosed');showDiv('teachersOpen');}else if(action=='showCenterSearch'){hideDiv('centersClosed');showDiv('centersOpen');}else if(action=='showSearchSearch'){hideDiv('searchClosed');showDiv('searchOpen');}}
function getCheckedValue(radioObj){if(!radioObj)
return"";var radioLength=radioObj.length;if(radioLength==undefined)
if(radioObj.checked)
return radioObj.value;else
return"";for(var i=0;i<radioLength;i++){if(radioObj[i].checked){return radioObj[i].value;}}
return"";}
function setCheckedValue(radioObj,newValue){if(!radioObj)
return;var radioLength=radioObj.length;if(radioLength==undefined){radioObj.checked=(radioObj.value==newValue.toString());return;}
for(var i=0;i<radioLength;i++){radioObj[i].checked=false;if(radioObj[i].value==newValue.toString()){radioObj[i].checked=true;}}}
function urlencode(str){str=(str+'').toString();return encodeURIComponent(str).replace(/!/g,'%21').replace(/'/g,'%27').replace(/\(/g,'%28').replace(/\)/g,'%29').replace(/\*/g,'%2A').replace(/%20/g,'+');}
