function abreWindow_home(jc) {
var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (275 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (200 + 40); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(jc,"flash","height=600,width=650,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no" +  ",resizable=no");
	win2.focus();
}
function abreWindow_home_s(jc) {
var iMyWidth;
	var iMyHeight;
	//gets top and left positions based on user's resolution so hint window is centered.
	iMyWidth = (window.screen.width/2) - (275 + 10); //half the screen width minus half the new window width (plus 5 pixel borders).
	iMyHeight = (window.screen.height/2) - (200 + 40); //half the screen height minus half the new window height (plus title and status bars).
	var win2 = window.open(jc,"flash","height=600,width=650,resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=yes" +  ",resizable=no");
	win2.focus();
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
  }
  
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_oficinas()
{	
	var vacio=0;

	if (oficinas_comerciales.oficina_comercial.value=="")
	{
	alert("No hay datos para la búsqueda");
	vacio=1;
	}

	if (vacio!=1)
	{
		oficinas_comerciales.submit();
	}	
		
}
function comprobar_contacto()
{	
	var vacio=0;

	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 E-mail no puede estar vacío");
	vacio=1;
	}

	if (vacio!=1)
	{
		form.submit();
	}	
		
}
function comprobar_contact()
{	
	var vacio=0;

	if (form.nombre.value=="")
	{
	alert("Name field Name cannot be empty");
	vacio=1;
	}else if(form.direccion.value=="")
	{
	alert("Name field Adress cannot be empty");
	vacio=1;
	}else if(form.telefono.value=="")
	{
	alert("Name field Telephone cannot be empty");
	vacio=1;
	}else if(form.email.value=="")
	{
	alert("Name field E-mail cannot be empty");
	vacio=1;
	}

	if (vacio!=1)
	{
		form.submit();
	}	
		
}

