/******************************************************************************
* functions.js								      *
*                                                                             *
* Copyright 2006 by vikarta.com				      *
* Visit http://www.vikarta.com					      *
*                                                                             *
* Provides functions for the website which will work on both Netscape	      *
* Communicator and Internet Explorer browsers (version 5.5 and up).  	      *
*									      *
******************************************************************************/

function support()
{
	if(document.FormSupport.cname_tx.value==''){
    document.FormSupport.cname_tx.focus();
    alert("Please make sure Contact Name is not left blank");
   	return false;
    }
	if (window.document.FormSupport.cemail_tx.value.indexOf('.')=="-1" || window.document.FormSupport.cemail_tx.value.indexOf('@')=="-1")
	{
	alert("Please enter your Contact Email properly!")
	window.document.FormSupport.cemail_tx.focus();
	return false;
	}
	if(document.FormSupport.phone_tx.value==''){
    document.FormSupport.phone_tx.focus();
    alert("Please make sure Phone is not left blank");
   	return false;
    }
	if(document.FormSupport.dname_tx.value==''){
    document.FormSupport.dname_tx.focus();
    alert("Please make sure Domain Name is not left blank");
   	return false;
    }
	if(document.FormSupport.type.value==''){
    document.FormSupport.type.focus();
    alert("Please make sure Type of Problem is not left blank");
   	return false;
    }
		if(document.FormSupport.description.value==''){
    document.FormSupport.description.focus();
    alert("Please make sure Describe Problem Details is not left blank");
   	return false;
    }
	if(document.FormSupport.match2.value==''){
    document.FormSupport.match2.focus();
    alert("Please make sure Verification Code is not left blank");
   	return false;
    }
	if(document.FormSupport.match1.value!=document.FormSupport.match2.value){
    document.FormSupport.match2.focus();
    alert("Please make sure Verification Code is Correct");
   	return false;
    }
	else{
    document.FormSupport.action="support.php";
    document.FormSupport.submit();
    }

}


//////
// Signup
/////
function signup()
{
	if(document.FormSignup.cname_tx.value==''){
    document.FormSignup.cname_tx.focus();
    alert("Please make sure Contact Name is not left blank");
   	return false;
    }
	if (window.document.FormSignup.cemail_tx.value.indexOf('.')=="-1" || window.document.FormSignup.cemail_tx.value.indexOf('@')=="-1")
	{
	alert("Please enter your Contact Email properly!")
	window.document.FormSignup.cemail_tx.focus();
	return false;
	}
	if(document.FormSignup.phone_tx.value==''){
    document.FormSignup.phone_tx.focus();
    alert("Please make sure Phone is not left blank");
   	return false;
    }
	if(document.FormSignup.match2.value==''){
    document.FormSignup.match2.focus();
    alert("Please make sure Verification Code is not left blank");
   	return false;
    }
	if(document.FormSignup.match1.value!=document.FormSignup.match2.value){
    document.FormSignup.match2.focus();
    alert("Please make sure Verification Code is Correct");
   	return false;
    }
	else{
    document.FormSupport.action="signup.php";
    document.FormSupport.submit();
    }

}