var workingWin; function showWorking() { x = screen.availWidth / 2 - 200; y = screen.availHeight / 2 - 50; workingWin = window.open("uploading.html", "uploading", "left=" + x + ",top=" + y + ",height=200,width=300,fullscreen=no,toolbar=no," + "status=no,menubar=no,scrollbars=no,resizable=no," + "directories=no,location=no"); } function clearWorking() { try { workingWin.close(); } catch (e) {} } function checkStart(){ var form = document.forms["frm"];           //define form var var errorMsg = ""; //var validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i; var validRegExp = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/; var strEmail = form.email.value; if(form.name.value.length < 2 || form.name.value=="")   errorMsg += "-name\n"; if(strEmail.search(validRegExp) == -1)   errorMsg += "-email\n"; if(form.phone.value.length < 7 || form.phone.value=="")   errorMsg += "-phone\n";          //check errorMsg if(errorMsg != ""){   alert("You have forgotten to fill out these form entries: \n" + errorMsg + "\nThese are needed before you can submit this form.");   return false; } elsereturn true;}//end check valid entries