function loadthumb(a){var b=null;if(window.XMLHttpRequest)b=new XMLHttpRequest;else if(window.ActiveXObject)b=new ActiveXObject("Microsoft.XMLHTTP");else{alert("XMLHTTPRequest objects not supported by browser, sorry");return}b.open("GET","ajax.php?loadthumb="+a,true);b.send(null);b.onreadystatechange=function(){if(b.readyState==4){document.getElementById(a).src=b.responseText}}}function nl2br(a,b){var c="";c="<br />";if(typeof b!="undefined"&&!b){c="<br>"}return(a+"").replace(/([^>]?)\n/g,"$1"+c+"\n")}function addnewsletter(a,b,c){var d=document.getElementById("news").value;if(isStringMail(d)==true){var e=null;if(window.XMLHttpRequest)e=new XMLHttpRequest;else if(window.ActiveXObject)e=new ActiveXObject("Microsoft.XMLHTTP");else{alert("XMLHTTPRequest objects not supported by browser, sorry");return}e.open("GET","http://"+b+"/js/ajax.php?newsletter="+d,false);e.send(null);if(e.readyState==4){var f=document.all?document.documentElement.scrollTop:window.pageYOffset;if(typeof window.innerHeight=="number"){windowHeight=window.innerHeight}else{if(document.body&&document.body.clientHeight){windowHeight=document.body.clientHeight}else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight}}}document.getElementById("window").style.top=20*windowHeight/100+f+"px";overlay=document.all?document.all["overlay_general"]:document.getElementById?document.getElementById("overlay_general"):"";overlay.innerHTML="";overlay.style.visibility="visible";document.body.scroll="no";my_window=document.all?document.all["contempwindow"]:document.getElementById?document.getElementById("contempwindow"):"";my_window.style.visibility="visible";my_window.innerHTML="<div style='width:100%;background-color:white;border:5px solid #404040;text-align:right;height:auto;'><div style='margin-right:0px;'><a href='#' onclick = 'javascript:cachetoutshare();return false;'><img src='http://www.insidoo.com/images/closelabel.gif' alt='close' /></a></div><div style='margin-top:20px;margin-bottom:20px;font-size:25px;font-family:arial;color:black;'><table style='margin-left:20px;'><tr><td><img src='http://www.insidoo.com/images/inscription_valid.png' alt='ok' /></td><td align='left' style='padding-left:5px;'>"+c+"</td></tr></table></div></div>"}}else{alert(a)}}function addfavorite(a,b){var c=null;if(window.XMLHttpRequest)c=new XMLHttpRequest;else if(window.ActiveXObject)c=new ActiveXObject("Microsoft.XMLHTTP");else{alert("XMLHTTPRequest objects not supported by browser, sorry");return}document.getElementById("commentpopup").innerHTML="<div style='text-align:center;margin-top:150px;'><img src='../../images/ajax-loader.gif'></div>";montreoverlay();my_window_back=document.all?document.all["windowback"]:document.getElementById?document.getElementById("windowback"):"";my_window_back.style.visibility="visible";my_window=document.all?document.all["commentpopup"]:document.getElementById?document.getElementById("commentpopup"):"";my_window.style.visibility="visible";c.open("GET","../../js/ajax.php?addfavorite="+a+"&type="+b,false);c.send(null);if(c.readyState==4){cachetout("commentpopup");hideoverlay();document.getElementById("update").style.display="block"}}function jsOnload(a,b,c){var d=new Image;d.src=c;if(d.width==0){b.width=a;b.height=80*a/100}else{var e=80*a/100;var f=a;var g=d.width*1/d.height;var h=d.width*1/d.height>1?d.width*1/f:d.height*1/e;if(g>1){var i=a;var j=f/g}else{var i=e*g;var j=80*a/100}b.width=i;b.height=j}}function addcomment(a,b,c,d,e,f,g,h,i){var j=null;b=b*1;if(window.XMLHttpRequest)j=new XMLHttpRequest;else if(window.ActiveXObject)j=new ActiveXObject("Microsoft.XMLHTTP");else{alert("XMLHTTPRequest objects not supported by browser, sorry");return}document.getElementById("loadingwhileproductsave").innerHTML="<img src='../../images/ajax-loader.gif'>";if(a=="save"){newnote=(g*h+b)/(g+1)}if(a=="delete"){if(g==1){newnote=g*h-i}else{newnote=(g*h-i)/(g-1)}}if(a=="update"){newnote=(g*h+b-i)/g}j.open("GET","../../js/ajax.php?addcomment&note="+b+"&productid="+e+"&type="+a+"&userid="+d+"&webcomment="+c+"&nbeval="+g+"&averagenote="+h+"&oldnote="+i,false);j.send(null);if(j.readyState==4){if(f!="tobedefined"){new Starbox(f,newnote,{className:"dotted",color:"#8bc21e",hoverColor:"#7fb11b",duration:.6,rerate:true,onRate:function(a,b){comment(e,"note",b.rated,f)}});cachetout("commentpopup")}else{window.location.reload()}}else{alert("Please retry...")}}function comment(a,b,c,d){var e=null;if(window.XMLHttpRequest)e=new XMLHttpRequest;else if(window.ActiveXObject)e=new ActiveXObject("Microsoft.XMLHTTP");else{alert(" XMLHTTPRequest objects not supported by browser, sorry !");return}document.getElementById("commentpopup").innerHTML="<div style='text-align:center;margin-top:150px;'><img src='../../images/ajax-loader.gif'></div>";montreoverlay();my_window_back=document.all?document.all["windowback"]:document.getElementById?document.getElementById("windowback"):"";my_window_back.style.visibility="visible";my_window=document.all?document.all["commentpopup"]:document.getElementById?document.getElementById("commentpopup"):"";my_window.style.visibility="visible";e.open("GET","../../js/ajax.php?comment&note="+c+"&id="+a+"&type="+b+"&starid='"+d+"'",false);e.send(null);if(e.readyState==4){document.getElementById("commentpopup").innerHTML=e.responseText}averagevalue=document.getElementById("avg").value;comments=document.getElementById("nbofstarbox").value;usernoteinput=document.getElementById("usernote").value;trackinput=document.getElementById("track").value;if(trackinput>0){finalvalue=usernoteinput}else{finalvalue=c}if(b=="view"){new Starbox("ratingglobal",averagevalue,{overlay:"big.png",color:"#8bc21e",hoverColor:"#7fb11b",locked:true});for(i=0;i<comments;i++){currentstarbox="name"+i;currentstarboxname=document.getElementById(currentstarbox).value;currentvalue="input"+i;starvalue=document.getElementById(currentvalue).value;new Starbox(currentstarboxname,starvalue,{color:"#8bc21e",hoverColor:"#7fb11b",locked:true})}}else{new Starbox("userrating",finalvalue,{overlay:"big.png",locked:false,rerate:true,color:"#8bc21e",hoverColor:"#7fb11b",onRate:function(a,b){document.getElementById("newnote").value=b.rated}})}}function cachetout(a){if(w3c||ie){my_window=document.getElementById("window");my_window.style.visibility="hidden";my_window_back=document.getElementById("windowback");my_window_back.style.visibility="hidden";my_window=document.getElementById("contempwindow");my_window.style.visibility="hidden";if(!document.getElementById(a)){}else{document.getElementById(a).style.visibility="hidden"}if(!document.getElementById("overlay")){my_window=document.all?document.all["overlay_general"]:document.getElementById?document.getElementById("overlay_general"):""}else{my_window=document.all?document.all["overlay"]:document.getElementById?document.getElementById("overlay"):""}my_window.style.visibility="hidden";document.body.scroll="yes"}}function similar(a){var b=null;if(window.XMLHttpRequest)b=new XMLHttpRequest;else if(window.ActiveXObject)b=new ActiveXObject("Microsoft.XMLHTTP");else{alert("XMLHTTPRequest objects not supported by browser, sorry");return}var c=document.all?document.documentElement.scrollTop:window.pageYOffset;if(typeof window.innerHeight=="number"){windowHeight=window.innerHeight}else{if(document.body&&document.body.clientHeight){windowHeight=document.body.clientHeight}else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight}}}document.getElementById("similarproducts").style.top=20*windowHeight/100+c+"px";document.getElementById("ajaxcontent").innerHTML="<div style='text-align:center;margin-top:150px;'><img src='../../images/ajax-loader.gif'></div>";montreoverlay();my_window_back=document.all?document.all["windowback"]:document.getElementById?document.getElementById("windowback"):"";my_window_back.style.visibility="visible";my_window=document.all?document.all["similarproducts"]:document.getElementById?document.getElementById("similarproducts"):"";my_window.style.visibility="visible";b.open("GET","../../js/ajax.php?similarproducts&productid="+a,false);b.send(null);if(b.readyState==4){document.getElementById("ajaxcontent").innerHTML=b.responseText}}function getSize(){if(window.innerHeight&&window.scrollMaxY){pageWidth=window.innerWidth+window.scrollMaxX;pageHeight=window.innerHeight+window.scrollMaxY}else if(document.documentElement.scrollHeight>document.documentElement.offsetHeight){pageWidth=document.documentElement.scrollWidth;pageHeight=document.documentElement.scrollHeight}else{pageWidth=document.documentElement.offsetWidth+document.body.offsetLeft;pageHeight=document.documentElement.offsetHeight+document.documentElement.offsetTop}return pageHeight}function envoimyhome(a,b,c,d,e,f,g){var h=submitForm(a,b,c,d,e,f,g);if(h==true){document.myhome.submit()}}function envoi(a,b,c,d,e,f,g){var h=submitForm(a,b,c,d,e,f,g);if(h==true){document.Membre1.submit()}}function submitForm(a,b,c,d,e,f,g){var a=a;var b=b;var c=c;var d=d;var e=e;var f=f;var g=g;if(a==1){if(isMail("ADR_EMAIL")){mail1=document.Membre1.elements["ADR_EMAIL"].value;mail2=document.Membre1.elements["ADR_EMAIL2"].value;if(mail1==mail2){Nom=document.Membre1.elements["NOM"].value;Prenom=document.Membre1.elements["PRENOM"].value;pwd=document.Membre1.elements["pwd"].value;if(Nom==""||Prenom==""){alert(b);document.Membre1.elements["NOM"].focus();document.Membre1.elements["NOM"].style.borderColor="red";return false}else{if(pwd==""||pwd.length<6){alert(c);document.Membre1.elements["pwd"].focus();document.Membre1.elements["pwd"].style.borderColor="red";return false}else{if(document.Membre1.elements["GENRE"].value==""){alert(d);document.Membre1.elements["GENRE"].focus();document.Membre1.elements["GENRE"].style.borderColor="red";return false}else{if(document.Membre1.elements["ACCEPTE_CONDITIONS"]){if(document.Membre1.elements["ACCEPTE_CONDITIONS"].checked==true){return true}else{alert(e);document.Membre1.elements["ACCEPTE_CONDITIONS"].focus();document.Membre1.elements["ACCEPTE_CONDITIONS"].style.borderColor="red";return false}}else{return true}}}}}else{alert(f);document.Membre1.elements["ADR_EMAIL2"].focus();document.Membre1.elements["ADR_EMAIL2"].style.borderColor="red";return false}}else{alert(g);document.Membre1.elements["ADR_EMAIL"].focus();document.Membre1.elements["ADR_EMAIL"].style.borderColor="red";verrou=false;return false}}if(a==2){if(IsNumeric(document.getElementById("ad_cp").value)==true&&document.getElementById("ad_cp").value.length==5){if(IsNumeric(document.getElementById("ad_nb").value)==true){if(IsNumeric(document.getElementById("rooms").value)==true&&document.getElementById("rooms").value>0){if(IsNumeric(document.getElementById("sq").value)==true&&document.getElementById("sq").value>10){if(document.getElementById("ad_type").value!=0){return true}else{alert(g);document.myhome.elements["ad_type"].focus();document.myhome.elements["ad_type"].style.borderColor="red";return false}}else{alert(e);document.myhome.elements["sq"].focus();document.myhome.elements["sq"].style.borderColor="red";return false}}else{alert(d);document.myhome.elements["rooms"].focus();document.myhome.elements["rooms"].style.borderColor="red";return false}}else{alert(c);document.myhome.elements["ad_nb"].focus();document.myhome.elements["ad_nb"].style.borderColor="red";return false}}else{alert(b);document.myhome.elements["ad_cp"].focus();document.myhome.elements["ad_cp"].style.borderColor="red";return false}}}function IsNumeric(a){var b="0123456789.";var c=true;var d;for(i=0;i<a.length&&c==true;i++){d=a.charAt(i);if(b.indexOf(d)==-1){c=false}}return c}function estVide(a){var b=document.getElementById(a).value;b=b.replace(/ /g,"");b=b.replace(/([\n])/g,"");b=b.replace(/([\r])/g,"");b=b.replace(/([\t])/g,"");if(b==""){return true}else{return false}}function isStringMail(a){var b=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]{2,}[.][a-zA-Z]{2,6}$/;if(b.exec(a)==null){return false}else{return true}}function isMail(a){var b=document.getElementById(a).value;return isStringMail(b)}function cachetoutshare(){if(w3c||ie){my_window=parent.document.getElementById("window");my_window.style.visibility="hidden";my_window_back=parent.document.getElementById("windowback");my_window_back.style.visibility="hidden";my_window=parent.document.getElementById("contempwindow");my_window.style.visibility="hidden";my_window=document.all?parent.document.all["overlay_general"]:parent.document.getElementById?parent.document.getElementById("overlay_general"):"";my_window.style.visibility="hidden";document.body.scroll="yes"}}function montrefenetre(a,b,c){var d=document.all?document.documentElement.scrollTop:window.pageYOffset;if(typeof window.innerHeight=="number"){windowHeight=window.innerHeight}else{if(document.body&&document.body.clientHeight){windowHeight=document.body.clientHeight}else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight}}}document.getElementById("window").style.top=20*windowHeight/100+d+"px";if(w3c||ie){my_window=document.all?document.all["window"]:document.getElementById?document.getElementById("window"):"";my_window.style.visibility="visible";my_window=document.all?document.all["contempwindow"]:document.getElementById?document.getElementById("contempwindow"):"";my_window.style.visibility="visible";contenuformulaire=a;my_window.innerHTML=contenuformulaire}}function affiche_overlay_windowHTML(a,b,c,d){var b=b;var c=c;montreoverlay();montrefenetre(a,b,c);return false}function montrefenetreimage(a,b,c,d,e){var f=document.all?document.documentElement.scrollTop:window.pageYOffset;if(typeof window.innerHeight=="number"){windowHeight=window.innerHeight}else{if(document.body&&document.body.clientHeight){windowHeight=document.body.clientHeight}else{if(document.documentElement&&document.documentElement.clientHeight){windowHeight=document.documentElement.clientHeight}}}document.getElementById("window").style.top=20*windowHeight/100+f+"px";if(w3c||ie){my_window_back=document.all?document.all["windowback"]:document.getElementById?document.getElementById("windowback"):"";my_window_back.style.visibility="visible";my_window=document.all?document.all["window"]:document.getElementById?document.getElementById("window"):"";my_window.style.visibility="visible";my_window=document.all?document.all["contempwindow"]:document.getElementById?document.getElementById("contempwindow"):"";my_window.style.visibility="visible";contenuformulaire="<a href='#' onclick='cachetout();return false;'><img align='right' src='../../images/closelabel.gif' style='margin-right:15px;'></a><br>"+"<span style='font-family:Arial;font-size:11px;color:#646464;'><b>"+a+"</b><br /><br /><div class='btnProd'><a href='http://www.insidoo.com/go/p/"+b+"' target='_blank' class='lienFil' style='font-size:12px;padding-top:5px;' onClick='pageTracker._trackPageview(\"/outbound/"+c+"\");'>"+d+"</a></div><br /><a href='#' onclick='cachetout();return false;'>"+e+"</a><br><br></span>";my_window.innerHTML=contenuformulaire}}function affiche_overlay_windowimage(a,b,c,d,e){montreoverlay360();montrefenetreimage(a,b,c,d,e)}function montreoverlay360(){if(w3c||ie){overlay=document.all?document.all["overlay_general"]:document.getElementById?document.getElementById("overlay_general"):"";overlay.innerHTML="";overlay.style.visibility="visible";document.body.scroll="no"}}function montreoverlay(){if(w3c||ie){overlay=document.all?document.all["overlay_general"]:document.getElementById?document.getElementById("overlay_general"):"";overlay.innerHTML="";overlay.style.visibility="visible";document.body.scroll="no"}}function logout(a,b,c,d){if(a==""){a="http://"+c+"/index.php"}document.location.href=a+"?logout"}function $(a){return document.getElementById(a)}function dropdown(){t=setTimeout("document.getElementById('dropdown').style.display='none'",1e3)}function hideoverlay(){overlay=document.getElementById("overlay_general");overlay.style.visibility="hidden"}var pageWidth=0;var w3c=document.getElementById&&!document.all;var ie=document.all;if(ie||w3c){var overlay;var my_window}i1=new Image;i1.src="../images/structure/tram.jpg";i15=new Image;i15.src="../images/structure/tramBottom.jpg";i20=new Image;i20="../images/structureInt/tramGenerale.jpg";i6=new Image;i6.src="../images/structure/sprite_png.png";i7=new Image;i7.src="../images/structure/sprite_jpg.jpg";var t
