

function check_contact_us_form()
{	
	
	var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");	
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}
	if(document.cnt_frm.cnt_name.value=="")
				 {
		
                   document.getElementById('msg_name').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Name</b>";
				   if(focus_field=='') focus_field = 'cnt_name';
			       count_bug+=1;
				 }

				 if(document.cnt_frm.cnt_company.value=="")
				 {
                   document.getElementById('msg_company').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Company</b>";
				   if(focus_field=='') focus_field = 'cnt_company';
			       count_bug+=1;
				 }

				 if(document.cnt_frm.cnt_address.value=="")
				 {
                   document.getElementById('msg_address').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Address</b>";
				   if(focus_field=='') focus_field = 'cnt_address';
			       count_bug+=1;
				 }

				 if(document.cnt_frm.cnt_country.value=="NA")
	{
					 document.getElementById('msg_country').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Country</b>";
					 if(focus_field=='') focus_field = 'cnt_country';
					 count_bug+=1;
	}
	if(document.cnt_frm.cnt_phone.value=="")
	{
		document.getElementById('msg_phone').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Phone</b>";
		if(focus_field=='') focus_field = 'cnt_phone';
		count_bug+=1;
	}

	if(document.cnt_frm.cnt_email.value=="")
	{
		document.getElementById('msg_email').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your EmailID</b>";
		if(focus_field=='') focus_field = 'cnt_email';
		count_bug+=1;
	}

	if(document.cnt_frm.cnt_query.value=="")
	{
		document.getElementById('msg_query').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Query/Comment</b>";
		if(focus_field=='') focus_field = 'cnt_query';
		count_bug+=1;
	}

	if(document.cnt_frm.code_field.value=="")
	{
		document.getElementById('msg_code').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Code</b>";
		if(focus_field=='') focus_field = 'code_field';
		count_bug+=1;
	}


	 if(document.cnt_frm.cnt_email.value!="")
				 {
				if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.cnt_frm.cnt_email.value))
		             {
		              }
		         else
		         {
		          	document.getElementById('msg_email').innerHTML = "<img src='images/error_icon.gif'>&nbsp;<b>Please enter a valid e-mail</b>";
			         count_bug+=1;
			          if(focus_field == "")
				        focus_field = "cnt_email";
		          }
			 }

			 if(count_bug>0)
		return false;
	else
		return true;

}
////////////////////////////////////////////////////////////////////////////////////////////////////////////

function check_rma_form()
{	
	
	var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");	
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "texterror")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

if(document.rma_form.rma_name.value=="")
				 {
                   document.getElementById('err_name').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Name</b>";
				   if(focus_field=='') focus_field = 'rma_name';
			       count_bug+=1;
				 }

				 if(document.rma_form.rma_street.value=="")
				 {
                   document.getElementById('err_street').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Street</b>";
				   if(focus_field=='') focus_field = 'rma_street';
			       count_bug+=1;
				 }

				 if(document.rma_form.rma_city.value=="")
				 {
                   document.getElementById('err_city').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your City</b>";
				   if(focus_field=='') focus_field = 'rma_city';
			       count_bug+=1;
				 }

				 if(document.rma_form.rma_state.value=="")
				 {
                   document.getElementById('err_state').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your State</b>";
				   if(focus_field=='') focus_field = 'rma_state';
			       count_bug+=1;
				 }

				 if(document.rma_form.rma_zip.value=="")
				 {
                   document.getElementById('err_zip').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Zip Code</b>";
				   if(focus_field=='') focus_field = 'rma_zip';
			       count_bug+=1;
				 }

				 if(document.rma_form.rma_country.value=="")
				 {
                   document.getElementById('err_country').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Country</b>";
				   if(focus_field=='') focus_field = 'rma_country';
			       count_bug+=1;
				 }

				 if(document.rma_form.rma_email.value=="")
				 {
                   document.getElementById('err_email').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Email</b>";
				   if(focus_field=='') focus_field = 'rma_email';
			       count_bug+=1;
				 }

				 if(document.rma_form.rma_email.value!="")
				 {
				if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.rma_form.rma_email.value))
		             {
		              }
		         else
		         {
		          	document.getElementById('err_email').innerHTML = "<img src='images/error_icon.gif'>&nbsp;<b>Please enter a valid e-mail</b>";
			         count_bug+=1;
			          if(focus_field == "")
				        focus_field = "rma_email";
		          }
			 }

			 if(document.rma_form.rma_phone.value=="")
				 {
                   document.getElementById('err_phone').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Telephone</b>";
				   if(focus_field=='') focus_field = 'rma_phone';
			       count_bug+=1;
				 }
				 if(document.rma_form.rma_ordernumber.value=="")
				 {
                   document.getElementById('err_order').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Order Number</b>";
				   if(focus_field=='') focus_field = 'rma_ordernumber';
			       count_bug+=1;
				 }
				 if(document.rma_form.rma_product.value=="")
				 {
                   document.getElementById('err_product').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Product for Return</b>";
				   if(focus_field=='') focus_field = 'rma_product';
			       count_bug+=1;
				 }

				  if(document.rma_form.rma_condition.value=="")
				 {
                   document.getElementById('err_condition').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Product Condition</b>";
				   if(focus_field=='') focus_field = 'rma_condition';
			       count_bug+=1;
				 }
				  if(document.rma_form.rma_notes.value=="")
				 {
                   document.getElementById('err_notes').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter Notes</b>";
				   if(focus_field=='') focus_field = 'rma_notes';
			       count_bug+=1;
				 }
				  if(document.rma_form.rma_signature.value=="")
				 {
                   document.getElementById('err_signature').innerHTML ="<img src='images/error_icon.gif'>&nbsp;<b>Please enter your Digital Signature</b>";
				   if(focus_field=='') focus_field = 'rma_signature';
			       count_bug+=1;
				 }

			 if(count_bug>0)
		return false;
	else
		return true;

}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
function check_emg_designer_prog_form()
{	
	
	var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");	
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "error_txt")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.form2.First_name.value=="")
				 {
                   document.getElementById('First_name_error').innerHTML ="<- Please enter your First Name";
				   if(focus_field=='') focus_field = 'First_name';
			       count_bug+=1;
				 }

				 if(document.form2.Last_name.value=="")
				 {
                   document.getElementById('Last_name_error').innerHTML ="<- Please enter your Last Name";
				   if(focus_field=='') focus_field = 'Last_name';
			       count_bug+=1;
				 }

				 if(document.form2.Business_address.value=="")
				 {
                   document.getElementById('Business_address_error').innerHTML ="<- Please enter your Business Address";
				   if(focus_field=='') focus_field = 'Business_address';
			       count_bug+=1;
				 }

				  if(document.form2.City_name.value=="")
				 {
                   document.getElementById('City_name_error').innerHTML ="<- Please enter your City Name";
				   if(focus_field=='') focus_field = 'City_name';
			       count_bug+=1;
				 }

				 if(document.form2.State_name.value=="")
				 {
                   document.getElementById('State_name_error').innerHTML ="<- Please enter your State Name";
				   if(focus_field=='') focus_field = 'State_name';
			       count_bug+=1;
				 }

				 if(document.form2.email.value=="")
				 {
                   document.getElementById('email_error').innerHTML ="<- Please enter your Email";
				   if(focus_field=='') focus_field = 'email';
			       count_bug+=1;
				 }

				 if(document.form2.email.value!="")
				 {
				if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.form2.email.value))
		             {
		              }
		         else
		         {
		          	document.getElementById('email_error').innerHTML = "<- Please enter a valid e-mail.";
			         count_bug+=1;
			          if(focus_field == "")
				        focus_field = "email";
		          }
			 }

			 if(count_bug>0)
		return false;
	else
		return true;

}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
function check_gennext_form()
{	
	
	var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");	
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "error_txt")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.designer_genx_frm.First_name.value=="")
				 {
                   document.getElementById('First_name_error').innerHTML ="<- Please enter your First Name";
				   if(focus_field=='') focus_field = 'First_name';
			       count_bug+=1;
				 }

				 if(document.designer_genx_frm.Last_name.value=="")
				 {
                   document.getElementById('Last_name_error').innerHTML ="<- Please enter your Last Name";
				   if(focus_field=='') focus_field = 'Last_name';
			       count_bug+=1;
				 }

				 if(document.designer_genx_frm.Brand_name.value=="")
				 {
                   document.getElementById('Brand_name_error').innerHTML ="<- Please enter your Brand Name";
				   if(focus_field=='') focus_field = 'Brand_name';
			       count_bug+=1;
				 }

				 if(document.designer_genx_frm.Business_address.value=="")
				 {
                   document.getElementById('Business_address_error').innerHTML ="<- Please enter your Business Address";
				   if(focus_field=='') focus_field = 'Business_address';
			       count_bug+=1;
				 }

				  if(document.designer_genx_frm.City_name.value=="")
				 {
                   document.getElementById('City_name_error').innerHTML ="<- Please enter your City Name";
				   if(focus_field=='') focus_field = 'City_name';
			       count_bug+=1;
				 }

				 if(document.designer_genx_frm.State_name.value=="")
				 {
                   document.getElementById('State_name_error').innerHTML ="<- Please enter your State Name";
				   if(focus_field=='') focus_field = 'State_name';
			       count_bug+=1;
				 }

				 if(document.designer_genx_frm.email.value=="")
				 {
                   document.getElementById('email_error').innerHTML ="<- Please enter your Email";
				   if(focus_field=='') focus_field = 'email';
			       count_bug+=1;
				 }

				 if(document.designer_genx_frm.email.value!="")
				 {
				if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.designer_genx_frm.email.value))
		             {
		              }
		         else
		         {
		          	document.getElementById('email_error').innerHTML = "<- Please enter a valid e-mail.";
			         count_bug+=1;
			          if(focus_field == "")
				        focus_field = "email";
		          }
			 }

			 if(count_bug>0)
		return false;
	else
		return true;

}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
function check_press_reg_form()
{	
	
	var count_bug=0;
	var focus_field = '';	
	var tmp_arr = document.getElementsByTagName("div");	
	for(var i = 0; i < tmp_arr.length; i++)
	{
		if(tmp_arr[i].className == "error_txt")
		{
			 tmp_arr[i].innerHTML = "&nbsp;";
		}
	}

	if(document.press_form.First_name.value=="")
				 {
                   document.getElementById('First_name_error').innerHTML ="<- Please enter your First Name";
				   if(focus_field=='') focus_field = 'First_name';
			       count_bug+=1;
				 }

				 if(document.press_form.Publication.value=="")
				 {
                   document.getElementById('Publication_error').innerHTML ="<- Please enter your Publication";
				   if(focus_field=='') focus_field = 'Publication';
			       count_bug+=1;
				 }

				 if(document.press_form.City_name.value=="")
				 {
                   document.getElementById('City_name_error').innerHTML ="<- Please enter your City Name";
				   if(focus_field=='') focus_field = 'City_name';
			       count_bug+=1;
				 }

				 if(document.press_form.Country_name.value=="")
				 {
                   document.getElementById('Country_name_error').innerHTML ="<- Please enter your Country Name";
				   if(focus_field=='') focus_field = 'Country_name';
			       count_bug+=1;
				 }

				 if(document.press_form.Phone.value=="")
				 {
                   document.getElementById('Phone_error').innerHTML ="<- Please enter your Phone";
				   if(focus_field=='') focus_field = 'Phone';
			       count_bug+=1;
				 }

				 if(document.press_form.email.value=="")
				 {
                   document.getElementById('email_error').innerHTML ="<- Please enter your Email";
				   if(focus_field=='') focus_field = 'email';
			       count_bug+=1;
				 }

				 if(document.press_form.email.value!="")
				 {
				if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,4})+$/.test(document.press_form.email.value))
		             {
		              }
		         else
		         {
		          	document.getElementById('email_error').innerHTML = "<- Please enter a valid e-mail.";
			         count_bug+=1;
			          if(focus_field == "")
				        focus_field = "email";
		          }
			 }

			 if(count_bug>0)
		return false;
	else
		return true;

}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////

