// JavaScript Document

function inputname_blank(obj)
{
	 obj.style.color='#333';
	 if(obj.value==" Enter your name")
	  {
	  	obj.value="";
	  }		
}	
function inputemail_blank(obj)
{
   obj.style.color='#333';
	if(obj.value==" Enter valid email")
	{
		obj.value="";
	}	
}	
function inputname_blank2()
{
	 document.validation_form.name.style.color='#333';
	 if(document.validation_form.name.value==" Enter your name")
	  {
	  	document.validation_form.name.value="";
	  }		
}	
function inputemail_blank2()
{
   document.validation_form.email.style.color='#333';
	if(document.validation_form.email.value==" Enter valid email")
	{
		document.validation_form.email.value="";
	}	
}	
function validation(form)
{
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var Email=form.email.value;
  	var err=0;


if(form.name.value=="" || form.name.value==" Enter your name")
	{
		form.name.value=" Enter your name";
	   form.name.style.color='#fff';
	   err=1;
		
 	}	else
	{
		 form.name.style.color='#333';
		
 	}
 	
 	 if(reg.test(Email) == false)
  	{
   
 	 form.email.value=" Enter valid email";
	 form.email.style.color='#fff';
 	 err=1;
  	}	
	else
	{
		form.email.style.color='#333';
	} 

if(err==1)
	{
		return false;
	}
	else
	{	
		document.getElementById('splash_video_overlay').style.display = 'none';
		document.getElementById('splash_play_video').style.display = 'block';
		
		send_form_new(form);
		return false;
	}
}

function send_form_new(form){
	
var my_name = form.name.value;
var email = form.email.value;
	
$('#awf_field-26111511').val(my_name);
$('#awf_field-26111512').val(email);
$('#awebersubmit').click();
$("#splash_close").click();
}

