function ValidarBuscadorPortada()
{
	err = "";
	if(document.getElementById('txtCategoria').selectedIndex == 0)	
		err = err + '\n' +'Debes escoger una de las categorias';
	if(document.getElementById('txtMarca').selectedIndex == 0)	
		err = err + '\n' +'Debes escoger una Marca';			
	if(document.getElementById('txtModelo').value == "")
		err = err + '\n' +'El Titulo es Obligatorio';		
	if(document.getElementById('txtDescripcion').value == "")
		err = err + '\n' +'El Texto es Obligatorio';		
	if(err != "")
		alert(err);
	else
	 	frmInsertarProducto.submit();	
}

document.oncontextmenu = function(){return false};

function cambiarImg(id,foto){
	document.getElementById(id).src = foto;
	laFoto = foto;
}
function desplegar(c){
	document.getElementById(c).style.visibility="visible";
}
function validarMeInteresa(){
	var myErr='';
	if(frmMeInteresa.txtNombre.value=='')	myErr+='El Nombre es obligatorio\n';	
	if(frmMeInteresa.txtEmail.value=='')	myErr+='El E-mail es obligatorio\n';	
	if(frmMeInteresa.txtTelefono.value=='')	myErr+='El Telefono es obligatorio\n';	
	if(frmMeInteresa.txtComentarios.value=='')	myErr+='Algo en Comentarios es obligatorio\n';	
	if(!frmMeInteresa.txtAcepto.checked)	myErr+='Es Obligatorio aceptar la Politica de privacidad';
	if (myErr!=''){alert(myErr)}
	document.Retorno = (myErr=='');
}
function validarDemanda(){
	var myErr='';
	if(frmMeInteresa.txtNombre.value=='')	myErr+='El Nombre es obligatorio\n';	
	if(frmMeInteresa.txtEmail.value=='')	myErr+='El E-mail es obligatorio\n';	
	if(frmMeInteresa.txtTelefono.value=='')	myErr+='El Telefono es obligatorio\n';
	if(frmMeInteresa.txtTipo.value=='')	myErr+='El Tipo de Inmueble que buscas es obligatorio\n';	
	if(frmMeInteresa.txtComentarios.value=='')	myErr+='Algo en Comentarios es obligatorio\n';	
	if (myErr!=''){alert(myErr)}
	document.Retorno = (myErr=='');
}
function validarBoletin(){
	var myErr='';
	if(frmBoletin.nombre.value=='')	myErr+='El Nombre es obligatorio\n';
	if(frmBoletin.apellidos.value=='')	myErr+='Los Apellidos son obligatorios\n';	
	if(frmBoletin.email.value=='')	myErr+='El E-mail es obligatorio\n';	
	if (myErr!=''){alert(myErr)}
	document.Retorno = (myErr=='');	
}

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}
