function main()
{
var name = frm.name.value
var address = frm.address.value
var city = frm.city.value
var country = frm.country.value
var zip = frm.zip.value
var email = frm.email.value
var phone = frm.phone.value
if (name=="")
{
alert("Please enter your name")
frm.name.focus()
}
else if (address=="")
{
alert("Please enter your Address")
frm.address.focus()
}
else if (city=="")
{
alert("Please enter the name of the City")
frm.city.focus()
}
else if (country=="")
{
alert("Please select your country")
frm.country.focus()
}
else if (zip=="")
{
alert("Please enter your Zip Code")
frm.zip.focus()
}
else if (email=="")
{
alert("Please enter your email address")
frm.email.focus()
}
else if (phone=="")
{
alert("Please enter your phone number")
frm.phone.focus()
}
else 
{
frm.method = "Post"
frm.action = "http://www.chyk.net/123/send.asp"
frm.submit()
}
}
function checkEmail() {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(frm.email.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
frm.email.focus()
return (false)
}
/**
 * DHTML phone number validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

// Declaring required variables
var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

function ValidateForm(){
	var Phone=document.frm.phone
	
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please Enter your Phone Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Phone Number with the Area Code")
		Phone.value=""
		Phone.focus()
		return false
	}
	return true
 }
 /**
 * DHTML phone number validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

// Declaring required variables
var digits1 = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters1 = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars1 = phoneNumberDelimiters1 + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber1 = 10;

function isInteger1(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag1(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function checkInternationalPhone1(strPhone){
s=stripCharsInBag1(strPhone,validWorldPhoneChars1);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber1);
}

function ValidateForm1(){
	var fax=document.frm.fax
	
	if ((fax.value==null)||(fax.value=="")){
		alert("Please Enter your Fax number")
		fax.focus()
		return false
	}
	if (checkInternationalPhone1(fax.value)==false){
		alert("Please Enter a Valid fax Number with the Area Code")
		fax.value=""
		fax.focus()
		return false
	}
	return true
 }