//Contact Us

function FormContact(form)
{
	sw=0;
	
	if(Empty(form.name.value)) 
	{
		alert('Must provide name'); 
		form.name.focus(); 
		return false; 
	}
	

	if(!isMail(form.email.value))  
	{
		alert('Must provide email')  
		form.email.focus(); 
		return false; 
	}
	
	if (form.inquiries[1].checked)
	{
		sw=0;
		for (i=0;i<form.construction.length && sw==0;i++) {
		if (form.construction[i].checked) sw=1;
		}
			if (!sw) {
			alert('Is this location new construction?');
			form.construction[0].focus();
			return false;
		}
		
		sw1=0;
		for (i=0;i<form.renovated.length && sw1==0;i++) {
		if (form.renovated[i].checked) sw1=1;
		}
			if (!sw1) {
			alert('Is this location being renovated?');
			form.renovated[0].focus();
			return false;
		}
		
		sw2=0;
		for (i=0;i<form.occupied.length && sw2==0;i++) {
		if (form.occupied[i].checked) sw2=1;
		}
			if (!sw2) {
			alert('Is this location currently occupied?');
			form.occupied[0].focus();
			return false;
		}
		
		if(Empty(form.addres_installation.value)) 
		{
			alert('Address where the installation is required?'); 
			form.addres_installation.focus(); 
			return false; 
		}
		
		if(Empty(form.approximately.value)) 
		{
			alert('Address where the installation is required?'); 
			form.approximately.focus(); 
			return false; 
		}
		
		sw3=0;
		for (i=0;i<form.data.length && sw3==0;i++) {
		if (form.data[i].checked) sw3=1;
		}
			if (!sw3) {
			alert('Will this installation require cabling for data applications?');
			form.data[0].focus();
			return false;
		}
		
		sw4=0;
		for (i=0;i<form.voice.length && sw4==0;i++) {
		if (form.voice[i].checked) sw4=1;
		}
			if (!sw4) {
			alert('Will this installation require cabling for voice applications?');
			form.voice[0].focus();
			return false;
		}
		
		sw5=0;
		for (i=0;i<form.video.length && sw5==0;i++) {
		if (form.video[i].checked) sw5=1;
		}
			if (!sw5) {
			alert('Will this installation require cabling for video applications?');
			form.video[0].focus();
			return false;
		}
		
		
	}
	
	return; 

}


function cambiaCapa (valor)
{
	if (valor=="Site Survey Request Form")
	{
		document.getElementById('installation_0').className = "visible";
		document.getElementById('text_message').className = "oculto";
	}
	else
	{
		document.getElementById('installation_0').className = "oculto";
		document.getElementById('text_message').className = "visible";
	}
}

