function setOpacity( value ) {
	document.getElementById("Signup").style.opacity = value / 10;
	document.getElementById("Signup").style.filter = 'alpha(opacity=' + value * 10 + ')';
}
function fadeInSignup() {
	for(var i=0;i<=10 ; i++)setTimeout('setOpacity('+i+');',50*i);
	setTimeout('setOpacity(10);refreshBox();',600);
}
function fadeOutSignup() {
	for( var i=10;i>=0;i--)setTimeout('setOpacity('+i+')',50*(10-i));
	setTimeout('closeSignup()',600);
}
function closeSignup() {
	document.getElementById("Signup").style.display = "none";
	document.getElementById("Signup").innerHTML = '';
}
function Signup(wref,idsite,track,track2){
	setOpacity( 0 );
	document.getElementById("Signup").style.display = "block";
	document.getElementById("Signup").innerHTML = '<TABLE WIDTH=100% HEIGHT=100%><TR><TD VALIGN=middle ALIGN=center><table width="760" height="500" cellpadding="0" cellspacing="0" border="0" bgcolor=#f7f7f7><tr><td align="right"><a href="javascript:fadeOutSignup();"><img id="img_closer" src="http://www.gigapass.tv/images/fermer.gif" border="0"></a></td></tr><tr><td><iframe id="iframe_pop" src="http://www.gigapass.tv/popabo.php?wref='+wref+'&idsite='+idsite+'&track='+track+'&track2='+track2+'" width="760" height="500" framespacing="0" frameborder="no" scrolling="no"></iframe></td></tr></table></tr></td></table>';
	rBox="iframe_pop";
	fadeInSignup();
}
var rBox="";
function refreshBox(){
	try {
		var ui=new Date();
		var u=ui.getTime();
		document.getElementById("img_closer").src="http://www.gigapass.tv/images/fermer.gif?"+u;
		var d=document.getElementById(rBox);
		d.src=d.src+"?"+u;
	}catch(e){}
}
function init_signup(){
	try{
		Style = document.createElement('link');
		Style.rel="stylesheet";
		Style.type="text/css";
		Style.href="http://www.gigapass.tv/popsignup.css";

		document.getElementsByTagName('head')[0].appendChild(Style);

		div=document.createElement('div');
		div.id="Signup";
		div.name="Signup";

		if(/MSIE (\d+\.\d+)/.test(navigator.userAgent)){
			var v=RegExp.$1;
			if(v < 7 ) {
				div.style.width=document.documentElement.offsetWidth+"px";
				div.style.height=document.documentElement.offsetHeight+"px";
			}
		}
		document.getElementsByTagName('body')[0].appendChild(div);
	}catch(e){
		document.write('<'+'style type="text/css"'+'>html{background:null fixed;}div#Signup { width:100%;height:100%; left:0; top:0; right:0; bottom:0; z-index:1000; display:none; overflow:none; padding:0;margin:0; background:url(http://www.gigapass.tv/images/grille.gif);}* html div#Signup {top:expression(0)+"px";bottom:expression(0)+"px";bottom:expression(0)+"px";right:expression(0)+"px";position:absolute; }html>body div#Signup{position:fixed; top:0; bottom:0;}<'+'/style'+'>');
		document.write('<DIV ID="Signup" name="Signup"></DIV>');
	}
}
function showLogin(){
	closeSignup();
	setOpacity( 0 );
	document.getElementById("Signup").style.display = "block";
	document.getElementById("Signup").innerHTML = '<TABLE WIDTH="100%" HEIGHT="100%"><TR><TD VALIGN=middle ALIGN=center WIDTH="100%" HEIGHT="100%"><table width="500" height="300" cellpadding="0" cellspacing="0" border="0" bgcolor="#f7f7f7" id="login"><tr><td align="right" height="20"><a href="javascript:fadeOutSignup();"><img id="img_closer" src="http://www.gigapass.tv/images/fermer.gif" width="100" height="20" alt="Fermer" border="0" /></a></td></tr><tr><td><iframe id="iframe_log" src="http://www.gigapass.tv/poplogin.html" width="500" height="300" framespacing="0" frameborder="no" scrolling="no"></iframe></td></tr></table></tr></td></table>';
	rBox="iframe_log";
	fadeInSignup();
}
function replaceLogin(){
	fadeOutSignup();
	setTimeout("replaceLogin2();",650);
}
function replaceLogin2(){
	document.body.removeChild(document.getElementById('Signup'));
	init_signup();
	showLogin();
}
init_signup();