






function getBody(){
	var body = document.getElementsByTagName("body");
	if(body.length>0){
		body=body[0];
	}else{
		body=document.lastChild;
	}
	return body;	
}

function simpleConnect(source,event,func){	
	if(source[event]==null){
		source[event]=func;	
	}else{
		var old=source[event];		
		source[event]=function(e){old(e);return func(e);};		
	}
}

function G_includeCss(fileName){
	  var fileref=document.createElement("link");
	  fileref.setAttribute("rel", "stylesheet");
	  fileref.setAttribute("type", "text/css");
	  fileref.setAttribute("href", fileName);
	  var body=getBody();
	  body.appendChild(fileref);	  
}
function callbackslot3129(html){
	var ids="slot3129";	
	document.getElementById(ids).innerHTML=html;
	
	//execJs(3129);	
}
function includeScript(src){
	var script = document.createElement('script');
    script.src = src;   
    script.type = 'text/javascript'; 
    // Et injection dans le DOM :
    getBody().appendChild(script);
}


function G_isIE(){
	var browser=navigator.appName;
	var b_version=navigator.appVersion;
	var version=parseFloat(b_version);
	if(browser.indexOf("Explorer")>0)
		return true;
	return false;
}
function G_refresh(){
	var script= 'http://server.adinlive.com//tojs.jsp?func=callbackslot3129&page=getAd.jsp?id=3129&template=mij&nb=5&class=geewizz&keyword=edenly&category=832&engine=shopping&min=150&max=1500';	    
	includeScript(script);
}

function G_change(keyword,min,max,category,engine){
 var slot=document.getElementById("slot3129");
 slot.innerHTML="<p>Chargement...</p>";
 var script = "http://server.adinlive.com//tojs.jsp?func=callbackslot3129&nb=5&page=getAd.jsp&id=3129&template=mij&class=geewizz&keyword="+keyword+"&category="+category+"&engine="+engine+"&min="+min+"&max="+max;
 includeScript(script);
}

(function(){
	
	var onlo=function(){		
		var script= 'http://server.adinlive.com//tojs.jsp?func=callbackslot3129&page=getAd.jsp?id=3129&template=mij&nb=5&class=geewizz&keyword=edenly&category=832&engine=shopping&min=150&max=1500';	    
	    includeScript(script);
	}
	
	//onlo();
	if(G_isIE()){
	   simpleConnect(window,"onload",onlo);
   }else{
    onlo();
   }	
})();

