/*********************************************
*     Script programado por Iago Rubio        
*        http://www.iagorubio.com             
*                                             
*   Puede ser usado y modificado libremente   
*   mientras conserve estas lineas, pero la   
*   propiedad del script seguira siendo del   
*    autor. Expresamente prohibido su uso     
*     comercial sin autorizacion expresa.     
*                                             
*********************************************/
/* globals sniff browser
var Browser = "none";

var BrAgen = navigator.userAgent;
var BrVers = navigator.appVersion;
var BrName = navigator.appName;  

if( BrAgen.indexOf("Opera") > 0) Browser = "Opera";
else if(BrAgen.indexOf("MSIE")>0)  Browser = "IExplorer";
else if( ((BrName == "Netscape") > 0) && (BrVers.substring(0,2)=="4.") ) Browser = "Netscape";
else if( ((BrName == "Netscape") > 0) && (BrVers.substring(0,2)=="5.") ) Browser = "Gecko";
*/

// pop up para mostrar imagen
function PopUp(nombre,img,ancho,alto){
  var ColorDeFondo = "black";//color de fondo de la ventana de la imagen
  var MargenDeLaImagen = 0;  //margen de la imagen, con la ventana que la contiene

  var Stats = "directories=no,resize=no,menubar=no,status=no,scrollbar=no";
  var ConvierteAncho = parseInt(ancho) - 2;
  var ConvierteAlto=parseInt(alto) -2;
  var TotAncho = ",width="+ConvierteAncho;
  var TotAlto = ",height="+ConvierteAlto;
  var TotStats = Stats + TotAncho + TotAlto;
  var numero = Math.round( Math.round(900-5) * Math.random() + 5 );
  var Code = "<html><head><title>"+nombre+"<\/title><\/head>";
  Code += "<body bgcolor=" +ColorDeFondo+ " onload='self.focus()' marginwidth='0'";
  Code += " marginheight='0' leftmargin='0' rightmargin='0' topmargin='0' bottommargin='0'>";
  Code += "<table border=0 cellpading=0 cellspacing=0><tr>" + "<td width='100%' height='100%' valign=top>";
  Code += "<img src='" + img + "' width=" + ancho + " height=" + alto + " border=0'>";
  Code += "<\/td><\/tr><\/table>" + "<\/body><\/html>";
  Pop="Pop"+numero;
  Ventana="ventana"+numero;
  Pop = window.open( "",Ventana,TotStats );
  Pop.document.write( Code );
  Pop.document.close();
  Pop=null;
}


/* *********************************************************** */
/*                INFORMATION PANEL by Iago Rubio              */
/* *********************************************************** 

// Main function to retrieve mouse x-y pos.s

funtion point(){
	this.x = 0;
	this.y = 0;
}

function getMousePos() {
  var p = new point();
  
  if (Browser=="IExplorer") { 
    p.x = event.clientX + document.body.scrollLeft
    p.y = event.clientY + document.body.scrollTop
  } else { 
    p.x = e.pageX
    p.x = e.pageY
  }  
  // catch possible negative values in NS4
  if (p.x < 0){p.x = 0}
  if (p.x < 0){p.x = 0}  

  return p;
}
*/
/*********************************************
*    Script programado por Iago Rubio Sanfiz  
*        http://www.iagorubio.com             
*                                             
*   Puede ser usado y modificado libremente   
*   mientras conserve estas lineas, pero la   
*     propiedad del script seguirį siendo     
*   del autor. Expresamente prohibido su uso  
*     comercial sin autorizacion expresa.     
*                                             
********************************************

var MaxX;
var MaxY;
var posX = 0;
var posY = 0;
var cWidth;
var cHeight;
var esVisible = false;

function initialize() {

   if (Browser == "IExplorer") {
      MaxX = document.body.clientWidth;
      MaxY = document.body.clientHeight;
      cWidth=info.offsetWidth;
      cHeight=info.offsetHeight;
      }
   else if (Browser == "Netscape") {
      MaxX = window.innerWidth;
      MaxY = window.innerHeight;
      cWidth=document.info.document.width;
      cHeight=document.info.document.height;
      }
   else if (Browser == "Gecko") {
      MaxX = window.innerWidth;
      MaxY = window.innerHeight;
      cWidth=document.getElementById("info").offsetWidth;
      cHeight=document.getElementById("info").offsetHeight;
      }
   else if (Browser == "Opera") {
      MaxX = window.innerWidth;
      MaxY = window.innerHeight;
      cWidth=210;
      cHeight=50;
      }
}
//
function toggle(){
if(esVisible){
    esVisible = false;
    hide();
 }else{
    esVisible = true;
    show();
 }
}
//  
function hide(){
if (Browser == "IExplorer") 
   {
   document.all("info").style.visibility="hidden";
   }
if (Browser == "Netscape") 
   { 
   document.layers["info"].visibility = "hide";
   } 
if ((Browser == "Gecko") || (Browser == "Opera")){
    document.getElementById("info").style.visibility = "hidden";
    }
}
// 
function show(){
if (Browser == "IExplorer")
   { 
   document.all("info").style.visibility="visible"; 
   }
if (Browser == "Netscape") 
   { 
   document.layers["info"].visibility = "show"; 
    } 
if ((Browser == "Gecko") || (Browser == "Opera"))
   {
    document.getElementById("info").style.visibility = "visible";
    }
}
//
function move(x,y){
    if( ((x + posX) < MaxX) ){
         posX += x;
         }
    if( ((y + posY) < MaxY) ){
        posY += y;
        }
     if (Browser == "IExplorer") {
         document.all("info").style.left = posX + document.body.scrollLeft;
         document.all("info").style.top = posY + document.body.scrollTop;
         }
    else if (Browser == "Netscape") {
         document.layers["info"].left = posX + pageXOffset;
         document.layers["info"].top = posY + pageYOffset;
         }
    else if ((Browser == "Gecko") || (Browser == "Opera")){
         document.getElementById("info").style.left = posX + pageXOffset;
         document.getElementById("info").style.top = posY + pageYOffset;
    }
}
  
*/

//-->

