startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;

function abrir_asociar(theURL)
{
window.open(theURL,'','width=700,height=550,top=20,left=60,scrollbars=yes');
}
function abrir_noticia(theURL)
{
window.open(theURL,'','width=515,height=445,top=20,left=60,scrollbars=yes');
}
function abrir_intranet(theURL)
{
window.open(theURL,'','width=260,height=230,top=20,left=60,scrollbars=yes');
}
function abrir_proy(theURL)
{
window.open(theURL,'','width=515,height=445,top=20,left=60,scrollbars=no');
}
newWindow=null
function Ventana(Titulo,Path)
{
if(newWindow!=null)
{
newWindow.close
}

newWindow = window.open(Path,'','status=no,statusbar=no,menubar=no,resizable=no,toolbar=no,titlebar=no,top=0px,left=0px,width=1024px,height=768px');
if (newWindow != null) {

var newContent = "<HTML><HEAD><TITLE>"
newContent += Titulo
newContent += "</TITLE></HEAD>"

AnchoMas=0
AltoMas=0
if(EsNavegador("opera","win")){
AnchoMas=10
AltoMas=36
}else if(EsNavegador("msie","win",";sv")){
AnchoMas=12
AltoMas=65
}else if(EsNavegador("msie","win")){
AnchoMas=12
AltoMas=65
}else if(EsNavegador("firefox","win")){
AnchoMas=7
AltoMas=55
}else if(EsNavegador("mozilla","win")){
AnchoMas=7
AltoMas=42
}else if(EsNavegador("opera","mac")){
AltoMas=20
}else if(EsNavegador("msie","mac")) {
AltoMas=0
}else if(EsNavegador("safari","mac")){
AltoMas=20
}else if(EsNavegador("firefox","mac")){
AltoMas=8
}else if(EsNavegador("mozilla","mac")){
AltoMas=10
}
swLeft=window.screen.availWidth/2
swTop=window.screen.availHeight/2

eventoOnLoad='window.resizeTo(this.width+'+AnchoMas+',this.height+'+AltoMas+');'
/*eventoOnLoad +="window.left="+swLeft+"-(this.width/2);"
eventoOnLoad +="window.top="+swTop+"-(this.height/2);"*/
eventoOnLoad +="window.moveTo(ajustar("+swLeft+"-(this.width/2)),ajustar("+swTop+"-(this.height/2)))"
//alert(eventoOnLoad)
newContent += "<script>function ajustar(tamano){if(tamano>0){return(tamano)}else{return(1)}}"
newContent += "</script><BODY LEFTMARGIN=0 TOPMARGIN=0><IMG SRC="+Path+' onLoad="'+eventoOnLoad+'">'
newContent += "</BODY></HTML>"
newWindow.document.write (newContent)
/* 
IMG=newWindow.document.images[0]
i=0
do
{
i++
}
while(IMG.height<=0)

newWindow.resizeTo(IMG.width+10,IMG.height+30)*/

newWindow.document.close()
}
}

function VentanaConPie(Titulo,Path,Pie)
{
if(newWindow!=null)
{
newWindow.close
}

newWindow = window.open(Path,'','status=no,statusbar=no,menubar=no,resizable=no,toolbar=no,titlebar=no,top=0px,left=0px,width=1024px,height=768px');
if (newWindow != null) {

var newContent = "<HTML><HEAD><TITLE>"
newContent += Titulo
newContent += "</TITLE>"
newContent += "<link href='css/general.css' rel='stylesheet' type='text/css' />"
newContent += "<link href='css/menu.css' rel='stylesheet' type='text/css' />"
newContent += "</HEAD>"

AnchoMas=0
AltoMas=0
if(EsNavegador("opera","win")){
AnchoMas=10
AltoMas=36
}else if(EsNavegador("msie","win",";sv")){
AnchoMas=12
AltoMas=65
}else if(EsNavegador("msie","win")){
AnchoMas=12
AltoMas=65
}else if(EsNavegador("firefox","win")){
AnchoMas=7
AltoMas=55
}else if(EsNavegador("mozilla","win")){
AnchoMas=7
AltoMas=42
}else if(EsNavegador("opera","mac")){
AltoMas=20
}else if(EsNavegador("msie","mac")) {
AltoMas=0
}else if(EsNavegador("safari","mac")){
AltoMas=20
}else if(EsNavegador("firefox","mac")){
AltoMas=8
}else if(EsNavegador("mozilla","mac")){
AltoMas=10
}
swLeft=window.screen.availWidth/2
swTop=window.screen.availHeight/2

if (Pie!='') {
	AltoMas += AltoMas+5;
}

eventoOnLoad='window.resizeTo(this.width+'+AnchoMas+',this.height+'+AltoMas+');'
/*eventoOnLoad +="window.left="+swLeft+"-(this.width/2);"
eventoOnLoad +="window.top="+swTop+"-(this.height/2);"*/
eventoOnLoad +="window.moveTo(ajustar("+swLeft+"-(this.width/2)),ajustar("+swTop+"-(this.height/2)))"
//alert(eventoOnLoad)
newContent += "<script>function ajustar(tamano){if(tamano>0){return(tamano)}else{return(1)}}"
newContent += "</script><BODY LEFTMARGIN=0 TOPMARGIN=0><IMG SRC="+Path+' onLoad="'+eventoOnLoad+'">'
newContent += "<p>"+Pie+"</p></BODY></HTML>"
newContent += "</BODY></HTML>"
newWindow.document.write (newContent)
/* 
IMG=newWindow.document.images[0]
i=0
do
{
i++
}
while(IMG.height<=0)

newWindow.resizeTo(IMG.width+10,IMG.height+30)*/

newWindow.document.close()
}
}


function EsNavegador()
{
user = navigator.userAgent;
user=user.toLowerCase()
tope=arguments.length
gBoo_Navegador=true

for(var i=0;i<tope;i++)
{
if(user.indexOf(arguments[i]) == -1 ){
gBoo_Navegador=false
}
}

/*if(nav)
{
for(var i=0;i<arguments.length;i++)
{
alert(arguments[i])
}
}*/
return(gBoo_Navegador)

}
function abrir_candidatura(theURL)
{
window.open(theURL,'','width=700,height=400,top=20,left=60,scrollbars=yes');
}
