
function ira(donde) {
var strSearch=donde;
parent.location.href=("glosario.asp?search="+strSearch);
}
function Buscar(){
	document.busqueda.submit()
}
function MM_jumpMenu_bol(selObj,restore){ //v3.0
  ira=selObj.options[selObj.selectedIndex].value;
  if (restore) selObj.selectedIndex=0;
  abreWindow(ira)
}

function abreWindowBarras(jc, an, al) {
var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (an/2 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (al/2 + 40); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(jc,"","height="+al+",width="+an+",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes" +  ",resizable=no");
	win2.focus();
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function abreWindow_calendario(jc, ventana, an, al, toolbar, location, status, menubar, scrollbars, resizable) {
var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (an + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (al + 40); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(jc, ventana,"height="+al+",width="+an+",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + "toolbar=" + toolbar + "location=" + location + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + "");
	win2.focus();
}
function abreWindow(jc, an, al) {
var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (an/2 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (al/2 + 40); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(jc,"aguaencasa","height="+al+",width="+an+",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no" +  ",resizable=no");
	win2.focus();
}
function abreWindow_n(jc, an, al) {
var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (an/2 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (al/2 + 40); //half the screen height minus half the new window height (plus title and status bars).
	var win3 = window.open(jc,"aguaencasa_n","height="+al+",width="+an+",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no" +  ",resizable=no");
	win3.focus();
}

function comprobar_datos()
{	
	var vacio=0;

	if (form.numero_reclamacion.value=="")
	{
	alert("El campo Número de Reclamación no puede estar vacío");
	vacio=1;
	}else if (form.numero_cliente.value=="")
	{
		alert("El campo Numero de Cliente no puede estar vacío");
		vacio=1;
	}else if (form.Nombre.value=="")
	{
		alert("El campo Nombre no puede estar vacío");
		vacio=1;
	}else if (form.Direccion.value=="")
	{
		alert("El campo Direccion no puede estar vacío");
		vacio=1;
	}else if (form.Telefono.value=="")
	{
		alert("El campo Telefono no puede estar vacío");
		vacio=1;
	}else if (form.Email.value=="")
	{
		alert("El campo Correo Electrónico tiene que estar completo");
		vacio=1;
	}else if (form.texto.value=="")
	{
		alert("El campo Asunto no puede estar vacío");
		vacio=1;
	}	
		
	if (vacio!=1)
	{
		form.submit();
	}	
}


function comprobar_cliente()
{	
	var vacio=0;

	if (Contrataciones.codigo_a.value=="")
	{
	alert("El Código del Cliente es obligatorio");
	vacio=1;
	}else if (Contrataciones.mail_a.value=="")
	{
		alert("El mail es obligatorio");
		vacio=1;
	}
	

	if (vacio!=1)
	{
		agua_comunidad.submit();
	}	
		
}
function comprobar_mail()
{	
	var vacio=0;

	if (Contrataciones.mail_a.value=="")
	{
	alert("El mail es obligatorio");
	vacio=1;
	}

	if (vacio!=1)
	{
		Contrataciones.submit();
	}	
		
}


