
function AbrirLink(strURL)
{
	WINWIDTH = screen.availWidth-10;
	WINHEIGHT = screen.availHeight-30;
	CentroX = 0;
	CentroY = 0;
	strParametros = 'width=' + WINWIDTH + ',height=' + WINHEIGHT + ',scrollbars=1,resizable=1,toolbar=0,status=1,menubar=0, top=' + CentroY + ',left=' + CentroX + ',alwaysRaised=yes';
	ventana = window.open(strURL,'',strParametros);
	return ventana;
}

function AbrirLinkFalse(strURL,WINWIDTH,WINHEIGHT)
{
	CentroX = (screen.availWidth / 2) - (WINWIDTH / 2);
	if (CentroX < 0){CentroX = 0}
	CentroY = ((screen.availHeight / 2) - (WINHEIGHT / 2)) - 24;
	if (CentroY < 0){CentroY = 0;}
	strParametros = 'width=' + WINWIDTH + ',height=' + WINHEIGHT + ',scrollbars=1,resizable=1,toolbar=0,status=1,menubar=0, top=' + CentroY + ',left=' + CentroX + ',alwaysRaised=yes';
	ventana = window.open(strURL,'',strParametros);
	return ventana;
}

function AbrirLinkFalseNombre(strURL,strNAME,WINWIDTH,WINHEIGHT)
{
	CentroX = (screen.availWidth / 2) - (WINWIDTH / 2);
	if (CentroX < 0){CentroX = 0}
	CentroY = ((screen.availHeight / 2) - (WINHEIGHT / 2)) - 24;
	if (CentroY < 0){CentroY = 0;}
	strParametros = 'width=' + WINWIDTH + ',height=' + WINHEIGHT + ',scrollbars=1,resizable=1,toolbar=0,status=0,menubar=0, top=' + CentroY + ',left=' + CentroX + ',alwaysRaised=yes';
	ventana = window.open(strURL,strNAME,strParametros);
	return ventana;
}

function AbrirInformacion(strURL)
{
	W=700;
	H=500;
	CentroX = (screen.availWidth / 2) - (W / 2);
	strParametros='width=' + W + ',height=' + H + ',scrollbars=1,resizable=1,toolbar=0,status=1,menubar=0, top=0,left=' + CentroX + ',alwaysRaised=yes';
	ventana = window.open(strURL,'',strParametros);
}

function AbrirMedia(strURL,WINWIDTH,WINHEIGHT)
{
	WINWIDTH = WINWIDTH + 20;
	WINHEIGHT = WINHEIGHT + 20;
	CentroX = (screen.availWidth / 2) - (WINWIDTH / 2);
	if (CentroX < 0){CentroX = 0}
	CentroY = ((screen.availHeight / 2) - (WINHEIGHT / 2)) - 24;
	if (CentroY < 0){CentroY = 0;}
	strParametros = 'width=' + WINWIDTH + ',height=' + WINHEIGHT + ',scrollbars=1,resizable=1,toolbar=0,status=1,menubar=0, top=' + CentroY + ',left=' + CentroX + ',alwaysRaised=yes';
	ventana = window.open(strURL,'',strParametros);
	return ventana;
}

function AbrirVentanaNombre(strURL,strNAME,WINWIDTH,WINHEIGHT)
{
	WINWIDTH = WINWIDTH + 20;
	WINHEIGHT = WINHEIGHT + 20;
	CentroX = (screen.availWidth / 2) - (WINWIDTH / 2);
	if (CentroX < 0){CentroX = 0}
	CentroY = ((screen.availHeight / 2) - (WINHEIGHT / 2)) - 24;
	if (CentroY < 0){CentroY = 0;}
	strParametros = 'width=' + WINWIDTH + ',height=' + WINHEIGHT + ',scrollbars=1,resizable=1,toolbar=0,status=1,menubar=0, top=' + CentroY + ',left=' + CentroX + ',alwaysRaised=yes';
	ventana = window.open(strURL,strNAME,strParametros);
	return ventana;
}

function CargarPanel(strURL)
{
	BESLOADING_Mostrar();
	AjaxGetPanel(strURL, "PANELDIAPOSITIVAS", DiapositivaCargadaOk)
}

function CargarPagina(strURL)
{
	self.location.href(strURL);
}

function CargarIrA()
{
	document.getElementById("DivIrA").style.display="";
	document.getElementById("BotonDesactivado").style.display="none";
	document.getElementById("BotonActivado").style.display="";
}

function CerrarIrA()
{
	document.getElementById("DivIrA").style.display="none";
	document.getElementById("BotonActivado").style.display="none";
	document.getElementById("BotonDesactivado").style.display="";
}

function Inicializar()
{
	Redimensionar()
	BESLOADING_Ocultar();
//	AjaxGetPanel("panelDiapositiva1.asp", "PANELDIAPOSITIVAS", DiapositivaCargadaOk)
}

function DiapositivaCargadaOk()
{
	BESLOADING_Ocultar();
}

function Redimensionar()
{
	if (document.getElementById("TituloCaja"))
	{
		WINWIDTH=(document.body.clientWidth-960)/2;
		WINHEIGHT=(document.body.clientHeight-626)/2;
		
		if (WINWIDTH<0) WINWIDTH=0
		if (WINHEIGHT<0) WINHEIGHT=0

		document.getElementById("TituloCaja").style.left=WINWIDTH;
		document.getElementById("TituloCaja").style.top=WINHEIGHT+20;
	}
}

function FUNCIONES_EncimaBoton(varBoton)
{
	document.getElementById(varBoton).style.backgroundImage="url(/images/VersionOptimus/Botones/BotonMenuGrisMed2.gif)";
	document.getElementById(varBoton).style.color="#0088ff";
}

function FUNCIONES_FueraBoton(varBoton)
{
	document.getElementById(varBoton).style.backgroundImage="url(/images/VersionOptimus/Botones/BotonMenuGrisMed.gif)";
	document.getElementById(varBoton).style.color="#0000ff";
}

function InputVaciar(idBoton,strValue)
{
	if (document.getElementById(idBoton).value==strValue)
	{
		document.getElementById(idBoton).value="";
		document.getElementById(idBoton).style.color="#000000";
	}
}

function InputRellenar(idBoton,strValue)
{
	if (document.getElementById(idBoton).value=="" || document.getElementById(idBoton).value==strValue)
	{
		document.getElementById(idBoton).value=strValue;
		document.getElementById(idBoton).style.color="#808080";
	}
}

function CentrarMasInformacion(strDIV)
{
	WINLEFT=(document.body.clientWidth-700)/2;
	WINTOP=(document.body.clientHeight-500)/2;
	document.getElementById(strDIV).style.top=WINTOP;
	document.getElementById(strDIV).style.left=WINLEFT;
	document.getElementById("DivSombraFuerte").style.top=WINTOP+4;
	document.getElementById("DivSombraFuerte").style.left=WINLEFT+4;
}

function VerMasInformacion(strDIV)
{
	document.getElementById(strDIV).style.display="";
	document.getElementById("DivSombraFuerte").style.display="";
	document.getElementById("DivSombraSuave").style.display="";
}

function OcultarMasInformacion(strDIV)
{
	document.getElementById(strDIV).style.display="none";
	document.getElementById("DivSombraFuerte").style.display="none";
	document.getElementById("DivSombraSuave").style.display="none";
}

