function ResolucionX(){
   if (self.screen) {     // for NN4 and IE4
    width = screen.width
  // Testing this first prevents firing the slow Java of NN4
  }
  else if (self.java) {   // for NN3 with enabled Java
    var jkit = java.awt.Toolkit.getDefaultToolkit();
    var scrsize = jkit.getScreenSize();       
    width = scrsize.width; 
  }
  else{
    width = height = '?'; // N2, E3, N3 w/Java off, probably Opera and WebTV
  }
  return width;
}

function ResolucionY(){
   if (self.screen) {     // for NN4 and IE4
    height = screen.height
  // Testing this first prevents firing the slow Java of NN4
  }
  else if (self.java) {   // for NN3 with enabled Java
    var jkit = java.awt.Toolkit.getDefaultToolkit();
    var scrsize = jkit.getScreenSize();       
    height = scrsize.height; 
  }
  else{
    height = width = '?'; // N2, E3, N3 w/Java off, probably Opera and WebTV
  }
  return height;
}

function Resolucion(){
   if (self.screen) {     // for NN4 and IE4
    width = screen.width
    height = screen.height
  // Testing this first prevents firing the slow Java of NN4
  }
  else if (self.java) {   // for NN3 with enabled Java
    var jkit = java.awt.Toolkit.getDefaultToolkit();
    var scrsize = jkit.getScreenSize();       
    width = scrsize.width; 
    height = scrsize.height; 
  }
  else{
    width = height = '?'; // N2, E3, N3 w/Java off, probably Opera and WebTV
  }
  return (width +"x"+ height);
}

function MsgBox(str){
  alert(str);
}

function MM_setTextOfTextfield(objName,x,newText) { //v3.0
  var obj = MM_findObj(objName); if (obj) obj.value = newText;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
  var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
  
}*/
function MM_jumpMenu(pag,targ,selObj,restore){ //v3.0
  //  alert("'"+pag+selObj.options[selObj.selectedIndex].value+"'");
  eval(targ+".location='"+pag+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
	
function MM_jumpMenuPag(pag,targ,selObj,restore,openw){ //v3.0
  // cat/art & ncat & npag & pagxblq &
  var blq,p,n,a,i;
  n=selObj.options[selObj.selectedIndex].value; 
  a=new Array; 
  for (i=0;(p=n.indexOf("&"))>0;i++){
    a[i]=n.substring(0,p);
	n=n.substring(p+1);
  }
  if (a.length>0){	
    blq=(parseInt((a[2]-1)/a[3])*a[3])+1;
    eval(targ+".location='"+pag+"?mod="+a[0]+"&"+a[0]+"="+a[1]+"&pag="+blq+"'");
    if (restore) selObj.selectedIndex=0;
    // EN CASO DE NO HACER EL RESIZE EN VISOR scrollbars=yes,width=750,height=550,screenX=50,screenY=0,top=0,left=50	
    if (openw) MM_openBrWindow('Visor.php'+"?"+a[0]+"="+a[1]+"&pag="+a[2],'Visor','scrollbars=yes,width=0,height=0,screenX=0,screenY=0,top=0,left=0');
  }
}  

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function Redirige(obj,dir){
  eval(obj+".location='"+dir+"'");
}

// IMAGEN FLOTANTE ************************************
/*
function MM_controlSound(sndAction,_sndObj) { //v2.0
  var sndObj = eval( _sndObj );
  if (sndObj != null) {
    if (sndAction=='stop') {
      sndObj.stop();
    } else {
      if (navigator.appName == 'Netscape' ) {
         sndObj.play();
      } else {
         if (document.MM_WMP_DETECTED == null) {
            document.MM_WMP_DETECTED = false;
            var i;
            for( i in sndObj )
               if ( i == "ActiveMovie" ) {
                  document.MM_WMP_DETECTED = true;
                  break; }
         }
         if (document.MM_WMP_DETECTED)
            sndObj.play();
         else if ( sndObj.FileName )
            sndObj.run();
}}}}

function MM_timelinePlay(tmLnName, myID) { //v1.2
  //Copyright 1997 Macromedia, Inc. All rights reserved.
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  tmLn = document.MM_Time[tmLnName];
  if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
  if (myID == tmLn.ID) { //if Im newest
    setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
    fNew = ++tmLn.curFrame;
    for (i=0; i<tmLn.length; i++) {
      sprite = tmLn[i];
      if (sprite.charAt(0) == 's') {
        if (sprite.obj) {
          numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
          if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
            keyFrm=1;
            for (j=0; j<sprite.values.length; j++) {
              props = sprite.values[j]; 
              if (numKeyFr != props.length) {
                if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
              } else {
                while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                  if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                  else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
        } } } } }
      } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
      if (fNew > tmLn.lastFrame) tmLn.ID = 0;
  } }
}

function MM_timelineGoto(tmLnName, fNew, numGotos) { //v2.0
  //Copyright 1997 Macromedia, Inc. All rights reserved.
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  tmLn = document.MM_Time[tmLnName];
  if (numGotos != null)
    if (tmLn.gotoCount == null) tmLn.gotoCount = 1;
    else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}
  jmpFwd = (fNew > tmLn.curFrame);
  for (i = 0; i < tmLn.length; i++) {
    sprite = (jmpFwd)? tmLn[i] : tmLn[(tmLn.length-1)-i]; //count bkwds if jumping back
    if (sprite.charAt(0) == "s") {
      numKeyFr = sprite.keyFrames.length;
      firstKeyFr = sprite.keyFrames[0];
      lastKeyFr = sprite.keyFrames[numKeyFr - 1];
      if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew)) continue; //skip if untouchd
      for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]; keyFrm++);
      for (j=0; j<sprite.values.length; j++) {
        props = sprite.values[j];
        if (numKeyFr == props.length) propNum = keyFrm-1 //keyframes only
        else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1); //or keep in legal range
        if (sprite.obj != null) {
          if (props.prop2 == null) sprite.obj[props.prop] = props[propNum];
          else        sprite.obj[props.prop2][props.prop] = props[propNum];
      } }
    } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
  }
  tmLn.curFrame = fNew;
  if (tmLn.ID == 0) eval('MM_timelinePlay(tmLnName)');
}

function MM_initTimelines() {
    //MM_initTimelines() Copyright 1997 Macromedia, Inc. All rights reserved.
    var ns = navigator.appName == "Netscape";
    document.MM_Time = new Array(1);
    document.MM_Time[0] = new Array(2);
    document.MM_Time["Timeline1"] = document.MM_Time[0];
    document.MM_Time[0].MM_Name = "Timeline1";
    document.MM_Time[0].fps = 15;
    document.MM_Time[0][0] = new String("sprite");
    document.MM_Time[0][0].slot = 1;
    if (ns)
        document.MM_Time[0][0].obj = document["Layer1"];
    else
        document.MM_Time[0][0].obj = document.all ? document.all["Layer1"] : null;
    document.MM_Time[0][0].keyFrames = new Array(1, 9, 19, 33, 47, 61, 79, 95, 110, 130);
    document.MM_Time[0][0].values = new Array(2);
    document.MM_Time[0][0].values[0] = new Array(573,560,591,610,599,584,533,481,431,394,359,327,296,267,238,209,179,147,115,102,96,95,96,98,101,105,109,114,119,125,131,137,144,151,160,170,180,189,199,208,218,228,238,249,260,271,277,271,262,253,243,232,221,210,198,187,176,165,155,146,143,154,167,179,190,202,214,225,236,248,259,271,282,294,306,318,331,344,355,356,353,348,342,335,328,321,314,306,299,291,283,275,268,261,260,274,286,297,308,319,331,343,355,368,383,398,415,434,455,479,498,517,536,555,535,510,469,429,385,350,325,275,300,340,380,420,450,480,520,573);
    document.MM_Time[0][0].values[0].prop = "left";
    document.MM_Time[0][0].values[1] = new Array(24,42,61,80,98,114,128,138,143,139,129,116,101,85,69,53,38,27,32,55,82,109,137,164,192,219,246,271,295,317,339,360,379,392,403,411,418,423,427,430,432,434,435,434,433,428,419,405,392,379,367,354,340,327,313,299,285,271,257,242,225,221,223,227,231,235,239,244,248,252,257,261,265,270,273,277,279,280,274,259,245,230,216,202,188,174,160,146,131,117,102,87,72,56,40,51,66,81,97,113,129,145,160,176,191,206,220,233,242,245,243,237,230,222,213,202,192,180,168,156,143,130,117,103,90,76,63,50,36,24);
    document.MM_Time[0][0].values[1].prop = "top";
    if (!ns) {
        document.MM_Time[0][0].values[0].prop2 = "style";
        document.MM_Time[0][0].values[1].prop2 = "style";
    }
    document.MM_Time[0][1] = new String("behavior");
    document.MM_Time[0][1].frame = 130;
    document.MM_Time[0][1].value = "MM_timelineGoto('Timeline1','1')";
    document.MM_Time[0].lastFrame = 130;
    for (i=0; i<document.MM_Time.length; i++) {
        document.MM_Time[i].ID = null;
        document.MM_Time[i].curFrame = 0;
        document.MM_Time[i].delay = 1000/document.MM_Time[i].fps;
    }
}
*/