var glSwap1=0,glSwap2=1,glSwapM1=0,glSwapM2=0,glTimer=0;
var glCities=0, gsSel='1';
function btnFF(theBtn){if(theBtn.className=='btnf') theBtn.className='btn';if(theBtn.className=='btnfh') theBtn.className='btnh';if(theBtn.className=='btnfp') theBtn.className='btnp';}
function btnFM(theBtn){if(theBtn.className=='btnh') theBtn.className='btn';if(theBtn.className=='btnfh') theBtn.className='btnf';}
function btnFP(theBtn){if(theBtn.className=='btnp') theBtn.className='btn';if(theBtn.className=='btnfp') theBtn.className='btnf';}
function btnOF(theBtn){if(theBtn.className=='btn') theBtn.className='btnf';if(theBtn.className=='btnh') theBtn.className='btnfh';if(theBtn.className=='btnp') theBtn.className='btnfp';}
function btnOM(theBtn){if(theBtn.className=='btn') theBtn.className='btnh';if(theBtn.className=='btnf') theBtn.className='btnfh';}
function btnOP(theBtn){if(theBtn.className=='btnh') theBtn.className='btnp';if(theBtn.className=='btnfh') theBtn.className='btnfp';}
function checkTab(theKey){var oTab=document.getElementById('TB'+theKey);if(gsSel==theKey){oTab.className='tab_f';}else{oTab.className='tab_b';}}
function goTo(thePlace){document.location=thePlace;}
function loadCities(theChoice,theDefault){var ix=theChoice.selectedIndex;var theState=theChoice.options[ix].value;glCities=0;document.frmUpdate.mbr_city.options.length=0;if(theState==''){document.frmUpdate.mbr_city.options[0]=new Option('Select state first','');}else{window.fmeCitiesS.document.location.replace('loadcities.php?state='+theState+'&dft='+theDefault);}}
function loadCity(theCode,theName,isDft){if(isDft=='Y'){document.frmUpdate.mbr_city.options[glCities]=new Option(theName,theCode,true,true);}else{document.frmUpdate.mbr_city.options[glCities]=new Option(theName,theCode);}glCities++;}
function setTab(theKey){if(gsSel!=theKey){document.getElementById('TB'+gsSel).className='tab_b';document.getElementById('PG'+gsSel).className='hidden';document.getElementById('TB'+theKey).className='tab_f';document.getElementById('PG'+theKey).className='shown';gsSel=theKey;}}
function startSwap(){stopSwap();glTimer=setInterval("swapMsg()",750);}
function stopSwap(){if(glTimer!=0){clearInterval(glTimer);glTimer=0;}}
function swapMsg(){var lcObj;if(glSwap1==1){glSwap1=0;glSwap2=1;lcObj=document.getElementById('swap1');if(glSwapM1==1){glSwapM1=0;lcObj.innerHTML='Sign In';}else{glSwapM1=1;lcObj.innerHTML='Sign Up';}}else{glSwap1=1;glSwap2=0;lcObj=document.getElementById('swap2');if(glSwapM2==1){glSwapM2=0;lcObj.innerHTML='What Can I Do?';}else{glSwapM2=1;lcObj.innerHTML='How Can I Help?';}}}
function verifyForm(theForm) {var isGood=true;for (i=theForm.elements.length-1; i>-1; i--) {var theObj=theForm.elements[i];var theClass=theObj.className;var newClass=theClass;if (theClass=='err') newClass='req';if (theClass=='req' || theClass=='err') {if (theObj.value=='') {newClass='err';theObj.focus();isGood=false;}}if (newClass!=theClass) theObj.className=newClass;}if (isGood==true) return true;setError('Some required information is missing.');return false;}

