 

/* Floating Slide Show Script C.2004 by CodeLifter.com */

// You *must* add onload="runSlideShow()" to the <body> tag
// of the page.

// In the section marked Edit the HTML, above, remember to
// set the path and size for the first image.

// =======================================
// Set the following variables
// =======================================

 
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  
 
 


// Set slideShowSpeed (milliseconds):
var slideShowSpeed = 3000

// Duration of crossfade (seconds) for IE:
var crossFadeDuration = 3

// Set the positioning variables, below:
// Negative numbers are relative to right (whereX) or bottom (whereY)
// Positive numbers are relative to left (whereX) or (whereY) top
// Experiment with values to get positioning exact, and allow
// for the dimensions of the image in the positioning
////380;//(winWidth-980) + 70;// 140;

var whereX = ((myWidth-980-15)/2)+250; 
var whereY = 205;//-233;

// Specify the image files:
var Pic = new Array() // don't touch this!
// to add more images, just continue
// the pattern, adding to the array below

//Pic[0] = 'imagenes/web_site/descp5.gif'
//Pic[1] = 'imagenes/web_site/descp5.gif'
//Pic[2] = 'float3_trans.gif'
//Pic[3] = 'float4_trans.gif'
//Pic[4] = 'float5_trans.gif'

// =======================================
// Do not edit *anything* below this line!
// =======================================

var nn=(navigator.appName.indexOf("Netscape")!=-1);
var t;var j=0;var p=Pic.length;var preLoad=new Array();
for (i=0;i<p;i++){preLoad[i]=new Image();preLoad[i].src = Pic[i];}

 
   
function ApagarPromocion() {
		document.getElementById('FloatSlideShow').style.visibility = "hidden";
}
function runSlideShowX(Imagen){
	 
	 if (Imagen!='')
	 {
	 //cambio el contenido del div..
	 Contenido=' <img border=0 src="' + Imagen + '"  width=96 height=97>';
	 document.getElementById('FloatSlideShow').innerHTML=Contenido;
	 }
function runSlideShow()
{
	if (document.all){
		document.images.SlideShow.style.filter="blendTrans(duration=2)";
		document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
		document.images.SlideShow.filters.blendTrans.Apply();}
	if (document.all || document.getElementById)
		{document.images.SlideShow.src = preLoad[j].src;}
	else{
		document.FloatSlideShow.document.images["SlideShow"].src = preLoad[j].src;}
	if (document.all)
		{document.images.SlideShow.filters.blendTrans.Play();}
	j=j+1;
 
	if (j>(p-1))j=0;
	t=setTimeout('runSlideShow()', slideShowSpeed);}
	var dD=document,dH=dD.html,dB=dD.body,px=dD.layers?'':'px';
	function floatSS(iX,iY,id){
		var L=dD.getElementById?dD.getElementById(id):dD.all?dD.all[id]:dD.layers[id];
		  
		this[id+'O']=L;
		if(dD.layers)L.style=L;L.nX=L.iX=iX;L.nY=L.iY=iY;
		L.P=function(x,y)
			{this.style.left=x+px;
			this.style.top=y+px;
			this.style.visibility='visible';
			};
		L.Fss=function(){
			var pX, pY;	
			pX=(this.iX >=0)?0:nn?innerWidth:nn&&dH.clientWidth?dH.clientWidth:dB.clientWidth;	
			pY=nn?pageYOffset:nn&&dH.scrollTop?dH.scrollTop:dB.scrollTop;	
			if(this.iY<0)pY+=nn?innerHeight:nn&&dH.clientHeight?dH.clientHeight:dB.clientHeight;	
			this.nX+=.1*(pX+this.iX-this.nX);
			this.nY+=.1*(pY+this.iY-this.nY);
			this.P(this.nX,this.nY);
			//setTimeout(this.id+'O.Fss()',33);
			};
			return L;}
	floatSS(whereX,whereY,'FloatSlideShow').Fss();
}
 
 
 // Browser safe opacity handling function
 

function setOpacity( value ) {
 document.getElementById("styled_popup").style.marginLeft=((myWidth-980)/2)  -8+ 'px';
 
 document.getElementById("styled_popup").style.opacity = value / 10;
 document.getElementById("styled_popup").style.filter = 'alpha(opacity=' + value * 10 + ')';
  
	 
}

function fadeInMyPopup() {
 for( var i = 0 ; i <= 100 ; i++ )
   setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
   
}

function fadeOutMyPopup() {
 for( var i = 0 ; i <= 100 ; i++ ) {
   setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );
 }

 setTimeout('closeMyPopup()', 800 );
}

function closeMyPopup() {
 document.getElementById("styled_popup").style.display = "none"
}

function fireMyPopupTimer(Imagen,XWidth,Xheigth,Tiempo) {
	  
 setOpacity( 0 );
 Contenido='<table width="' + (XWidth) + '" height="' + (1*Xheigth + 23) + '" cellpadding="0" cellspacing="0" border="0"><tr><td><img height="23" width="' + (1*XWidth - 20) + '" src="imagenes/web_site/barra.gif"></td><td><a href="javascript:fadeOutMyPopup();"><img height="23" width="24" src="imagenes/web_site/x11_close.gif" border="0"></a></td></tr><tr><td colspan="2" ><a href="javascript:fadeOutMyPopup();"><img src="imagenes/web_site/' + Imagen + '" width="' + XWidth + '" height="' + Xheigth + '" /></a></td></tr></table>';
 document.getElementById('styled_popup').innerHTML=Contenido;
  
 document.getElementById("styled_popup").style.display = "block";
 fadeInMyPopup();
 setTimeout('fadeOutMyPopup()',Tiempo+800);
}

function fireMyPopup(Imagen,XWidth,Xheigth) {
	  
 setOpacity( 0 );
 Contenido='<table width="' + (XWidth) + '" height="' + (1*Xheigth + 23) + '" cellpadding="0" cellspacing="0" border="0"><tr><td><img height="23" width="' + (1*XWidth - 20) + '" src="imagenes/web_site/barra.gif"></td><td><a href="javascript:fadeOutMyPopup();"><img height="23" width="24" src="imagenes/web_site/x11_close.gif" border="0"></a></td></tr><tr><td colspan="2" ><a href="javascript:fadeOutMyPopup();"><img src="imagenes/web_site/' + Imagen + '" width="980" height="492" /></a></td></tr></table>';
 document.getElementById('styled_popup').innerHTML=Contenido;
  
 document.getElementById("styled_popup").style.display = "block";
 fadeInMyPopup();
}