<!-- hide me

function checkEmail(objName)
{
	var emailfield = objName;
	if(objName.value!="") {
		if (isEmailAddr(objName.value) == false)
		{
			emailfield.select();
			emailfield.focus();
			alert("Please enter a valid email address");
			return false;
		}
		else
		{
			return true;
		}
	} else {
	return true;
	}
}
function isEmailAddr(email)
{
	
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}
	
function verify_signin() {

	if (document.form1.strEmail.value == ""){
		alert ("You Must Enter an Email Address");
		document.form1.strEmail.focus();
		return;
	}
	
	if (document.form1.strPassword.value == ""){
		alert ("You Must Enter a Password");
		document.form1.strPassword.focus();
		return;
	}
		
	document.form1.submit()		
}

function verify_qty(theform) {

	if (theform.intProductQty.value == ""){
		alert ("You Must Enter an Quantity");
		theform.intProductQty.focus();
		return;
	}
	
	if (theform.intProductQty.value == "0"){
		alert ("Quantity can not be 0");
		theform.intProductQty.focus();
		return;
	}
		
	theform.submit()	
}

function verify_register() {
	if (document.form1.strFirstName.value == ""){
		alert ("You Must Enter your First Name");
		document.form1.strFirstName.focus();
		return;
	}
	
	if (document.form1.strLastName.value == ""){
		alert ("You Must Enter your Last Names");
		document.form1.strLastName.focus();
		return;
	}
	
	if (document.form1.strEmail.value == ""){
		alert ("You Must Enter an Email Address");
		document.form1.strEmail.focus();
		return;
	}
	
	if (document.form1.strAddress1.value == ""){
		alert ("You Must Enter a Billing Address");
		document.form1.strAddress1.focus();
		return;
	}
	
	if (document.form1.strSuburb1.value == ""){
		alert ("You Must Enter a Suburb");
		document.form1.strSuburb1.focus();
		return;
	}
	
	if (document.form1.strPostCode1.value == ""){
		alert ("You Must Enter a Post Code");
		document.form1.strPostCode1.focus();
		return;
	}
	
	if (document.form1.strCompanyName.value == ""){
		alert ("You Must Enter a Company Name");
		document.form1.strCompanyName.focus();
		return;
	}

	if (document.form1.strPassword1.value == ""){
		alert ("You Must Enter a Password");
		document.form1.strPassword1.focus();
		return;
	}
	
	if (document.form1.strPassword2.value == ""){
		alert ("You Must Confirm Your Password");
		document.form1.strPassword2.focus();
		return;
	}
	
	if (document.form1.strPassword1.value !=  document.form1.strPassword2.value){
		alert ("Your Passwords Do Not Match");
		document.form1.strPassword1.focus();
		return;
	}
		
	document.form1.submit()		
}

function checkNumeric(objName,minval, maxval,comma,period,hyphen,space)
{
	var numberfield = objName;
	if (chkNumeric(objName,minval,maxval,comma,period,hyphen,space) == false)
	{
		numberfield.select();
		numberfield.focus();
		return false;
	}
	else
	{
		return true;
	}
}

function chkNumeric(objName,minval,maxval,comma,period,hyphen,space)
{
// only allow 0-9 be entered, plus any values passed
// (can be in any order, and don't have to be comma, period, or hyphen)
// if all numbers allow commas, periods, hyphens or whatever,
// just hard code it here and take out the passed parameters
var checkOK = "0123456789" + comma + period + hyphen + space;
var checkStr = objName;
var allValid = true;
var decPoints = 0;
var allNum = "";

for (i = 0;  i < checkStr.value.length;  i++)
{
ch = checkStr.value.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{	
alertsay = "Please enter only these values \""
//alertsay = alertsay + checkOK + "\" in the \"" + checkStr.name + "\" field."
alertsay = alertsay + checkOK + "\" in this field."
alert(alertsay);
return (false);
}
}
unhide me -->