// Autor: José David Guillén Domínguez ( jd@infdj.com )
// Modificado: 06-sep-03 # JD soft.

//<script language="javascript"><!--
//function Init()
//{
//	imgNames		= new Array( "bt-list", "bt-fich" );
//	imgSuffixes		= new Array( "0", "1" );
//	imgBaseURL		= "skins/<? echo $skin ?>/";
//	preloadImg();
//}
//--></script>


imgNames		= new Array();
imgSuffixes		= new Array( "0", "1" );
imgBaseURL		= "./";
imgLoaded 		= false;

function preloadImg()
{
   for (var i=0; i<imgNames.length; i++) {
      for (var j=0; j<imgSuffixes.length; j++) {
         var thisCombo=imgNames[i]+imgSuffixes[j]
         eval(thisCombo + ' = new Image()')
         eval(thisCombo + '.src = "' + imgBaseURL + thisCombo + '.gif"')
      }
   }

   imgLoaded = true;
}

function changeImg(mode,cImg) {
   if (imgLoaded && document.images != null) {
      mode=mode.toLowerCase()
      if (mode=="over") {
         document.images[cImg].src = eval(cImg+imgSuffixes[1]+".src")
      } else if (mode=="out" || mode=="up") {
         document.images[cImg].src = eval(cImg+imgSuffixes[0]+".src")
      }
   }
}


function abreVentana( hVentana, url, W, H )
{
   if ( hVentana.location && !hVentana.closed )
   {
      hVentana.location.href = url;
   } else {
      hVentana = window.open(url,hVentana,"width="+W+",height="+H+",top=50,left=50,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
      if ( !hVentana.opener ) hVentana.opener = self;
   }
   if ( window.focus ) hVentana.focus();
}

