var aWindow="";

function MostrarFondo(id, idc)
{
	var pdfs = document.getElementById("pdf");
	var bpdf = document.getElementById("botonpdf");
	var url = "/website/asp/website.asp?doAction=doUpLoadFileViewDocument&Item=";
	//var url = "/website/Diversificacion.asp?Item=";
	/*pdfs.src = url + id;*/
	pdfs.href = url + id;
	//pdfs.style.visibility = "visible";
	bpdf.style.visibility = "visible";
	
	var a = document.getElementById('FA');
	var b = document.getElementById('FB');
	var c = document.getElementById('FC');
	var d = document.getElementById('FD');
	var e = document.getElementById('FE');

	a.style.color="#666666";
	b.style.color="#666666";
	c.style.color="#666666";
	d.style.color="#666666";
	e.style.color="#666666";

	
	/*a.style.color="#47596A";
	b.style.color="#47596A";
	c.style.color="#47596A";
	d.style.color="#47596A";
	e.style.color="#47596A";*/
	
	var cambiar = document.getElementById(idc)
	//cambiar.style.color="#FF0000";
	cambiar.style.color="#FF6600";
}

function MostrarFondoTMP(id, idc)
{
	var pdfs = document.getElementById("pdf");
	var url = "/website/asp/website.asp?doAction=doUpLoadFileViewDocument&Item=";
	pdfs.src = url + id;
	pdfs.style.visibility = "visible";
	
	var a = document.getElementById('FA');
	var b = document.getElementById('FB');
	var c = document.getElementById('FC');
	var d = document.getElementById('FD');
	var e = document.getElementById('FE');
	a.style.color="#47596A";
	b.style.color="#47596A";
	c.style.color="#47596A";
	d.style.color="#47596A";
	e.style.color="#47596A";
	var cambiar = document.getElementById(idc)
	cambiar.style.color="#FF0000";
	
}


function openWin(URL,largo,alto){
   var x = 0;
   var y = 0;
   x = (screen.availWidth - 12 - largo) / 2;
   y = (screen.availHeight - 48 - alto) / 2;
   var features = "screenX=" + x + ",screenY=" + y + ",width=" + largo + ",height=" + alto+",top="+y+",left="+x
	 if (aWindow == "")
		aWindow=window.open(URL,"windows",features+",resizable=no, scrollbars=no");
	 else{
	  if (aWindow.closed)
			aWindow=window.open(URL,"windows",features+",resizable=no,scrollbars=no");
		else {
			aWindow.close();
	    aWindow=window.open(URL,"windows",features+",resizable=no,scrollbars=no");
		}
	}
}


function openWinScroll(URL,largo,alto){
   var x = 0;
   var y = 0;
   x = (screen.availWidth - 12 - largo) / 2;
   y = (screen.availHeight - 48 - alto) / 2;
   var features = "screenX=" + x + ",screenY=" + y + ",width=" + largo + ",height=" + alto+",top="+y+",left="+x
	if (aWindow == "")
		aWindow=window.open(URL,"windows",features+",resizable=no,scrollbars=yes");
	else
  {
	   if (aWindow.closed)
				aWindow=window.open(URL,"windows",features+",resizable=no,scrollbars=yes");
		else
    {
			aWindow.close();
      aWindow=window.open(URL,"windows",features+",resizable=no,scrollbars=yes");
		}
	}
}

// La misma funcion pero muestra barras de scroll
function openWincs(URL,largo,alto){
   var x = 0;
   var y = 0;

   x = (screen.availWidth - 12 - largo) / 2;
   y = (screen.availHeight - 48 - alto) / 2;
   var features = "screenX=" + x + ",screenY=" + y + ",width=" + largo + ",height=" + alto+",top="+y+",left="+x
	if (aWindow == "")
		aWindow=window.open(URL,"windows",features+",resizable=no, scrollbars=yes");
	else{
    if (aWindow.closed)
			aWindow=window.open(URL,"windows",features+",resizable=no,scrollbars=yes");
		else {
			aWindow.close();
      aWindow=window.open(URL,"windows",features+",resizable=no,scrollbars=yes");
		}
	}
}


/*Imprime DIV*/
function imprSelec(que) {
var ventana = window.open("", "", "height=20,width=20,status=yes,toolbar=no,menubar=no,location=no");
var contenido = "<html><head><script language='JavaScript' src='/js/Newjs/js/Utils.js' type='text/javascript'></script><link href='/css/estilos_afp.css' rel='stylesheet' type='text/css' /></head><body onload='Elimbotones();window.print();window.close();'>" + document.getElementById(que).innerHTML + "</body></html>";
ventana.document.open();
ventana.document.write(contenido);
ventana.document.close();
}

        
function Elimbotones()
{
		var a  = document.getElementById("botones_impresion");
		if((a!= "undefined") && (a!=null)){
			a.style.visibility = "hidden";
		}
}
 
function MostrarLabel2()
{
var a =  document.getElementById("lab1");
a.style.position = "relative";
a.style.visibility = "visible";

}                                