function pripopup() {
	window.open("html/misc/privacypopup.html","privacypolicy","width=360,height=260,status=no,toolbar=no,menubar=no,titlebar=no")
	}

function validate(f) {
	var x=0;
	var display = ' ';
	if(x==0) {
	 	if(f.email.value==0) {
			display="Please enter your email id.";
			x=1;
	  	}
		}
	if(x==0) { 
		var theInput = f.email.value;
		var sp1=0;
	  var at=0
		for(i=0;i< theInput.length;i++) {
			d = theInput.charAt(i)
			if(d == ' ')
				{sp1++}
			if(d == '@')
				{at++}
			}
		if((sp1 > 0)||(at>1)||(at==0)) {
			display="This is not a valid email id."
			x=1
			}
		}
	if(display != ' ') {
	  alert(display)
		return false
		}
	return true;
	}

function CheckForm () { 
	//If there is aproblem with the form then display an error
	if (document.frmInterSearch.search.value == "") {
		msg = "Please enter at least one keyword to search for."
		alert(msg);
		return false;
	}
	return true;
	}

function checkyoga() {
	if (document.frmyogaValidation.name.value == "") {
		msg = "Please Enter Your Name"
		alert(msg);
		document.frmyogaValidation.name.focus();
		return false;
	}
	var x=0;
	var display = ' ';
	if(x==0) {
	 	if(document.frmyogaValidation.email.value==0) {
			display="Please enter your email id.";
			x=1;
	  	}
		}
	if(x==0) { 
		var theInput = document.frmyogaValidation.email.value;
		var sp1=0;
	  var at=0
		for(i=0;i< theInput.length;i++) {
			d = theInput.charAt(i)
			if(d == ' ')
				{sp1++}
			if(d == '@')
				{at++}
			}
		if((sp1 > 0)||(at>1)||(at==0)) {
			display="This is not a valid email id."
			x=1
			}
		}
	if(display != ' ') {
	  alert(display)
	  document.frmyogaValidation.email.focus();
		return false
		}

	if (document.frmyogaValidation.no_of_person.value == "") {
	msg = "Please Enter Number of Persons"
	alert(msg);
	document.frmyogaValidation.no_of_person.focus();
	return false;
	}
	if (document.frmyogaValidation.time_visit.value == "") {
		msg = "Please Enter Time of Visit"
		alert(msg);
		document.frmyogaValidation.time_visit.focus();
		return false;
	}

	return true;
	}	
	
function checksolo() {
			if (document.frmsolo.name.value == "") {
		msg = "Please Enter Your Name"
		alert(msg);
		document.frmsolo.name.focus();
		return false;
	}

	var i = 1;
  var s = document.frmsolo.email.value;
  var sLength = document.frmsolo.email.value.length;
  var emailFlag = false;
  if(sLength == 0){
  	alert("Please enter your \" Email \" address.");
	document.frmsolo.email.focus();
    	return (false);
  } 
  while (i < sLength){  
  	if (s.charAt(i) == "@"){
	      	emailFlag = true;
	        break;
	}
        i++;
  }   
  while (i < sLength){
  	if (s.charAt(i) == "."){
       		emailFlag = true;
        	break;
    	}
    	else emailFlag = false;
        i++;
  }
  for(var j=1;j<=sLength;j++){
  	if(s.charAt(j) == " "){
  		emailFlag = false;
	    	break;
  	}
  }	
  if (emailFlag == false){
  	alert("Please enter a valid \" Email \" address .");
	document.frmsolo.email.focus();
    	return (false);
  }
  if (sLength < 6){
 	 alert("Please enter a valid \" Email \" address .");
	 document.frmsolo.email.focus();
    	 return (false);
  }
  if(document.frmsolo.email.value != document.frmsolo.cemail.value){
	alert("\"email\" and \"confirm email\" must be same")
	document.frmsolo.cemail.focus();
	return false;
	}

	if (document.frmsolo.phone.value == "") {
		msg = "Enter the Phone No."
		alert(msg);
		document.frmsolo.phone.focus();
		return false;
	}

	if (document.frmsolo.address.value == "") {
		msg = "Enter the your Address"
		alert(msg);
		document.frmsolo.address.focus();
		return false;
	}

	if (document.frmsolo.city.value == "") {
		msg = "Enter the City"
		alert(msg);
		document.frmsolo.city.focus();
		return false;
	}

	if (document.frmsolo.pin.value == "") {
		msg = "Enter the Pin."
		alert(msg);
		document.frmsolo.pin.focus();
		return false;
	}

			if (document.frmsolo.state.value == "") {
		msg = "Enter the State."
		alert(msg);
		document.frmsolo.state.focus();
		return false;
	}

			if (document.frmsolo.url.value == "") {
		msg = "Enter the URL."
		alert(msg);
		document.frmsolo.url.focus();
		return false;
	}
	
var radio_choice = false;

// Loop from zero to the one minus the number of radio button selections
for (counter = 0;  counter < document.frmsolo.subscriber.length; counter++)
{
// If a radio button has been selected it will return true
// (If not it will return false)
if (document.frmsolo.subscriber[counter].checked)
radio_choice = true; 
}

if (!radio_choice)
{
// If there were no selections made display an alert box 
alert("Please select Do you send out Newsletter OR Have a subscriber base .")
return (false);
}

			if (document.frmsolo.check_name.value == "") {
		msg = "Enter the Check Payble to Field."
		alert(msg);
		document.frmsolo.check_name.focus();
		return false;
	}

	return true;
	}

function winForgot(url, name) 
{
popupWin = window.open(url, name,'width=350,height=230,status=no,resize=yes,toolbar=no,scrollbars=no,top=20,left=10')
}
