		function CheckCountry(val)
		{
			if(val=="US" || val=="UK" ||val=="AT" || val=="AU")
			{GetObj('states').style.display='block';}
			else{GetObj('states').style.display='none';}
		}




    // With C00 criteria
    
		function ValidateSearchAround()
		{
		 if(document.SearchAround.GC_city.value ==''&& document.SearchAround.GC_zip.value =='')
			{
				document.getElementById('ErrorMsg').style.display = 'block';
			}
		 else
			{
					/*if(document.SearchAround.C00.checked)
					{
						document.location.href = 'http://maps.maporama.com/idl/kerathermie_ES/drawsa.aspx?xsl=map&xml=map&MD_height=263&MD_width=370&MD_scale=0.00013333&Lang='+ document.SearchAround.Lang.value +'&GC_country='+ document.SearchAround.GC_country.value +'&GC_address='+ document.SearchAround.GC_address.value +'&GC_city='+ document.SearchAround.GC_city.value +'&GC_zip='+ document.SearchAround.GC_zip.value +'&SA_config=kerathermie_ES'+'&SA_fields=C00&SA_values=1';
					}
					else
					{*/
						document.SearchAround.submit();
						return false;
					//}
		   }
		}



/*

        // Without C00 criteria
    
		function ValidateSearchAround()
		{
		 if(document.SearchAround.GC_city.value ==''&& document.SearchAround.GC_zip.value =='')
			{
				document.getElementById('ErrorMsg').style.display = 'block';
			}
		 else
			{
				document.SearchAround.submit();
				return false;
		   }
		}

*/


	function ValidateEmailExport()
	{
		if(document.SendEmail.EX_from.value =='' || document.SendEmail.EX_to.value =='')
		{
			alert("Por favor, introduce tu y tus direcciones de correo electronico del destinatario !");
		}
		else
		{
			document.SendEmail.submit();
			return false;
		}		
	}




// Drive me section BEGIN


			function GetObj(objectId)
			{
				// Compatible NN IE FIREFOX method
				if (document.getElementById && document.getElementById(objectId) != null)
				return document.getElementById(objectId);
				else if (document.layers && document.layers[objectId] != null)
				return document.layers[objectId];
				else if (document.all)
				return document.all[objectId];
			}
				
			function CheckCountry(val)
			{
				if(val=="US" || val=="FR" || val=="AT" || val=="UK")
				{GetObj('states').style.display='block';}
				else{GetObj('states').style.display='none';}
			}

			function ValidateDriveme()
			{
				if(document.DrivingDirections.ITI_START_city.value =='')
					 {
						alert("Rellene campo obligatorio (s), por favor !");
					 }
					 else
					 {
						document.DrivingDirections.submit();
						return false;
					 }
			}

// Drive me section END


/*
		{
		        
			document.forms[0].SAF_6_values.disabled=true;
			document.forms[0].SAF_6_fields.disabled=true;
			
		}
		if(document.forms[0].OfficeIng.checked==true )
		{
			document.forms[0].SAF_6_fields.value="C00";
			document.forms[0].SAF_6_values.value="1"; 
			
			document.forms[0].SAF_6_values.disabled=false;
			document.forms[0].SAF_6_fields.disabled=false;
			
		}
		
		if(document.forms[0].GC_city.value!="" &&
			   document.forms[0].GC_state.value!=""&&

				 (document.forms[0].OfficeIng.checked !=true))
				 
				 {
					 GetObj('Layer99').style.display='none';
					//document.forms[0].submit();
					return true;
				 }
				 else
				 {
					
				  GetObj('Layer99').style.display='block';
				  if(document.forms[0].GC_city.value=="")
				  {
				  GetObj('city').style.color='black';		
				  }
				  else
				  {
				  GetObj('city').style.color='#666666';		
				  }

				  if(document.forms[0].GC_state.value=="")
				  {
				  GetObj('statesCA').style.color='black';		
				  }
				  else
				  {
				  GetObj('statesCA').style.color='black';		
				  }
				  		 
				  
				 if(document.forms[0].OfficeIng.checked==false && CriteriaSelected==false)
				  {
					GetObj('officeTitle').style.color='#666666';	
						
				  }
				  else
				  {
				  	return true;
				  }
				 
				
				 
				  //GetObj('state').style.color='#666666';
				  
				  return false;
				 }
		}
		*/
