function gourl(surl)  // navigating to any page
{
	location.href = surl;
}

function goback()   //going to previous page
{
window.history.back();
}

// Address Validator
function isAddress()
{
	frm=document.mainform;

	var s1 = frm.txt_addr1.value;
	var ct = frm.txt_city.value;
	var sta = frm.txt_state.value;
	var country = frm.txt_country.value;

	if(s1 == "") 
	{
		alert("Please enter your Street1 .");
		frm.txt_addr1.focus();
		return false;
	}

	if(ct == "")
	{
		alert("Please enter your City name.");
		frm.txt_city.focus();
		return false;
	}
	if(sta == "") 
	{
		alert("Please select your State.");
		frm.txt_state.focus();
		return false;
	}

	if(country == "")
	{
		alert("Please select your Country .");
		frm.txt_country.focus();
		return false;
	}
	return true;
}


// Alphabets function
function isNotAlphabets(str)
{
	for (var i = 0; i < str.length; i++)
	{
		var ch = str.substring(i, i + 1);
		if((ch < "a" || "z" < ch) && (ch < "A" || "Z" < ch)) 
		{
			return true;
		}
	}
	return false;
}

// Email validator
function isValidemail() 
{
	frm=document.mainform;
	var email = frm.txt_email.value;

	if  (email == "" || email==null ){
		alert ("Please enter an Email address.");
		frm.txt_email.focus();
		return false;	
	}


	if ( (frm.txt_email.value.indexOf("@")==-1) ||(frm.txt_email.value.indexOf(".")==-1))
	{
		alert ("Please enter a valid Email address.");
		frm.txt_email.focus();
		return false;
	}
	return true;
}
