| Contact information | |
| P.O.BOX: | 1859 Taipei Taiwan |
| City: | Songshan District, Taipei City |
| Country: | Taiwan |
| Zip Code: | 105 |
| E-mail: | Maylis |
| Tel: | 886-2-25148381 |
| Fax: | 886-2-27193891 |
function CheckForm () { //Initialise variables var errorMsg = ""; if (document.form.company.value.replace(/ /g,"") == "") { document.form.company.value=""; document.form.company.focus(); errorMsg += "Please enter your company name."; } else if(document.form.title.value.replace(/ /g,"")=="") { document.form.title.value=""; document.form.title.focus(); errorMsg += "Please enter your title."; } else if(document.form.firstname.value.replace(/ /g,"")=="") { document.form.firstname.value=""; document.form.firstname.focus(); errorMsg += "Please enter your first name."; } else if(document.form.lastname.value.replace(/ /g,"")=="") { document.form.lastname.value=""; document.form.lastname.focus(); errorMsg += "Please enter your last name."; } else if(document.form.email.value.replace(/ /g,"")=="") { document.form.email.value=""; document.form.email.focus(); errorMsg += "Please enter your email."; } else if (emailvalidation(document.form.email,"")==false){ document.form.email.focus(); errorMsg += "E-mail should be of the form yourname@yourdomain.com"; } else if(document.form.product.value.replace(/ /g,"")=="") { document.form.product.value=""; document.form.product.focus(); errorMsg += "Please enter your interesting product."; } //If there is a problem with the form then display an error if (errorMsg != ""){ msg = "" errorMsg += alert(msg + errorMsg + "\n\n"); return false; } return true; } function emailvalidation(entered, alertbox) { // E-mail Validation by Henrik Petersen / NetKontoret // Explained at www.echoecho.com/jsforms.htm // Please do not remove this line and the two lines above. with (entered) { apos=value.indexOf("@"); dotpos=value.lastIndexOf("."); lastpos=value.length-1; if (apos<1 || dotpos-apos<2 || lastpos-dotpos>3 || lastpos-dotpos<2) { if (alertbox) { alert(alertbox); } return false; } else { return true; } } }