
function popUp(URL,width,height) {

var newWin = window.open(URL,"Picture","width=" + width + ",height=" + height + ",location=0,toolbars=0,resizable=1,scrollbars=1,statusbar=1");

newWin.focus();

//end function
}

function checkForm() {

if (document.registerForm.First_Name.value == "") {

alert("You have failed to fill out the following\n\n* First Name");

return false;
}


if (document.registerForm.Last_Name.value == "") {

alert("You have failed to fill out the following\n\n* Last Name");

return false;
}

if (document.registerForm.Gender.selectedIndex == 0) {

alert("You have failed to select the following\n\n* Gender");

return false;
}

if (document.registerForm._dob_month.selectedIndex == 0) {

alert("You have failed to fill out the following\n\n* Date Of Birth Month");

return false;
}

if (document.registerForm._dob_day.selectedIndex == 0) {

alert("You have failed to fill out the following\n\n* Date Of Birth Day");

return false;
}

if (document.registerForm._dob_year.selectedIndex == 0) {

alert("You have failed to fill out the following\n\n* Date Of Birth Year");

return false;
}

if (document.registerForm.Email.value == "") {

alert("You have failed to fill out the following\n\n* Email");

return false;
}




if (document.registerForm.Email.value.indexOf("@") == -1 || document.registerForm.Email.value.indexOf(".") == -1 || document.registerForm.Email.value.indexOf("www.") != -1) {

alert("Email address is invalid.");

return false;
}

if (document.registerForm._Confirm_Email.value == "") {

alert("You have failed to fill out the following\n\n* Email");

return false;
}

if (document.registerForm.Email.value != document.registerForm._Confirm_Email.value) {

alert("The two email addresses you entered don't match each other.");

return false;
}

if (document.registerForm.City.value == "") {

alert("You have failed to fill out the following\n\n* City");

return false;
}

if (document.registerForm.State.value == "" && document.registerForm.Country.options[document.registerForm.Country.selectedIndex].value == 246) {

alert("You have failed to fill out the following\n\n* State");

return false;
}

if (document.registerForm.Zip.value == "" && document.registerForm.Country.options[document.registerForm.Country.selectedIndex].value == 246) {

alert("You have failed to fill out the following\n\n* Zip/Postal Code");

return false;
}


if (document.registerForm.Country.options[document.registerForm.Country.selectedIndex].value == 246) {

//Validate Zip

var ZipReg = /^[0-9]{5}$/;

var Zip = document.registerForm.Zip.value
    
if (!Zip.match(ZipReg) && Zip != "") {

alert("Zip/Postal Code is invalid.");

return false;
}


}


if (document.registerForm.Country.selectedIndex == 0) {

alert("You have failed to select the following\n\n* Country");

return false;
}

if (document.registerForm.User_Name.value == "") {

alert("You have failed to fill out the following\n\n* User Name");

return false;
}


if (document.registerForm.User_Name.value.length < 6) {

alert("User Name should be at least 6 characters long.");

return false;
}


if (document.registerForm.Password.value == "") {

alert("You have failed to fill out the following\n\n* 16. Password");

return false;
}


if (document.registerForm.Password.value.length < 6) {

alert("Password should be at least 6 characters long.");

return false;
}


if (document.registerForm._Confirm_Password.value == "") {

alert("You have failed to fill out the following\n\n* Confirm Password");

return false;
}


if (document.registerForm.Password.value != document.registerForm._Confirm_Password.value) {

alert("The two passwords you entered don't match each other.");

return false;
}

//end function
}

