//Validating the newsletter Form



function validate_newsletterform ()

{

    valid = true;

	var emailPat=/^(.+)@(.+)\.(.+)$/;



    if ( document.newsletter.name.value == "Enter Your Email Address" )

    {

        alert ( "Please enter your Name" );

		document.newsletter.email.focus();

        valid = false;

    }

	

    else if ( document.newsletter.email.value == "Enter Your Email Address*" )

    {

        alert ( "Please enter your Email Address" );

		document.newsletter.email.focus();

        valid = false;

    }

	else if (document.newsletter.email.value.search(emailPat)==-1)

  	{

    alert ( "Please enter a valid Email Address" );

	document.newsletter.email.focus();

    valid = false;

 	}

      
else if ( document.newsletter.security_code.value == "")
    {
        alert ( "Please enter Security Code" );
        valid = false;
    }
	

   

	

    return valid;

   

}





//Validating the index Form



function validate_contactform ()

{

    valid = true;

	var emailPat=/^(.+)@(.+)\.(.+)$/;



    if ( document.contact.fname.value == "" )

    {

        alert ( "Please enter your First Name" );

		document.contact.fname.focus();

        valid = false;

    }

	else if ( document.contact.lname.value == "")

    {

        alert ( "Please enter your Last Name" );

		document.contact.lname.focus();

        valid = false;

    }

    else if ( document.contact.email.value == "Email" )

    {

        alert ( "Please enter your Email Address" );

		document.contact.email.focus();

        valid = false;

    }

	else if (document.contact.email.value.search(emailPat)==-1)

  	{

    alert ( "Please enter a valid Email Address" );

	document.contact.email.focus();

        valid = false;

 	}

	else if ( document.contact.phone.value == "")

    {

        alert ( "Please enter your Phone Number" );

		document.contact.phone.focus();

        valid = false;

    }

	else if (document.contact.comments.value == "" )

    {

        alert ( "Please enter your Comments/Questions" );

		document.contact.comments.focus();

        valid = false;

    }
	
	else if ( document.contact.security_code.value == "")
    {
        alert ( "Please enter Security Code" );
        valid = false;
    }

	

    return valid;

   

}



//Validating the buying Form



function validate_buyingform ()

{

    valid = true;

	var emailPat=/^(.+)@(.+)\.(.+)$/;



    if (document.buying.fname.value == "" )

    {

        alert ("Please enter your First Name" );

		document.buying.fname.focus();

        valid = false;

    }

    else if (document.buying.email.value == "" )

    {

        alert ( "Please enter your Email Address" );

		document.buying.email.focus();

        valid = false;

    }

	else if (document.buying.email.value.search(emailPat)==-1)

  	{

		alert ( "Please enter a valid Email Address" );

		document.buying.email.focus();

        valid = false;

 	}

	else if (document.buying.phone.value == "")

    {

        alert ( "Please enter your Phone Number" );

		document.buying.phone.focus();

        valid = false;

    }

	else if (document.buying.comments.value == "" )

    {

        alert ( "Please enter your Comments/Questions" );

		document.buying.comments.focus();

        valid = false;

    }
	
	else if ( document.buying.security_code.value == "")
    {
        alert ( "Please enter Security Code" );
        valid = false;
    }

	

    return valid;

   

}



//Validating the buying Form



function validate_sellingform ()

{

    valid = true;

	var emailPat=/^(.+)@(.+)\.(.+)$/;



    if (document.selling.fname.value == "" )

    {

        alert ("Please enter your First Name" );

		document.selling.fname.focus();

        valid = false;

    }

    else if (document.selling.email.value == "" )

    {

        alert ( "Please enter your Email Address" );

		document.selling.email.focus();

        valid = false;

    }

	else if (document.selling.email.value.search(emailPat)==-1)

  	{

		alert ( "Please enter a valid Email Address" );

		document.selling.email.focus();

        valid = false;

 	}

	else if (document.selling.phone.value == "")

    {

        alert ( "Please enter your Phone Number" );

		document.selling.phone.focus();

        valid = false;

    }

	else if (document.selling.comments.value == "" )

    {

        alert ( "Please enter your Comments/Questions" );

		document.selling.comments.focus();

        valid = false;

    }
	
	
	else if ( document.selling.security_code.value == "")
    {
        alert ( "Please enter Security Code" );
        valid = false;
    }

	

    return valid;

   

}

