// JavaScript Document
<!--
function check(e){
	if(document.images){
		re = /(@.*@)|(\.\.)|(^\.)|(^@)|(@$)|(\.$)|(@\.)/;
		re_two = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
		if(!e.match(re) && e.match(re_two)){
			return(-1);	
		}
	}
}
// -->

<!--
		function ged(noDays){
		var today = new Date();
		var expr = new Date(today.getTime() + noDays*24*60*60*1000);
		return  expr.toGMTString();
	}
	
	function checkF(f){
	
	if(!check(f.email.value)){
		alert("Invalid email address detected.");
		//f.email.style.background = "#FFFF00";
		f.email.focus();
		return (false);
	}
	
					if(f.c2.value.length < 1){
						alert("Please Enter First Name");
						//f.c2.style.background = "#FFFF00";
						f.c2.focus();
						return (false);
					}
					
					if(f.c3.value.length < 1){
						alert("Please Enter last Name");
						//f.c3.style.background = "#FFFF00";
						f.c3.focus();
						return (false);
					}
					
					if(f.c4.value.length < 1){
						alert("Please Enter Zipcode ");
						//f.c4.style.background = "#FFFF00";
						f.c4.focus();
						return (false);
					}
					
					if(f.c5.selectedIndex < 1){
						alert("Please Select Gender");
						//f.c5.style.background = "#FFFF00";
						f.c5.focus();
						return (false);
					}
					
					if(f.c6.selectedIndex < 1){
						alert("Please  Select Month ");
						//f.c6.style.background = "#FFFF00";
						f.c6.focus();
						return (false);
					}
					
					if(f.c7.selectedIndex < 1){
						alert("Please  Select Date");
						//f.c7.style.background = "#FFFF00";
						f.c7.focus();
						return (false);
					}
					
					if(f.c8.selectedIndex < 1){
						alert("Please  Select Year");
						//f.c8.style.background = "#FFFF00";
						f.c8.focus();
						return (false);
					}
					
					if(f.c9.selectedIndex < 1){
						alert("Please  Select this field");
						//f.c9.style.background = "#FFFF00";
						f.c9.focus();
						return (false);
					}
					
					if(f.c10.selectedIndex < 1){
						alert("Please  Select this field");
						//f.c10.style.background = "#FFFF00";
						f.c10.focus();
						return (false);
					}
					
	/*document.cookie = "uls90=1; path=/; expires=" + ged(90);
	
		ulsPopup = "";
		
		if(!ulsPopup || ulsPopup.closed){
			ulsPopup = window.open("", "ulsPopup", "top=200,left=200,width=400,height=400,resizable=,toolbar=,menubar=,location=,scrollbars=,status=");
		} else {
			ulsPopup.close();
			ulsPopup = window.open("", "ulsPopup", "top=200,left=200,width=400,height=400,resizable=,toolbar=,menubar=,location=,scrollbars=,status=");
		}*/
		
		
	}
	// -->
	
	
	
	function chec(){
	
	var email=document._SubsForm.email;
	var c2=document._SubsForm.c2;
	var c3=document._SubsForm.c3;
	var c4=document._SubsForm.c4;
	var c5=document._SubsForm.c5;
	var c6=document._SubsForm.c6;
	var c7=document._SubsForm.c7;
	var c8=document._SubsForm.c8;
	var c9=document._SubsForm.c9;
	var c10=document._SubsForm.c10;

	
	
	
	if(email.value=="")
	{
	alert("Please Enter Your EmailId");
//document.form.email_id.style.background="#FFFFOO";
	email.focus()
	return false;
	}
	i=email.value.indexOf("@");  //see if there's an @ sign
	x= email.value.indexOf("@",i+1);  //make sure there's not more @ signs
	p= email.value.indexOf(".",i);  //there must be a period 
	if ( (i==-1) || (p<(i+2)) || (x>i) || (p >=(email.value.length - 2)))
	{
	alert("Please enter a valid Email Address in a format such as  abc@india.com");
//document.form.email_id.style.background="#FFFFOO";

	email.focus()
	return false;
	}
	
	
	
	$.ajax({
					   
  type: "POST",
  url: "newsaction.php",
//  $('#fomr').serialize()
  data: $('#fomr').serialize(),
  success: function(msg){
	  
    //alert( "Data Saved: " + msg );
  }
});		
				//return true;
	
		ulsPopup = "";
		
		if(!ulsPopup || ulsPopup.closed){
			ulsPopup = window.open("", "ulsPopup", "top=200,left=200,width=400,height=400,resizable=,toolbar=,menubar=,location=,scrollbars=,status=");
		} else {
			ulsPopup.close();
			ulsPopup = window.open("", "ulsPopup", "top=200,left=200,width=400,height=400,resizable=,toolbar=,menubar=,location=,scrollbars=,status=");
		}
		
		window.parent.location.reload();
	
					/*if(c2.value==""){
						alert("Please Enter First Name");
						c2.focus();
						return false;
					}
					
					if(c3.value==""){
						alert("Please Enter Last Name");
						c3.focus();
						return false;
					}
					
					if(c4.value==""){
						alert("Please Enter Zipcode");
						c4.focus();
						return false;
					}
					
					
					if(c5.value==""){
						alert("Please Select Gender");
						c5.focus();
						return false;
					}
					
				
					if(c6.value==""){
						alert("Please Select Month");
						c6.focus();
						return false;
					}
					
					if(c7.value==""){
						alert("Please Select Date");
						c7.focus();
						return false;
					}
					
					
					if(c8.value==""){
						alert("Please Select Year");
						c8.focus();
						return false;
					}
					
					if(c9.value==""){
						alert("Please Select this field");
						c9.focus();
						return false;
					}
					
					
					if(c10.value==""){
						alert("Please Select this field");
						c10.focus();
						return false;
						
						
					}*/
				
	
					//else
					
					//return true;
					//window.close();
					
	//document.cookie = "uls90=1; path=/; expires=" + ged(90);
	//setCookie(document.getElementById('email').name,document.getElementById('email').value,1);
//				setCookie(document.getElementById('c2').name,document.getElementById('c2').value,1);
//				setCookie(document.getElementById('c3').name,document.getElementById('c3').value,1);
//				setCookie(document.getElementById('c4').name,document.getElementById('c4').value,1);
//				setCookie(document.getElementById('c5').name,document.getElementById('c5').value,1);
//				setCookie(document.getElementById('c6').name,document.getElementById('c6').value,1);
//				setCookie(document.getElementById('c7').name,document.getElementById('c7').value,1);
//				setCookie(document.getElementById('c8').name,document.getElementById('c8').value,1);
//				setCookie(document.getElementById('c9').name,document.getElementById('c9').value,1);
//				setCookie(document.getElementById('c10').name,document.getElementById('c10').value,1);
	
		//ulsPopup = "";
		
	//	document.cookie = "uls90=1; path=/; expires=" + ged(90);

	
	
		
	//else
				
		
		
/*		$.ajax({
  type: "POST",
  url: "newsaction.php",
  data: $('_SubsForm').serialize()
  success: function(msg){
    alert( "Data Saved: " + msg );
  }
});
$.ajax({
  type: "POST",
  url: "some.php",
  data: $(' give id of the form').serialize(),
  success: function(msg){
    alert( "Data Saved: " + msg );
  }
});*/


		
		
		
	//window.parent.location.reload();
	

		//window.location.href = "http://115.111.25.209/midnightgroup.com/";
		
	}
	
