function MM_reloadPage(init) { //reloads the window if Nav4 resized 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 loginSubmit(f) { var email; email=f.email.value; alert("email is "+email); //if (validEmail(email)) //{ // f.submit(); //} } function satFlyer() { newWindow=window.open("saturdayFlyer.html","","width=400,height=490,status=no,resizable=no,toolbar=no,scrollbars=no,location=no","","width=400,height=490 status=no,resizable=no,toolbar=no,scrollbars=no,location=no"); newWindow.focus(); } function thursFlyer() { newWindow=window.open("thursFlyer.html","","width=442,height=548,status=no,resizable=no,toolbar=no,scrollbars=no,location=no","","width=442,height=548 status=no,resizable=no,toolbar=no,scrollbars=no,location=no"); newWindow.focus(); } function emulator() { var tdate = new Date();//today's date var tmo=tdate.getMonth(); var tda=tdate.getDate(); var tyr=tdate.getFullYear(); var datez="tmo+"/"+tda+"/"+tyr"; newWindow=window.open('http://tagtag.com/cgi/wapemulator.cgi?O__SKIN=P1&O__OPTURL=http://tagtag.com/wapemulator/templates/opt1.wml&wurl=www.fourthring.com/wml/main3.wml&dummy=datez','newWin','toolbar=no,location=no,scrollbar=no,resizable=no,width=220,height=290'); newWindow.focus(); } function validEmail(f) { var email; email=f.email.value; // invalidChars = " /:,;" for (i=0; i -1) { alert("Sorry, please enter a valid email address."); return false } } atPos = email.indexOf("@",1) // there must be one "@" symbol if (atPos == -1) { alert("Sorry, please enter a valid email address."); return false } if (email.indexOf("@",atPos+1) != -1) { // and only one "@" symbol alert("Sorry, please enter a valid email address."); return false } periodPos = email.indexOf(".",atPos) if (periodPos == -1) { // and at least one "." after the "@" alert("Sorry, please enter a valid email address."); return false } if (periodPos+3 > email.length) {// must be at least 2 characters alert("Sorry, please enter a valid email address."); return false } return true } function contentChoicez(f) { var ac; var i; var cat; var actionPost; // get action choice for( i=0; i<2; ++i) { if( f.actionChoice[i].checked) ac=f.actionChoice[i].value; } // get category cat=f.action.value; // if Action is to Create: if (ac=="post") { actionPost='postpersonalsLogin.php?cat='+cat; } // Edit else { actionPost='searchAD.php?cat='+cat; } alert(" action post "+actionPost); f.action=actionPost; f.submit(); //return true; //window.location(actionPost); } function openNewReferWin(url) { screenName=referForm.screenName.value; email=referForm.email.value; url=url+"&email="+email+"&screenName="+screenName; //alert("url is "+url); cvWindow=window.open(url,'FourthRing','toolbar=no,location=no,scrollbars=no,resizable=no,width=455,height=350,screenX=10,screenY=20'); cvWindow.focus(); } function openNewWin(url) { //alert("going to.."+url); cvWindow=window.open(url,'FourthRing','toolbar=no,location=no,scrollbars=no,resizable=no,width=455,height=338,screenX=10,screenY=20'); cvWindow.focus(); } ////// javascript code for auto display of city based on country function cityDisp(myselector){ current_selector = myselector.options[myselector.selectedIndex].value; //alert("you chose "+current_selector); if (current_selector=='cn') { document.all.cityLabel.innerHTML = 'City/Province:'; document.all.cityInput.innerHTML= ''; } //only usa needs to input zipcode; if (current_selector=='us') { document.all.zipLabel.innerHTML = 'My Zipcode:'; document.all.zipInput.innerHTML = ''; } else { document.all.zipLabel.innerHTML = ''; document.all.zipInput.innerHTML = ''; } } // function to restrict any non-numeric key pressing function nn_Key() { if ((event.keyCode<48) || (event.keyCode>57)) event.keyCode = 0; } // function to restrict numeric function pp_Key(evt) { evt = (evt) ? evt : event; if (evt.keyCode==32) { return true; } var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0)); if (charCode > 31 && (charCode < 65 || charCode > 90) && (charCode < 97 || charCode > 122)) { event.keyCode=0; } }