var ventana = "";

function setOpacity(value) {
	document.getElementById(ventana).style.opacity = value / 10;
	document.getElementById(ventana).style.filter = 'alpha(opacity=' + value * 10 + ')';
}

function fadeInMyPopup() {
	for( var i = 0 ; i <= 100 ; i++ )
		setTimeout( 'setOpacity(' + (i / 10) + ')' , 8 * i );
}

function fadeOutMyPopup(x) {
	ventana = x;
	for( var i = 0 ; i <= 100 ; i++ ) {
		setTimeout( 'setOpacity(' + (10 - i / 10) + ')' , 8 * i );
	}

	setTimeout('closeMyPopup()', 800 );
}

function closeMyPopup() {
	document.getElementById(ventana).style.display = "none"
	document.all.icontenido.src=""
}

function fireMyPopup(x,direccion,imagen,barra) {
	//variables que usaremos
	var carpetaimg = "imagenes/";

	//acciones a realizar
	document.all.icontenido.src=direccion;
	document.all.icontenido.scrolling=barra;
	document.images["barra"].src = carpetaimg+imagen;
	ventana = x;
	setOpacity( 0 );
	document.getElementById(ventana).style.display = "block";
	window.setTimeout(fadeInMyPopup(),5000);	
//fadeInMyPopup();
}

function AreaCliente(){

    Shadowbox.open({
        content:    'http://www.dinfotec.com/Clientes/',
        player:     'iframe',
        width:      900
    });

};

