var popup_url = ['http://www.hentai-suki.com/trade.php'];

var fctPopUnder = function(){
	if (document.cookie.search('popped=true')!='-1') return false;

	var DOM=(document.getElementById)?true:false;
	var IE4=(document.all&&!DOM)?true:false;
	var IE=(document.all)?true:false;
	var OP=(window.opera)?true:false;
	var NS=(navigator.appName=='Netscape' && !OP)?true:false;
	var NS4=NS&&!DOM;
	var Width=0;
	var Height=0;
	var Popped = false;


	if (screen.availWidth && screen.availHeight){
		Width = screen.availWidth;
		Height = screen.availHeight;
	}else{
		Width = screen.width;
		Height = screen.height;
	}

	var showPopup_2454 = function (){
		if ((!window.popped && popup_url.length > 0)){
			w = window.open('about:blank','','width=' + Width + ', height=' + Height + ', scrollbars=1, resizable=1, toolbar=1, location=1, menubar=1, status=1, directories=0');
			if (w!=null){
				w.moveTo(0,0);
				//w.moveBy((Width-800)/2,(Height-510)/2);
				rand = Math.random(); //retourne un nombre decimal entre 0,1
				lgt = popup_url.length; //nombre d entree ds le tableau, par exemple 3
				rand = rand * lgt; //on elargis l interval de [0-1] a [0-3]
				rand = Math.floor(rand); // partie entiere rand vaut 0, 1, 2 ou 3
				if(rand == lgt) {	// Dans le cas extrement rare (improbable) ou rand vaut 3 on le mets a 2 (cle max du tab)
					rand = lgt - 1;
				}
				w.location = popup_url[rand];
				window.blur();
				w.focus();				
				window.popped = true;
				document.cookie = "popped=true";
			}
		}
	};


	var convertAnchor_2454 = function (){
		var tags = document.getElementsByTagName('a');
		for (var ind = 0; ind < tags.length; ++ind) if (tags[ind].onclick == undefined && tags[ind].target == '') tags[ind].onclick = showPopup_2454;
	};

	var Render_2454 = function (){
		showPopup_2454();
		if (!window.popped) setInterval(convertAnchor_2454, 250);

	};

	//setTimeout('Render_2454();', 500);
	//convertAnchor_2454();
	showPopup_2454();
};

