function GetXmlHttpObject(){var objXMLHttp=null;if(window.XMLHttpRequest)objXMLHttp=new XMLHttpRequest;else if(window.ActiveXObject)objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");return objXMLHttp}function stateChanged(fonction,xmlHttp){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete")fonction(xmlHttp.responseText)}
function htmlData(url,type,fonction,param,name){var xmlHttp=GetXmlHttpObject();if(xmlHttp==null){alert("Browser does not support HTTP Request");return}url=url+"&l="+langue+"&sid="+name+Math.random();if(type=="GET"){xmlHttp.open("GET",url,true);xmlHttp.send(param)}else{xmlHttp.open("POST",url,true);if(param!=""){xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.setRequestHeader("Content-length",param.length);xmlHttp.setRequestHeader("Connection","close")}xmlHttp.send(param)}xmlHttp.onreadystatechange=
function(){stateChanged(fonction,xmlHttp)}}
function refresh_home_list_geo(val){var selected_index;var select;var tab;var tab2;var f;var tab_select_group;var total_select_group;var tab_select_option;var total_select_option;var option;var optgroup;var doc=eval("("+val+")");for(var cpt_obj=0;cpt_obj<doc.obj.length;cpt_obj++){var tab=doc.obj[cpt_obj];select=0;selected_index=1;f=document.getElementById(tab["element"]);if(tab["element"]=="selnbpers_geo")document.getElementById("selnbroom_geo").style.display="none";if(tab["element"]=="selnbroom_geo")document.getElementById("selnbpers_geo").style.display=
"none";f.style.display="block";while(f.hasChildNodes())f.removeChild(f.firstChild);option=document.createElement("option");option.value="";option.appendChild(document.createTextNode(tab["title"]));f.appendChild(option);tab_select_group=tab["select"];total_select_group=tab_select_group.length;for(var i=0;i<total_select_group;i++){if(tab_select_group[i]["line"]=="")continue;if(tab["element"]!="seltypeloc_geo"&&tab["element"]!="selnbpers_geo"&&tab["element"]!="selnbroom_geo"){optgroup=document.createElement("optgroup");
optgroup.label="------------------------------";f.appendChild(optgroup)}tab_select_option=String(tab_select_group[i]["line"]).split("*/*");total_select_option=tab_select_option.length;for(var j=0;j<total_select_option;j++){if(tab_select_option[j]=="")continue;if(tab_select_option[j].indexOf("__")>0){tab2=String(tab_select_option[j]).split("__");var option=document.createElement("option");option.value=tab2[0];option.appendChild(document.createTextNode(tab2[1]));if(tab["element"]!="seltypeloc_geo"&&
tab["element"]!="selnbpers_geo"&&tab["element"]!="selnbroom_geo")optgroup.appendChild(option);else f.appendChild(option);if(tab2[0]==tab["selected"])select=selected_index}selected_index++}}f.selectedIndex=select;if(tab["disabled"]==0)f.disabled=true;else f.disabled=false;if(tab["region"])document.frm_holidays.selregion.value=tab["region"];if(tab["departement"])document.frm_holidays.seldepartement.value=tab["departement"]}disabled_geo_form(false)}
function refresh_home_geo(){disabled_geo_form(true);var str="selcontinent="+document.getElementById("selcontinent_geo").value;str+="&selpays="+document.getElementById("selpays_geo").value;str+="&regdept="+document.getElementById("regdept_geo").value;str+="&selville="+document.getElementById("selville_geo").value;str+="&proom="+document.getElementById("proom").value;htmlData("script/async_geo.html","POST",refresh_home_list_geo,str,"geo")}
function disabled_geo_form(type){if(type){document.getElementById("home_geo_shadow").style.width=document.getElementById("home_geo_tab").clientWidth;document.getElementById("home_geo_shadow").style.height=document.getElementById("home_geo_tab").clientHeight;document.getElementById("home_geo_shadow").style.cursor="wait"}else{document.getElementById("home_geo_shadow").style.width=0;document.getElementById("home_geo_shadow").style.height=0;document.getElementById("home_geo_shadow").style.cursor="auto"}}
;function waiting_shadow(a){if(!a){document.getElementById("div_shadow2").style.width=document.getElementById("main_tab").clientWidth;document.getElementById("div_shadow2").style.height=document.getElementById("main_tab").clientHeight;if(document.getElementById("loading_img")){document.getElementById("DivLoad").style.display="block";document.getElementById("loading_img").src=document.getElementById("loading_img").src;document.getElementById("loading_img").style.display=""}else document.getElementById("DivLoad").style.visibility=
"visible"}}function Add_Event(a,b,d,c){a.addEventListener?a.addEventListener(b,d,c?c:false):a.attachEvent("on"+b,d)}function GetScrollPage(){var a,b;if(window.innerWidth)with(window){a=pageXOffset;b=pageYOffset}else{a=document.documentElement&&document.documentElement.clientWidth?document.documentElement:document.body;with(a){a=scrollLeft;b=scrollTop}}return{top:b,left:a}}
function ObjGetPosition(a){var b=0,d=0;if(a=typeof a=="object"?a:document.getElementById(a)){b=0;d=a.offsetTop;if(a.offsetParent)for(;a=a.offsetParent;)if(a.offsetParent){b+=a.offsetLeft;d+=a.offsetTop}}return{left:b,top:d}}var IdTimer_1,IdTimer_2,O_DivScroll,Rapport=0.25,Mini=2*Rapport;
function DIV_Scroll(a){var b=document.getElementById(a);if(this.Obj=b){b.style.position="absolute";a=ObjGetPosition(a);this.PosX=a.left;this.PosY=a.top;this.DebX=this.PosX;this.DebY=this.PosY;this.NewY=this.NewX=0;this.Move=DIV_Deplace}}
function DIV_Deplace(a,b){if(a!=null){this.PosX=a;this.Obj.style.left=parseInt(a)+"px";this.Obj.style.width=document.getElementById("main_tab").clientWidth>document.body.clientWidth?document.getElementById("main_tab").clientWidth:document.body.clientWidth}if(b!=null){this.PosY=document.body.clientHeight>160?b+(document.body.clientHeight-160)/7:b;this.Obj.style.top=parseInt(b)+"px"}}
function DIV_Replace(a,b){var d=(a-O_DivScroll.PosX)*Rapport,c=(b-O_DivScroll.PosY)*Rapport;if(c<Mini&&c>-Mini&&d<Mini&&d>-Mini){clearInterval(IdTimer_1);O_DivScroll.Move(a,b)}else O_DivScroll.Move(O_DivScroll.PosX+d,O_DivScroll.PosY+c)}function DIV_CheckScroll(){var a=GetScrollPage();O_DivScroll.NewX=O_DivScroll.DebX;O_DivScroll.NewY=a.top+O_DivScroll.DebY;clearInterval(IdTimer_1);IdTimer_1=setInterval("DIV_Replace("+O_DivScroll.NewX+","+O_DivScroll.NewY+")",10);return true}
function DIV_InitScroll(){O_DivScroll=new DIV_Scroll("DivLoad");if(O_DivScroll.Obj)IdTimer_2=setInterval("DIV_CheckScroll()",100)}
function create_loading(a){a=DetectFlashVer(6,6,6)?'\t<div id="DivLoad" style="position:absolute; visibility:hidden; z-index:2000;"><center><div style="position:relative; width:160px; height:160px; vertical-align:middle;"><object \tcodebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="160" height="160"><param name="movie" value="script/loading.swf"><param name="quality" value="high"><param name="wmode" value="transparent"><embed \tsrc="script/loading.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="160" height="160"wmode="transparent"></embed></object></div></center></div>':'\t<div id="DivLoad" style="display:none; z-index:2000;"><center><div style="position:relative; width:160px; height:160px; vertical-align:middle;"><img id="loading_img" src="'+
a+'"></div></center></div>';document.write(a);Add_Event(window,"load",DIV_InitScroll);window.onunload=function(){document.getElementById("DivLoad").style.display="none"}}var isIE=navigator.appVersion.indexOf("MSIE")!=-1?true:false,isWin=navigator.appVersion.toLowerCase().indexOf("win")!=-1?true:false,isOpera=navigator.userAgent.indexOf("Opera")!=-1?true:false;
function ControlVersion(){var a,b;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(d){}if(!a)try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(c){}if(!a)try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(g){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(f){}if(!a)try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
a="WIN 2,0,0,11"}catch(e){a=-1}return a}
function GetSwfVer(){var a=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){a=navigator.plugins["Shockwave Flash"+(navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"")].description.split(" ");var b=a[2].split("."),d=b[0];b=b[1];var c=a[3];if(c=="")c=a[4];if(c[0]=="d")c=c.substring(1);else if(c[0]=="r"){c=c.substring(1);if(c.indexOf("d")>0)c=c.substring(0,c.indexOf("d"))}a=d+"."+b+"."+c}}else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=
-1)a=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)a=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)a=2;else if(isIE&&isWin&&!isOpera)a=ControlVersion();return a}
function DetectFlashVer(a,b,d){versionStr=GetSwfVer();if(versionStr==-1)return false;else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else versionArray=versionStr.split(".");var c=versionArray[0],g=versionArray[1],f=versionArray[2];if(c>parseFloat(a))return true;else if(c==parseFloat(a))if(g>parseFloat(b))return true;else if(g==parseFloat(b))if(f>=parseFloat(d))return true;return false}}
function AC_AddExtension(a,b){return a.indexOf("?")!=-1?a.replace(/\?/,b+"?"):a+b}function AC_Generateobj(a,b,d){var c="";if(isIE&&isWin&&!isOpera){c+="<object ";for(var g in a)c+=g+'="'+a[g]+'" ';for(g in b)c+='><param name="'+g+'" value="'+b[g]+'" /> ';c+="></object>"}else{c+="<embed ";for(g in d)c+=g+'="'+d[g]+'" ';c+="> </embed>"}document.write(c)}
function AC_FL_RunContent(){var a=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}
function AC_GetArgs(a,b,d,c,g){var f={};f.embedAttrs={};f.params={};f.objAttrs={};for(var e=0;e<a.length;e+=2)switch(a[e].toLowerCase()){case "classid":break;case "pluginspage":f.embedAttrs[a[e]]=a[e+1];break;case "src":case "movie":a[e+1]=AC_AddExtension(a[e+1],b);f.embedAttrs.src=a[e+1];f.params[d]=a[e+1];break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":case "codebase":f.objAttrs[a[e]]=
a[e+1];break;case "id":case "width":case "height":case "align":case "vspace":case "hspace":case "class":case "title":case "accesskey":case "name":case "tabindex":f.embedAttrs[a[e]]=f.objAttrs[a[e]]=a[e+1];break;default:f.embedAttrs[a[e]]=f.params[a[e]]=a[e+1]}f.objAttrs.classid=c;if(g)f.embedAttrs.type=g;return f};function disabled_form(type){if(type){document.getElementById("div_shadow").style.width=document.getElementById("main_tab").clientWidth;document.getElementById("div_shadow").style.height=document.getElementById("main_tab").clientHeight;document.getElementById("div_shadow").style.cursor="wait"}else{document.getElementById("div_shadow").style.width=0;document.getElementById("div_shadow").style.height=0;document.getElementById("div_shadow").style.cursor="auto"}}
function refresh_box(val){var tab=String(val).split("*/*");document.getElementById("div_crit_1").innerHTML=tab[1];document.getElementById("div_crit_1").style.overflow="auto";document.getElementById("div_crit_2").innerHTML=tab[1];document.getElementById("div_crit_2").style.overflow="auto";document.getElementById("div_crit_3").innerHTML=tab[1];document.getElementById("div_crit_3").style.overflow="auto";document.getElementById("div_crit_refresh_1").innerHTML=tab[2];document.getElementById("div_crit_refresh_2").innerHTML=
tab[2];document.getElementById("div_crit_refresh_3").innerHTML=tab[2];document.getElementById("tr_refresh_1").onclick=function(){eval(tab[3])};document.getElementById("tr_refresh_2").onclick=function(){eval(tab[3])};document.getElementById("tr_refresh_3").onclick=function(){eval(tab[3])};document.getElementById("div_count_refresh_1").innerHTML=tab[4];document.getElementById("div_count_refresh_2").innerHTML=tab[4];document.getElementById("div_count_refresh_3").innerHTML=tab[4];var tab_day=String(tab[5]).split("_");
document.getElementById("selday").value=tab_day[0];document.getElementById("selmonth").value=tab_day[1];var tab_day2=String(tab[6]).split("_");document.getElementById("selday2").value=tab_day2[0];document.getElementById("selmonth2").value=tab_day2[1];disabled_form(false)}
function create_search_hidden(nb,start,name){var f=document.frmsearch;var new_obj;for(var i=1;i<=nb;i++){new_obj=document.createElement("input");new_obj.setAttribute("type","hidden");eval('new_obj.setAttribute("name", "'+name+(i+start)+'")');eval('new_obj.setAttribute("id", "'+name+(i+start)+'")');f.appendChild(new_obj)}}
function count_theme(){disabled_form(true);var cpt_theme=0;for(var i=1;i<=4;i++)if(eval("document.frmsearch.theme"+i+".checked==true"))cpt_theme++;document.getElementById("span_cpt_theme").innerHTML=cpt_theme+" / 4"}function count_activ(){disabled_form(true);var cpt_activ=0;for(var i=1;i<=8;i++)if(eval("document.frmsearch.activ"+i+".checked==true"))cpt_activ++;document.getElementById("span_cpt_activ").innerHTML=cpt_activ+" / 8"}
function count_othertheme(){disabled_form(true);var cpt_othertheme=0;for(var i=1;i<=4;i++)if(eval("document.frmsearch.othertheme"+i+".checked==true"))cpt_othertheme++;document.getElementById("span_cpt_othertheme").innerHTML=cpt_othertheme+" / 4"}
function ajouterelement(name){if(eval("document.frmsearch.select"+name+"1.selectedIndex>=0")){disabled_form(true);eval("var dummy = new Option(document.frmsearch.select"+name+"1.options[document.frmsearch.select"+name+"1.selectedIndex].text,document.frmsearch.select"+name+"1.value,false,true)");eval("document.frmsearch.select"+name+"2.options[document.frmsearch.select"+name+"2.length]=dummy;");var pos=eval("document.frmsearch.select"+name+"1.selectedIndex");eval("document.frmsearch.select"+name+"1.options[document.frmsearch.select"+
name+"1.selectedIndex]=null;");eval("document.frmsearch.del_"+name+".disabled=false;");eval("copy"+name+"();");eval("if (document.frmsearch.select"+name+"1.length<=0) document.frmsearch.add_"+name+".disabled=true;");if(pos>=eval("document.frmsearch.select"+name+"1.length"))pos=eval("document.frmsearch.select"+name+"1.length")-1;eval("document.frmsearch.select"+name+"1.selectedIndex=pos;");eval("document.frmsearch.select"+name+"2.selectedIndex=(document.frmsearch.select"+name+"2.length-1);")}}
function effacerelement(name){if(eval("document.frmsearch.select"+name+"2.length>=0 && document.frmsearch.select"+name+"2.selectedIndex>=0")){disabled_form(true);var pos=eval("document.frmsearch.select"+name+"2.selectedIndex");eval("document.frmsearch.select"+name+"2.options[document.frmsearch.select"+name+"2.selectedIndex]=null;");eval("reset"+name+"(0);");eval("document.frmsearch.add_"+name+".disabled=false;");eval("copy"+name+"();");eval("if (document.frmsearch.select"+name+"2.length<=0) document.frmsearch.del_"+
name+".disabled=true;");if(pos>=eval("document.frmsearch.select"+name+"2.length"))pos=eval("document.frmsearch.select"+name+"2.length")-1;eval("document.frmsearch.select"+name+"2.selectedIndex=pos;")}}
function copyelement(name){for(var i=1;i<=eval("nb_"+name);i++){eval('document.getElementById("sel'+name+(i+9)+'").value = ""');if(eval("document.frmsearch.select"+name+"2.length>="+i))eval('document.getElementById("sel'+name+(i+9)+'").value=document.frmsearch.select'+name+"2.options[i-1].value")}eval("count_"+name+" ()")}function ajouterleisure(){ajouterelement("leisure")}function ajoutersupervised(){ajouterelement("supervised")}function effacerleisure(){effacerelement("leisure")}
function effacersupervised(){effacerelement("supervised")}function copyleisure(){for(var i=1;i<=nb_leisure;i++){eval('document.getElementById("selleisure'+(i+9)+'").value = ""');if(eval("document.frmsearch.selectleisure2.length>="+i))eval('document.getElementById("selleisure'+(i+9)+'").value=document.frmsearch.selectleisure2.options[i-1].value')}count_leisure()}
function copysupervised(){for(var i=1;i<=nb_supervised;i++){eval('document.getElementById("selsupervised'+i+'").value = ""');if(eval("document.frmsearch.selectsupervised2.length>="+i))eval('document.getElementById("selsupervised'+i+'").value=document.frmsearch.selectsupervised2.options[i-1].value')}count_leisure()}
function count_leisure(){disabled_form(true);var cpt_leisure=0;for(var i=1;i<=9;i++)if(eval("document.frmsearch.selleisure"+i+".checked==true"))cpt_leisure++;document.getElementById("span_cpt_leisure").innerHTML=cpt_leisure+document.frmsearch.selectleisure2.length+document.frmsearch.selectsupervised2.length+" / "+(nb_leisure+nb_supervised+9)}
function refresh_list_leisure(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selectleisure1.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selectleisure1.options[document.frmsearch.selectleisure1.length]=dummy}document.frmsearch.selectleisure1.selectedIndex=0;if(document.frmsearch.selectleisure1.length==0)document.frmsearch.add_leisure.disabled=true;else document.frmsearch.add_leisure.disabled=
false;if(document.frmsearch.selectleisure2.length==0)document.frmsearch.del_leisure.disabled=true;else document.frmsearch.del_leisure.disabled=false}
function resetleisure(all){if(all==1){for(var i=1;i<=9;i++)eval("document.frmsearch.selleisure"+i+".checked=false");document.frmsearch.selectleisure2.length=0;document.frmsearch.add_leisure.disabled=false;document.frmsearch.del_leisure.disabled=true}copyleisure();var str="type=leisure";if(all==0){var total=document.frmsearch.selectleisure2.length;for(var cpt=0;cpt<total;cpt++)str+="&selleisure"+cpt+"="+encodeURI(document.frmsearch.selectleisure2.options[cpt].value)}htmlData("script/search_list_async.html",
"POST",refresh_list_leisure,str,"leisure")}
function refresh_list_supervised(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selectsupervised1.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selectsupervised1.options[document.frmsearch.selectsupervised1.length]=dummy}document.frmsearch.selectsupervised1.selectedIndex=0;if(document.frmsearch.selectsupervised1.length==0)document.frmsearch.add_supervised.disabled=
true;else document.frmsearch.add_supervised.disabled=false;if(document.frmsearch.selectsupervised2.length==0)document.frmsearch.del_supervised.disabled=true;else document.frmsearch.del_supervised.disabled=false}
function resetsupervised(all){if(all==1){document.frmsearch.selectsupervised2.length=0;document.frmsearch.add_supervised.disabled=false;document.frmsearch.del_supervised.disabled=true}copysupervised();var str="type=supervised";if(all==0){var total=document.frmsearch.selectsupervised2.length;for(var cpt=1;cpt<=total;cpt++)str+="&selsupervised"+cpt+"="+encodeURI(document.frmsearch.selectsupervised2.options[cpt-1].value)}htmlData("script/search_list_async.html","POST",refresh_list_supervised,str,"supervised")}
function refresh_list_surrounding1(val){var tab=String(val).split("*/*");var total=tab.length;var select=0;var selected_value=document.frmsearch.selsurroundings1.value;document.frmsearch.selsurroundings1.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selsurroundings1.options[document.frmsearch.selsurroundings1.length]=dummy;if(tab2[0]==selected_value)select=document.frmsearch.selsurroundings1.length-
1}document.frmsearch.selsurroundings1.selectedIndex=select;if(select>0)document.frmsearch.selsurroundingdist1.disabled=false;else document.frmsearch.selsurroundingdist1.disabled=true;var total=document.frmsearch.selectsurrounding2.length;for(var i=0;i<total;i++)if(document.frmsearch.selsurroundings2.value==document.frmsearch.selectsurrounding2.options[i].value){document.frmsearch.selectsurrounding2.options[i]=null;total--;i--}resetsurrounding(0);count_surrounding();refresh()}
function resetsurrounding1(){var str="type=surrounding_dist";if(document.frmsearch.selsurroundings2.value!="")str+="&selsurroundings2="+encodeURI(document.frmsearch.selsurroundings2.value);htmlData("script/search_list_async.html","POST",refresh_list_surrounding1,str,"surrounding_dist")}
function refresh_list_surrounding2(val){var tab=String(val).split("*/*");var total=tab.length;var select=0;var selected_value=document.frmsearch.selsurroundings2.value;document.frmsearch.selsurroundings2.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selsurroundings2.options[document.frmsearch.selsurroundings2.length]=dummy;if(tab2[0]==selected_value)select=document.frmsearch.selsurroundings2.length-
1}document.frmsearch.selsurroundings2.selectedIndex=select;if(select>0)document.frmsearch.selsurroundingdist2.disabled=false;else document.frmsearch.selsurroundingdist2.disabled=true;var total=document.frmsearch.selectsurrounding2.length;for(var i=0;i<total;i++)if(document.frmsearch.selsurroundings1.value==document.frmsearch.selectsurrounding2.options[i].value){document.frmsearch.selectsurrounding2.options[i]=null;total--;i--}resetsurrounding(0);count_surrounding();refresh()}
function resetsurrounding2(){var str="type=surrounding_dist";if(document.frmsearch.selsurroundings1.value!="")str+="&selsurroundings1="+encodeURI(document.frmsearch.selsurroundings1.value);htmlData("script/search_list_async.html","POST",refresh_list_surrounding2,str,"surrounding_dist")}function ajoutersurrounding(){ajouterelement("surrounding")}function effacersurrounding(){effacerelement("surrounding")}
function copysurrounding(){for(var i=1;i<=nb_surrounding;i++){eval('document.getElementById("selsurrounding'+(i+8)+'").value = ""');if(eval("document.frmsearch.selectsurrounding2.length>="+i)){eval('document.getElementById("selsurrounding'+(i+8)+'").value=document.frmsearch.selectsurrounding2.options[i-1].value');var val=eval('document.getElementById("selsurrounding'+(i+8)+'").value');if(val==300||val==302||val==304||val==306){document.frmsearch.selsurrounding1.disabled=true;document.frmsearch.selsurrounding1.checked=
false}if(val==312||val==314){document.frmsearch.selsurrounding3.disabled=true;document.frmsearch.selsurrounding3.checked=false}if(val==337||val==1231){document.frmsearch.selsurrounding8.disabled=true;document.frmsearch.selsurrounding8.checked=false}y}}count_surrounding()}
function count_surrounding(){disabled_form(true);var cpt_surrounding=0;for(var i=1;i<=8;i++)if(eval("document.frmsearch.selsurrounding"+i+".checked==true"))cpt_surrounding++;if(document.frmsearch.selsurroundings1.value!="")cpt_surrounding++;if(document.frmsearch.selsurroundings2.value!="")cpt_surrounding++;if(document.frmsearch.selsurroundingdist1.value!="")cpt_surrounding++;if(document.frmsearch.selsurroundingdist2.value!="")cpt_surrounding++;document.getElementById("span_cpt_surrounding").innerHTML=
cpt_surrounding+document.frmsearch.selectsurrounding2.length+" / "+(nb_surrounding+7)}
function refresh_list_surrounding(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selectsurrounding1.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selectsurrounding1.options[document.frmsearch.selectsurrounding1.length]=dummy}document.frmsearch.selectsurrounding1.selectedIndex=0;if(document.frmsearch.selectsurrounding1.length==0)document.frmsearch.add_surrounding.disabled=
true;else document.frmsearch.add_surrounding.disabled=false;if(document.frmsearch.selectsurrounding2.length==0)document.frmsearch.del_surrounding.disabled=true;else document.frmsearch.del_surrounding.disabled=false}
function resetsurrounding(all){if(all==1){for(var i=1;i<=8;i++)eval("document.frmsearch.selsurrounding"+i+".checked=false");document.frmsearch.selsurrounding1.disabled=true;document.frmsearch.selsurrounding3.disabled=true;document.frmsearch.selsurrounding8.disabled=true;document.frmsearch.selsurroundingdist1.value="";document.frmsearch.selsurroundingdist1.disabled=true;document.frmsearch.selsurroundingdist2.value="";document.frmsearch.selsurroundingdist2.disabled=true;document.frmsearch.selsurroundings1.value=
"";document.frmsearch.selsurroundings2.value="";document.frmsearch.selectsurrounding2.length=0;document.frmsearch.add_surrounding.disabled=false;document.frmsearch.del_surrounding.disabled=true}copysurrounding();var str="type=surrounding";if(all==0){var plage_found=false;var lac_found=false;var medic_found=false;var total=document.frmsearch.selectsurrounding2.length;for(cpt=0;cpt<total;cpt++){str+="&selsurrounding"+cpt+"="+encodeURI(document.frmsearch.selectsurrounding2.options[cpt].value);if(document.frmsearch.selectsurrounding2.options[cpt].value==
300||document.frmsearch.selectsurrounding2.options[cpt].value==302||document.frmsearch.selectsurrounding2.options[cpt].value==304||document.frmsearch.selectsurrounding2.options[cpt].value==306)plage_found=true;if(document.frmsearch.selectsurrounding2.options[cpt].value==312||document.frmsearch.selectsurrounding2.options[cpt].value==314)lac_found=true;if(document.frmsearch.selectsurrounding2.options[cpt].value==337||document.frmsearch.selectsurrounding2.options[cpt].value==1231)medic_found=true}if(document.frmsearch.selsurroundings1.value!=
"")str+="&selsurroundings1="+encodeURI(document.frmsearch.selsurroundings1.value);if(document.frmsearch.selsurroundings2.value!="")str+="&selsurroundings2="+encodeURI(document.frmsearch.selsurroundings2.value)}if(!plage_found)document.frmsearch.selsurrounding1.disabled=false;if(!lac_found)document.frmsearch.selsurrounding3.disabled=false;if(!medic_found)document.frmsearch.selsurrounding8.disabled=false;htmlData("script/search_list_async.html","POST",refresh_list_surrounding,str,"surrounding")}
function count_parution(){disabled_form(true);var cpt_parution=0;for(var i=1;i<=6;i++){if(i==4)continue;if(eval("document.frmsearch.selparution"+i+".checked==true"))cpt_parution++}document.getElementById("span_cpt_parution").innerHTML=cpt_parution+" / 5"}
function count_affiliation(){disabled_form(true);var cpt_affiliation=0;if(document.frmsearch.selaffiliation.value!="")cpt_affiliation++;if(document.frmsearch.selaffiliation2.value!="")cpt_affiliation++;if(document.frmsearch.selaffiliationrate.value!="")cpt_affiliation++;if(document.frmsearch.selaffiliationrate2.value!="")cpt_affiliation++;document.getElementById("span_cpt_affiliation").innerHTML=cpt_affiliation+" / 4"}
function refresh_list_affiliation(val){var tab=String(val).split("*/*");var total=tab.length;var select=0;var selected_value=document.frmsearch.selaffiliation.value;document.frmsearch.selaffiliation.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selaffiliation.options[document.frmsearch.selaffiliation.length]=dummy;if(tab2[0]==selected_value)select=document.frmsearch.selaffiliation.length-
1}document.frmsearch.selaffiliation.selectedIndex=select}function resetaffiliation(){var str="type=affiliation";if(document.frmsearch.selaffiliation2.value!="")str+="&selaffiliation2="+encodeURI(document.frmsearch.selaffiliation2.value);htmlData("script/search_list_async.html","POST",refresh_list_affiliation,str,"affiliation")}
function refresh_list_affiliation2(val){var tab=String(val).split("*/*");var total=tab.length;var select=0;var selected_value=document.frmsearch.selaffiliation2.value;document.frmsearch.selaffiliation2.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selaffiliation2.options[document.frmsearch.selaffiliation2.length]=dummy;if(tab2[0]==selected_value)select=document.frmsearch.selaffiliation2.length-
1}document.frmsearch.selaffiliation2.selectedIndex=select}function resetaffiliation2(){var str="type=affiliation";if(document.frmsearch.selaffiliation.value!="")str+="&selaffiliation="+encodeURI(document.frmsearch.selaffiliation.value);htmlData("script/search_list_async.html","POST",refresh_list_affiliation2,str,"affiliation")}
function refresh_list_affiliationrate(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selaffiliationrate.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selaffiliationrate.options[document.frmsearch.selaffiliationrate.length]=dummy}if(document.frmsearch.selaffiliationrate.length>1)document.frmsearch.selaffiliationrate.disabled=false;else document.frmsearch.selaffiliationrate.disabled=
true;count_affiliation();refresh()}function resetaffiliationrate(){var str="type=affiliationrate";if(document.frmsearch.selaffiliation.value!="")str+="&selaffiliation="+encodeURI(document.frmsearch.selaffiliation.value);htmlData("script/search_list_async.html","POST",refresh_list_affiliationrate,str,"affiliationrate")}
function refresh_list_affiliationrate2(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selaffiliationrate2.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selaffiliationrate2.options[document.frmsearch.selaffiliationrate2.length]=dummy}if(document.frmsearch.selaffiliationrate2.length>1)document.frmsearch.selaffiliationrate2.disabled=false;else document.frmsearch.selaffiliationrate2.disabled=
true;count_affiliation();refresh()}function resetaffiliationrate2(){var str="type=affiliationrate";if(document.frmsearch.selaffiliation2.value!="")str+="&selaffiliation2="+encodeURI(document.frmsearch.selaffiliation2.value);htmlData("script/search_list_async.html","POST",refresh_list_affiliationrate2,str,"affiliationrate")}
function count_guid(){disabled_form(true);var cpt_guid=0;for(var i=1;i<=5;i++)if(eval("document.frmsearch.selguid"+i+".checked==true"))cpt_guid++;if(document.frmsearch.selguid6.value!="")cpt_guid++;if(document.frmsearch.seltermpayment.value!="")cpt_guid++;document.getElementById("span_cpt_guid").innerHTML=cpt_guid+" / 7"}
function ajouterserviceincluded(){if(document.frmsearch.selectserviceincluded1.selectedIndex>=0){disabled_form(true);var dummy=new Option(document.frmsearch.selectserviceincluded1.options[document.frmsearch.selectserviceincluded1.selectedIndex].text,document.frmsearch.selectserviceincluded1.value,false,true);document.frmsearch.selectserviceincluded2.options[document.frmsearch.selectserviceincluded2.length]=dummy;var pos=document.frmsearch.selectserviceincluded1.selectedIndex;if(document.frmsearch.selectserviceincluded1.value==
465){document.frmsearch.selservice1.disabled=true;document.frmsearch.selservice1.checked=false}if(document.frmsearch.selectserviceincluded1.value==459){document.frmsearch.selservice2.disabled=true;document.frmsearch.selservice2.checked=false}var enfants=document.frmsearch.selectserviceincluded1.options[document.frmsearch.selectserviceincluded1.selectedIndex].parentNode.childNodes;var nbenfants=enfants.length;if(nbenfants<=1)document.frmsearch.selectserviceincluded1.removeChild(document.frmsearch.selectserviceincluded1.options[document.frmsearch.selectserviceincluded1.selectedIndex].parentNode);
else document.frmsearch.selectserviceincluded1.options[document.frmsearch.selectserviceincluded1.selectedIndex]=null;if(pos>=document.frmsearch.selectserviceincluded1.length)pos=document.frmsearch.selectserviceincluded1.length-1;document.frmsearch.selectserviceincluded1.selectedIndex=pos;document.frmsearch.selectserviceincluded2.selectedIndex=document.frmsearch.selectserviceincluded2.length-1;document.frmsearch.del_serviceincluded.disabled=false;copyserviceincluded();if(document.frmsearch.selectserviceincluded1.length<=
0)document.frmsearch.add_serviceincluded.disabled=true;var str="type=servicesupplement";var total=document.frmsearch.selectserviceincluded2.length;if(document.frmsearch.sheetssupplied.checked)str+="&sheetssupplied="+encodeURI(document.frmsearch.sheetssupplied.value);for(var cpt=0;cpt<total;cpt++)str+="&selserviceincluded"+cpt+"="+encodeURI(document.frmsearch.selectserviceincluded2.options[cpt].value);var total=document.frmsearch.selectservicesupplement2.length;for(var cpt=0;cpt<total;cpt++)str+="&selservicesupplement"+
cpt+"="+encodeURI(document.frmsearch.selectservicesupplement2.options[cpt].value);htmlData("script/search_list_async.html","POST",refresh_list_servicesupplement,str,"servicesupplement")}}
function ajouterservicesupplement(){if(document.frmsearch.selectservicesupplement1.selectedIndex>=0){disabled_form(true);var dummy=new Option(document.frmsearch.selectservicesupplement1.options[document.frmsearch.selectservicesupplement1.selectedIndex].text,document.frmsearch.selectservicesupplement1.value,false,true);document.frmsearch.selectservicesupplement2.options[document.frmsearch.selectservicesupplement2.length]=dummy;var pos=document.frmsearch.selectservicesupplement1.selectedIndex;if(document.frmsearch.selectservicesupplement1.value==
450){document.frmsearch.sheetssupplied.disabled=true;document.frmsearch.sheetssupplied.checked=false}if(document.frmsearch.selectservicesupplement1.value==465){document.frmsearch.selservice1.disabled=true;document.frmsearch.selservice1.checked=false}if(document.frmsearch.selectservicesupplement1.value==459){document.frmsearch.selservice2.disabled=true;document.frmsearch.selservice2.checked=false}var enfants=document.frmsearch.selectservicesupplement1.options[document.frmsearch.selectservicesupplement1.selectedIndex].parentNode.childNodes;
var nbenfants=enfants.length;if(nbenfants<=1)document.frmsearch.selectservicesupplement1.removeChild(document.frmsearch.selectservicesupplement1.options[document.frmsearch.selectservicesupplement1.selectedIndex].parentNode);else document.frmsearch.selectservicesupplement1.options[document.frmsearch.selectservicesupplement1.selectedIndex]=null;if(pos>=document.frmsearch.selectservicesupplement1.length)pos=document.frmsearch.selectservicesupplement1.length-1;document.frmsearch.selectservicesupplement1.selectedIndex=
pos;document.frmsearch.selectservicesupplement2.selectedIndex=document.frmsearch.selectservicesupplement2.length-1;document.frmsearch.del_servicesupplement.disabled=false;copyservicesupplement();if(document.frmsearch.selectservicesupplement1.length<=0)document.frmsearch.add_servicesupplement.disabled=true;var str="type=serviceincluded";var total=document.frmsearch.selectserviceincluded2.length;for(var cpt=0;cpt<total;cpt++)str+="&selserviceincluded"+cpt+"="+encodeURI(document.frmsearch.selectserviceincluded2.options[cpt].value);
var total=document.frmsearch.selectservicesupplement2.length;for(var cpt=0;cpt<total;cpt++)str+="&selservicesupplement"+cpt+"="+encodeURI(document.frmsearch.selectservicesupplement2.options[cpt].value);htmlData("script/search_list_async.html","POST",refresh_list_serviceincluded,str,"serviceincluded")}}
function effacerserviceincluded(){if(document.frmsearch.selectserviceincluded2.value==465)document.frmsearch.selservice1.disabled=false;if(document.frmsearch.selectserviceincluded2.value==459)document.frmsearch.selservice2.disabled=false;effacerelement("serviceincluded")}
function effacerservicesupplement(){if(document.frmsearch.selectservicesupplement2.value==450)document.frmsearch.sheetssupplied.disabled=false;if(document.frmsearch.selectservicesupplement2.value==465)document.frmsearch.selservice1.disabled=false;if(document.frmsearch.selectservicesupplement2.value==459)document.frmsearch.selservice2.disabled=false;effacerelement("servicesupplement")}
function copyserviceincluded(){for(var i=1;i<=nb_serviceincluded;i++){eval('document.getElementById("selserviceincluded'+i+'").value = ""');if(eval("document.frmsearch.selectserviceincluded2.length>="+i))eval('document.getElementById("selserviceincluded'+i+'").value=document.frmsearch.selectserviceincluded2.options[i-1].value')}count_service()}
function copyservicesupplement(){for(var i=1;i<=nb_servicesupplement;i++){eval('document.getElementById("selservicesupplement'+i+'").value = ""');if(eval("document.frmsearch.selectservicesupplement2.length>="+i))eval('document.getElementById("selservicesupplement'+i+'").value=document.frmsearch.selectservicesupplement2.options[i-1].value')}count_service()}
function count_service(){disabled_form(true);var cpt_service=0;if(document.frmsearch.sheetssupplied.checked==true)cpt_service++;if(document.frmsearch.selservice1.checked==true)cpt_service++;if(document.frmsearch.selservice2.checked==true)cpt_service++;document.getElementById("span_cpt_service").innerHTML=cpt_service+document.frmsearch.selectserviceincluded2.length+document.frmsearch.selectservicesupplement2.length+" / "+nb_service}
function refresh_list_serviceincluded(val){var tab=String(val).split("*/*");var total=tab.length;var optgroupid=0;var f=document.getElementById("selectserviceincluded1");while(f.hasChildNodes())f.removeChild(f.firstChild);var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;if(tab[i].indexOf("||")>0){tab2=String(tab[i]).split("||");if(optgroupid>0&&tab2[0]!=optgroupid)if(eval("optgroup_"+optgroupid+".hasChildNodes()"))f.appendChild(eval("optgroup_"+optgroupid));optgroupid=tab2[0];eval("var optgroup_"+
tab2[0]+' = document.createElement("optgroup")');eval("optgroup_"+tab2[0]+'.label = "'+tab2[1]+'"');eval("optgroup_"+tab2[0]+'.style.backgroundColor = "white";')}if(tab[i].indexOf("__")>0){tab2=String(tab[i]).split("__");eval("var option_"+tab2[0]+' = document.createElement("option")');eval("option_"+tab2[0]+".value = "+tab2[0]);eval("option_"+tab2[0]+'.appendChild(document.createTextNode("'+tab2[1]+'"))');eval("optgroup_"+tab2[2]+".appendChild(option_"+tab2[0]+")")}}if(optgroupid>0&&tab2[0]!=optgroupid)if(eval("optgroup_"+
optgroupid+".hasChildNodes()"))f.appendChild(eval("optgroup_"+optgroupid));document.frmsearch.selectserviceincluded1.selectedIndex=0;if(document.frmsearch.selectserviceincluded1.length==0)document.frmsearch.add_serviceincluded.disabled=true;else document.frmsearch.add_serviceincluded.disabled=false;if(document.frmsearch.selectserviceincluded2.length==0)document.frmsearch.del_serviceincluded.disabled=true;else document.frmsearch.del_serviceincluded.disabled=false}
function refresh_list_servicesupplement(val){var tab=String(val).split("*/*");var total=tab.length;var optgroupid=0;var f=document.getElementById("selectservicesupplement1");while(f.hasChildNodes())f.removeChild(f.firstChild);var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;if(tab[i].indexOf("||")>0){tab2=String(tab[i]).split("||");if(optgroupid>0&&tab2[0]!=optgroupid)if(eval("optgroup_"+optgroupid+".hasChildNodes()"))f.appendChild(eval("optgroup_"+optgroupid));optgroupid=tab2[0];eval("var optgroup_"+
tab2[0]+' = document.createElement("optgroup")');eval("optgroup_"+tab2[0]+'.label = "'+tab2[1]+'"')}if(tab[i].indexOf("__")>0){tab2=String(tab[i]).split("__");eval("var option_"+tab2[0]+' = document.createElement("option")');eval("option_"+tab2[0]+".value = "+tab2[0]);eval("option_"+tab2[0]+'.appendChild(document.createTextNode("'+tab2[1]+'"))');eval("optgroup_"+tab2[2]+".appendChild(option_"+tab2[0]+")")}}if(optgroupid>0&&tab2[0]!=optgroupid)if(eval("optgroup_"+optgroupid+".hasChildNodes()")){f.appendChild(eval("optgroup_"+
optgroupid));eval("optgroup_"+optgroupid+'.className = "optgroup_color"')}document.frmsearch.selectservicesupplement1.selectedIndex=0;if(document.frmsearch.selectservicesupplement1.length==0)document.frmsearch.add_servicesupplement.disabled=true;else document.frmsearch.add_servicesupplement.disabled=false;if(document.frmsearch.selectservicesupplement2.length==0)document.frmsearch.del_servicesupplement.disabled=true;else document.frmsearch.del_servicesupplement.disabled=false}
function resetserviceincluded(all){if(all==1){document.frmsearch.sheetssupplied.checked=false;document.frmsearch.sheetssupplied.disabled=false;document.frmsearch.selservice1.checked=false;document.frmsearch.selservice1.disabled=false;document.frmsearch.selservice2.checked=false;document.frmsearch.selservice2.disabled=false;document.frmsearch.selectserviceincluded2.length=0;document.frmsearch.add_serviceincluded.disabled=false;document.frmsearch.del_serviceincluded.disabled=true}copyserviceincluded();
var str="";if(all==0){if(document.frmsearch.sheetssupplied.checked)str+="&sheetssupplied="+encodeURI(document.frmsearch.sheetssupplied.value);var total=document.frmsearch.selectserviceincluded2.length;for(var cpt=0;cpt<total;cpt++)str+="&selserviceincluded"+cpt+"="+encodeURI(document.frmsearch.selectserviceincluded2.options[cpt].value);var total=document.frmsearch.selectservicesupplement2.length;for(var cpt=0;cpt<total;cpt++)str+="&selservicesupplement"+cpt+"="+encodeURI(document.frmsearch.selectservicesupplement2.options[cpt].value)}htmlData("script/search_list_async.html",
"POST",refresh_list_serviceincluded,"type=serviceincluded"+str,"serviceincluded");htmlData("script/search_list_async.html","POST",refresh_list_servicesupplement,"type=servicesupplement"+str,"servicesupplement")}
function resetservicesupplement(all){if(all==1){document.frmsearch.sheetssupplied.checked=false;document.frmsearch.sheetssupplied.disabled=false;document.frmsearch.selservice1.checked=false;document.frmsearch.selservice1.disabled=false;document.frmsearch.selservice2.checked=false;document.frmsearch.selservice2.disabled=false;document.frmsearch.selectservicesupplement2.length=0;document.frmsearch.add_servicesupplement.disabled=false;document.frmsearch.del_servicesupplement.disabled=true}copyservicesupplement();
var str="";if(all==0){if(document.frmsearch.sheetssupplied.checked)str+="&sheetssupplied="+encodeURI(document.frmsearch.sheetssupplied.value);var total=document.frmsearch.selectserviceincluded2.length;for(var cpt=0;cpt<total;cpt++)str+="&selserviceincluded"+cpt+"="+encodeURI(document.frmsearch.selectserviceincluded2.options[cpt].value);var total=document.frmsearch.selectservicesupplement2.length;for(var cpt=0;cpt<total;cpt++)str+="&selservicesupplement"+cpt+"="+encodeURI(document.frmsearch.selectservicesupplement2.options[cpt].value)}htmlData("script/search_list_async.html",
"POST",refresh_list_serviceincluded,"type=serviceincluded"+str,"serviceincluded");htmlData("script/search_list_async.html","POST",refresh_list_servicesupplement,"type=servicesupplement"+str,"servicesupplement")}
function count_general(){disabled_form(true);var cpt_general=0;for(var i=1;i<=5;i++)if(eval("document.frmsearch.loc"+i+".checked==true"))cpt_general++;if(document.frmsearch.filtre_du.value!="")cpt_general++;if(document.frmsearch.filtre_au.value!="")cpt_general++;if(document.frmsearch.selbudgetmaxi.value!="")cpt_general++;if(document.frmsearch.selnbroom.value!="")cpt_general++;if(document.frmsearch.selnbpers.value!="")cpt_general++;if(document.getElementById("selcontinent").value!=""||document.getElementById("selpays").value!=
"")cpt_general++;if(document.getElementById("seltouristique").value!="")cpt_general++;document.getElementById("span_cpt_general").innerHTML=cpt_general+" / 12"}
function refresh_list_budget(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selbudgetmaxi.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selbudgetmaxi.options[document.frmsearch.selbudgetmaxi.length]=dummy}}
function resetbudget(){document.frmsearch.selbudgetmaxi.value="";var str="type=budget&selunite="+encodeURI(document.frmsearch.selunite.value)+"&selcurrency="+encodeURI(document.frmsearch.selcurrency.value);htmlData("script/search_list_async.html","POST",refresh_list_budget,str,"budget")}
function count_heb(){disabled_form(true);var cpt_heb=0;for(var i=1;i<=5;i++)if(eval("document.frmsearch.heb"+i+".checked==true"))cpt_heb++;if(document.frmsearch.individual.checked==true)cpt_heb++;if(document.frmsearch.selideal.value!="")cpt_heb++;if(document.frmsearch.selfloor.value!="")cpt_heb++;if(document.frmsearch.selvues.value!="")cpt_heb++;if(document.frmsearch.selsettings.value!="")cpt_heb++;if(document.frmsearch.boatsize.value!="")cpt_heb++;document.getElementById("span_cpt_heb").innerHTML=
cpt_heb+" / 11"}function ajouterplus(){ajouterelement("plus")}function effacerplus(){effacerelement("plus")}function copyplus(){for(var i=1;i<=nb_plus;i++){eval('document.getElementById("selplus'+(i+15)+'").value = ""');if(eval("document.frmsearch.selectplus2.length>="+i))eval('document.getElementById("selplus'+(i+15)+'").value=document.frmsearch.selectplus2.options[i-1].value')}count_plus()}
function count_plus(){disabled_form(true);var cpt_plus=0;for(var i=1;i<=15;i++){if(i==10||i==11||i==7||i==8||i==9)continue;if(eval("document.frmsearch.selplus"+i+".checked==true"))cpt_plus++}if(document.frmsearch.selplus10.value!="")cpt_plus++;if(document.frmsearch.selplus11.value!="")cpt_plus++;document.getElementById("span_cpt_plus").innerHTML=cpt_plus+document.frmsearch.selectplus2.length+" / "+(nb_plus+12)}
function refresh_list_plus(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selectplus1.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selectplus1.options[document.frmsearch.selectplus1.length]=dummy}document.frmsearch.selectplus1.selectedIndex=0;if(document.frmsearch.selectplus1.length==0)document.frmsearch.add_plus.disabled=true;else document.frmsearch.add_plus.disabled=
false;if(document.frmsearch.selectplus2.length==0)document.frmsearch.del_plus.disabled=true;else document.frmsearch.del_plus.disabled=false}
function resetplus(all){if(all==1){for(var i=1;i<=15;i++)if(i==10||i==11)eval("document.frmsearch.selplus"+i+'.value="";');else eval("document.frmsearch.selplus"+i+".checked=false;");document.frmsearch.selectplus2.length=0;document.frmsearch.selplus10.disabled=true;document.frmsearch.selplus7.disabled=true;document.frmsearch.selplus8.disabled=true;document.frmsearch.selplus11.disabled=true;document.frmsearch.selplus9.disabled=true;document.frmsearch.selbaby.value="";document.frmsearch.selbaby.disabled=
true;document.frmsearch.add_plus.disabled=false;document.frmsearch.del_plus.disabled=true}copyplus();var str="type=plus";if(all==0){var total=document.frmsearch.selectplus2.length;for(var cpt=0;cpt<total;cpt++)str+="&selplus"+cpt+"="+encodeURI(document.frmsearch.selectplus2.options[cpt].value)}htmlData("script/search_list_async.html","POST",refresh_list_plus,str,"plus")}function ajoutersleep(){ajouterelement("sleep")}function effacersleep(){effacerelement("sleep")}
function copysleep(){for(var i=1;i<=nb_sleeps;i++){eval('document.getElementById("selsleep'+(i+4)+'").value = "";');if(eval("document.frmsearch.selectsleep2.length>="+i))eval('document.getElementById("selsleep'+(i+4)+'").value=document.frmsearch.selectsleep2.options[i-1].value;')}count_sleep()}
function count_sleep(){disabled_form(true);var cpt_sleep=0;for(var i=1;i<=4;i++)if(eval("document.frmsearch.selsleep"+i+".checked==true"))cpt_sleep++;document.getElementById("span_cpt_sleep").innerHTML=cpt_sleep+document.frmsearch.selectsleep2.length+" / "+(nb_sleeps+4)}
function refresh_list_sleep(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selectsleep1.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selectsleep1.options[document.frmsearch.selectsleep1.length]=dummy}document.frmsearch.selectsleep1.selectedIndex=0;if(document.frmsearch.selectsleep1.length==0)document.frmsearch.add_sleep.disabled=true;else document.frmsearch.add_sleep.disabled=
false;if(document.frmsearch.selectsleep2.length==0)document.frmsearch.del_sleep.disabled=true;else document.frmsearch.del_sleep.disabled=false}
function resetsleep(all){if(all==1){for(var i=1;i<=4;i++)eval("document.frmsearch.selsleep"+i+".checked=false;");document.frmsearch.selectsleep2.length=0;document.frmsearch.add_sleep.disabled=false;document.frmsearch.del_sleep.disabled=true}copysleep();var str="type=sleep";if(all==0){var total=document.frmsearch.selectsleep2.length;for(var cpt=0;cpt<total;cpt++)str+="&selsleep"+cpt+"="+encodeURI(document.frmsearch.selectsleep2.options[cpt].value)}htmlData("script/search_list_async.html","POST",refresh_list_sleep,
str,"sleep")}function ajouterequipment(){ajouterelement("equipment")}function effacerequipment(){effacerelement("equipment")}
function copyequipment(){for(var i=1;i<=nb_equipments;i++){eval('document.getElementById("selequipment'+(i+18)+'").value = "";');if(eval("document.frmsearch.selectequipment2.length>="+i)){eval('document.getElementById("selequipment'+(i+18)+'").value=document.frmsearch.selectequipment2.options[i-1].value;');var val=eval('document.getElementById("selequipment'+(i+18)+'").value');if(val==654||val==657){document.frmsearch.selequipment14.disabled=true;document.frmsearch.selequipment14.checked=false}}}count_equipement()}
function count_equipement(){disabled_form(true);var cpt_equipment=0;for(var i=1;i<=18;i++)if(eval("document.frmsearch.selequipment"+i+".checked==true"))cpt_equipment++;document.getElementById("span_cpt_equipment").innerHTML=cpt_equipment+document.frmsearch.selectequipment2.length+" / "+(nb_equipments+17)}
function refresh_list_equipment(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selectequipment1.length=0;var tabcolorequipments={"691":"blue","651":"red","850":"green"};var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);dummy.style.color=tabcolorequipments[tab2[2]];document.frmsearch.selectequipment1.options[document.frmsearch.selectequipment1.length]=dummy}document.frmsearch.selectequipment1.selectedIndex=
0;if(document.frmsearch.selectequipment1.length==0)document.frmsearch.add_equipment.disabled=true;else document.frmsearch.add_equipment.disabled=false;if(document.frmsearch.selectequipment2.length==0)document.frmsearch.del_equipment.disabled=true;else document.frmsearch.del_equipment.disabled=false}
function resetequipment(all){if(all==1){for(var i=1;i<=18;i++)eval("document.frmsearch.selequipment"+i+".checked=false;");document.frmsearch.selectequipment2.length=0;document.frmsearch.add_equipment.disabled=false;document.frmsearch.del_equipment.disabled=true}copyequipment();var str="type=equipment";if(all==0){var clim_found=false;var total=document.frmsearch.selectequipment2.length;for(var cpt=0;cpt<total;cpt++){str+="&selequipment"+cpt+"="+encodeURI(document.frmsearch.selectequipment2.options[cpt].value);
if(document.frmsearch.selectequipment2.options[cpt].value==654||document.frmsearch.selectequipment2.options[cpt].value==657)clim_found=true}}if(!clim_found)document.frmsearch.selequipment14.disabled=false;htmlData("script/search_list_async.html","POST",refresh_list_equipment,str,"equipment")}
function count_layout(){disabled_form(true);var cpt_layout=0;for(var i=1;i<=3;i++)if(eval("document.frmsearch.sellayout"+i+".checked==true"))cpt_layout++;if(document.frmsearch.sellayout4.value!="")cpt_layout++;if(document.frmsearch.sellayout5.value!="")cpt_layout++;document.getElementById("span_cpt_layout").innerHTML=cpt_layout+" / 5"}
function count_outside(){disabled_form(true);var cpt_outside=0;for(var i=1;i<=3;i++)if(eval("document.frmsearch.seloutside"+i+".checked==true"))cpt_outside++;if(document.frmsearch.selgardensurface.value!="")cpt_outside++;if(document.frmsearch.selterracesurface.value!="")cpt_outside++;document.getElementById("span_cpt_outside").innerHTML=cpt_outside+" / 5"}
function refresh_list_gardensurface(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selgardensurface.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selgardensurface.options[document.frmsearch.selgardensurface.length]=dummy}if(document.frmsearch.selgardensurface.length>1)document.frmsearch.selgardensurface.disabled=false;else document.frmsearch.selgardensurface.disabled=
true;count_outside();refresh()}function resetgardensurface(){var str="type=gardensurface&mesure="+mesure;if(document.frmsearch.selgarden.value!="")str+="&selgarden="+encodeURI(document.frmsearch.selgarden.value);htmlData("script/search_list_async.html","POST",refresh_list_gardensurface,str,"gardensurface")}
function refresh_list_terracesurface(val){var tab=String(val).split("*/*");var total=tab.length;document.frmsearch.selterracesurface.length=0;var dummy;var tab2;for(var i=0;i<total;i++){if(tab[i]=="")continue;tab2=String(tab[i]).split("__");dummy=new Option(tab2[1],tab2[0]);document.frmsearch.selterracesurface.options[document.frmsearch.selterracesurface.length]=dummy}if(document.frmsearch.selterracesurface.length>1)document.frmsearch.selterracesurface.disabled=false;else document.frmsearch.selterracesurface.disabled=
true;count_outside();refresh()}function resetterracesurface(){var str="type=terracesurface&mesure="+mesure;if(document.frmsearch.selterrace.value!="")str+="&selterrace="+encodeURI(document.frmsearch.selterrace.value);htmlData("script/search_list_async.html","POST",refresh_list_terracesurface,str,"terracesurface")}
function refresh_list_geo(val){var selected_index;var select;var tab;var tab2;var f;var tab_select_group;var total_select_group;var tab_select_option;var total_select_option;var main_tab=String(val).split("*//*");var main_total=main_tab.length;for(var main_i=1;main_i<main_total;main_i++){select=0;selected_index=1;tab=String(main_tab[main_i]).split("*||*");f=document.getElementById(tab[1]);f.style.display="block";while(f.hasChildNodes())f.removeChild(f.firstChild);eval("var option_"+tab[1]+' = document.createElement("option")');
eval("option_"+tab[1]+'.value = ""');eval("option_"+tab[1]+'.appendChild(document.createTextNode("'+tab[2]+'"))');f.appendChild(eval("option_"+tab[1]));tab_select_group=String(tab[0]).split("*#*");total_select_group=tab_select_group.length;for(var i=1;i<total_select_group;i++){if(tab_select_group[i]=="")continue;eval("var optgroup_"+tab[1]+"_"+i+' = document.createElement("optgroup")');eval("optgroup_"+tab[1]+"_"+i+'.label = "------------------------------"');f.appendChild(eval("optgroup_"+tab[1]+
"_"+i));tab_select_option=String(tab_select_group[i]).split("*/*");total_select_option=tab_select_option.length;for(var j=0;j<total_select_option;j++){if(tab_select_option[j]=="")continue;if(tab_select_option[j].indexOf("__")>0){tab2=String(tab_select_option[j]).split("__");eval("var option_"+tab2[0]+' = document.createElement("option")');eval("option_"+tab2[0]+".value = "+tab2[0]);eval("option_"+tab2[0]+'.appendChild(document.createTextNode("'+tab2[1]+'"))');eval("optgroup_"+tab[1]+"_"+i+".appendChild(option_"+
tab2[0]+")")}if(tab2[0]==tab[3])select=selected_index;selected_index++}}f.selectedIndex=select;if(tab[4]==0)f.disabled=true;else f.disabled=false}count_general();refresh()}
function refresh_geo(type){count_general();var str="";if(type==1)str=str_geo;else{str="selcontinent="+document.getElementById("selcontinent").value;str+="&selpays="+document.getElementById("selpays").value;str+="&selregion="+document.getElementById("selregion").value;if(document.getElementById("seldepartement"))str+="&seldepartement="+document.getElementById("seldepartement").value;str+="&selville="+document.getElementById("selville").value;str+="&seltouristique="+document.getElementById("seltouristique").value}htmlData("script/search_geo_async.html",
"POST",refresh_list_geo,str,"geo")};function reset_style(a){var b=a.className.split(" ");a.className=b[0]}function reset_select_style(a){var b=a.className.split(" ");a.className=b[0]}function test_filled(a,b){if(a.value.length>0){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}function test_select_filled(a,b){if(a.length>0){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}
function test_intl(a,b,c){if(b.value.length>0)return val=test_selected(a,c);else{a.selectedIndex=0;return""}}function test_date_exist(a,b,c){d=a.options[a.selectedIndex].value;m=b.options[b.selectedIndex].value;if(d==31&&(m==4||m==6||m==9||m==11)||d>28&&m==2){b=a.className.split(" ");a.className=b[0]+" error2";return c}else{b=a.className.split(" ");a.className=b[0];return""}}
function test_intl2(a,b,c){if(b.value.length>0)if((a.value.match(/^\+\d{1,3}/)!=null||a.value.length==0)&&a.value!="+000"){b=a.className.split(" ");a.className=b[0];return""}else{b=a.className.split(" ");a.className=b[0]+" error";return c}else{a.value="+000";return""}}
function test_tel(a,b){if(a.value.match(/[^0-9\-\.\+\(\)\s]/)==null&&a.value.match(/[\-]{2,}/)==null&&a.value.match(/[\.]{2,}/)==null&&a.value.match(/[\+]{2,}/)==null&&a.value.match(/[\(]{2,}/)==null&&a.value.match(/[\)]{2,}/)==null&&a.value.match(/[\s]{2,}/)==null||a.value.length==0){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}
function test_nom(a,b){if(a.value.match(/[0-9]/)==null&&a.value.match(/[\-]{2,}/)==null&&a.value.match(/[\.]{2,}/)==null&&a.value.match(/[\']{2,}/)==null&&a.value.match(/[\`]{2,}/)==null&&a.value.match(/[\"]{2,}/)==null&&a.value.match(/[\(]{2,}/)==null&&a.value.match(/[\)]{2,}/)==null&&a.value.match(/[\s]{2,}/)==null||a.value.length==0){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}
function test_nom_ville(a,b){if(a.value.match(/[\-]{2,}/)==null&&a.value.match(/[\.]{2,}/)==null&&a.value.match(/[\']{2,}/)==null&&a.value.match(/[\`]{2,}/)==null&&a.value.match(/[\"]{2,}/)==null&&a.value.match(/[\(]{2,}/)==null&&a.value.match(/[\)]{2,}/)==null&&a.value.match(/[\s]{2,}/)==null||a.value.length==0){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}
function test_cp(a,b){if(a.value.match(/[^A-Za-z0-9\-\.\(\)\s]/)==null&&a.value.match(/[\-]{2,}/)==null&&a.value.match(/[\.]{2,}/)==null&&a.value.match(/[\(]{2,}/)==null&&a.value.match(/[\)]{2,}/)==null&&a.value.match(/[\s]{2,}/)==null||a.value.length==0){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}
function test_date(a,b,c){switch(b){case "en":b=a.value.match(/^\d{2,4}\/\d{1,2}\/\d{1,2}/)!=null;break;default:b=a.value.match(/^\d{1,2}\/\d{1,2}\/\d{2,4}/)!=null;break}if(b||a.value.length==0){b=a.className.split(" ");a.className=b[0];return""}else{b=a.className.split(" ");a.className=b[0]+" error";return c}}
function test_val(a,b){if(a.value.length==0||a.value.match(/[^0-9]/)==null){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}function test_float(a,b){if(a.value.length==0||a.value.match(/[^0-9\.\,]/)==null){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}
function test_gps(a,b,c,f){if(a.value.match(/[^0-9\.\-]/)==null&&a.value<=180&&a.value>=0&&b.value.match(/[^0-9\.\-]/)==null&&b.value<=60&&b.value>=0&&c.value.match(/[^0-9\.\-]/)==null&&c.value<=60&&c.value>=0){var e=a.className.split(" ");a.className=e[0];e=b.className.split(" ");b.className=e[0];e=c.className.split(" ");c.className=e[0];return""}else{e=a.className.split(" ");a.className=e[0]+" error";e=b.className.split(" ");b.className=e[0]+" error";e=c.className.split(" ");c.className=e[0]+" error";
return f}}function test_email(a,b){if(a.value.length==0||a.value.match(/^[A-Za-z0-9_/&\.\-]+@([A-Za-z0-9\-]+\.)+[A-Za-z]{2,}$/)!=null){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}function test_alpha(a,b){if(a.value.length==0||a.value.match(/^[A-Za-z0-9]+$/)!=null){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error";return b}}
function test_selected(a,b){if(a.selectedIndex>0){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error2";return b}}function test_selected_inv(a,b){if(a.selectedIndex<a.length-1){var c=a.className.split(" ");a.className=c[0];return""}else{c=a.className.split(" ");a.className=c[0]+" error2";return b}}
function test_USA(a,b,c){if(b.value==486)if(a.selectedIndex>0){a=a.options[a.selectedIndex];b=a.className.split(" ");a.className=b[0];return""}else{b=a.className.split(" ");a.className=b[0]+" error2";return c}else{a=a.options[a.selectedIndex];b=a.className.split(" ");a.className=b[0];return""}}function test_identique(a,b,c){if(a.value==b.value){b=a.className.split(" ");a.className=b[0];return""}else{b=a.className.split(" ");a.className=b[0]+" error";return c}}
function test_longmin(a,b,c){if(a.value.length>=b){b=a.className.split(" ");a.className=b[0];return""}else{b=a.className.split(" ");a.className=b[0]+" error";return c}}function test_longmax(a,b,c){if(a.value.length<b){b=a.className.split(" ");a.className=b[0];return""}else{b=a.className.split(" ");a.className=b[0]+" error";return c}};var a,champdate;a=Date.prototype;a.getDayNum=function(){return this.getDate()};a.setDayNum=function(b){this.setDate(b)};a.getMonthNum=function(){return this.getMonth()+1};a.setMonthNum=function(b){this.setMonth(b-1)};a.getYearNum=function(){return this.getFullYear()};a.setYearNum=function(b){this.setYear(b)};a.getDayOfWeekNum=function(){var b=this.getDay();if(b==7)return 1;return b==6?0:b+1};a.setDayMonthYear=function(b,d,c){this.setFullYear(c);this.setMonth(d-1);this.setDate(b);this.setHours(12)};
a.addDay=function(){this.setDate(this.getDate()+1)};a.addMonth=function(){this.setMonth(this.getMonth()+1)};a.addYear=function(){this.setYear(this.getFullYear()+1)};a.subtractYear=function(){this.setYear(this.getFullYear()-1)};a.copyTo=function(b){b.setTime(this.getTime())};a.monthIsLessThan=function(b){var d=this.getYearNum(),c=b.getYearNum();return d<c?true:d==c?this.getMonthNum()<b.getMonthNum():false};
a.monthIsGreaterThan=function(b){var d=this.getYearNum(),c=b.getYearNum();return d>c?true:d==c?this.getMonthNum()>b.getMonthNum():false};a.monthIsSameAs=function(b){if(this.getYearNum()==b.getYearNum())return this.getMonthNum()==b.getMonthNum();return false};a.dayIsSameAs=function(b){return this.getDayNum()==b.getDayNum()&&this.getMonthNum()==b.getMonthNum()&&this.getYearNum()==b.getYearNum()};
Date.isDate=function(b,d,c){if(c>999&&c<1E4){var e=new Date(c,d-1,b);return e.getDate()==b&&e.getMonth()==d-1&&e.getFullYear()==c}return false};
function Calendar(){this.width=210;this.height=250;this.y=this.x=50;this.todaysDate=new Date;this.selectedDate=new Date;this.earliestDate=new Date;this.earliestDate.setDayMonthYear(1,1,1E3);this.latestDate=new Date;this.latestDate.setDayMonthYear(1,1,3E3);this.viewDate=new Date;this.counterDate=new Date;this.outputWindow={};this.getFormDay=new Function;this.getFormMonth=new Function;this.getFormYear=new Function;this.setFormDate=new Function;this.id=Math.ceil(Math.random()*99999);this.styleSheetPath=
this.outputHtml="";this.showTodayControl=true;this.todayText="Today";this.closeText="Close"}a=Calendar.prototype;a.setBrand=function(){this.stylesheetPath="../script/calendrier/availability.css";this.stylesheetPathColours="../script/calendrier/calendar.css"};a.setTodaysDate=function(b,d,c){this.todaysDate.setDayMonthYear(b,d,c)};a.setSelectedDate=function(b,d,c){this.selectedDate.setDayMonthYear(b,d,c);this.setViewDate(b,d,c)};
a.setEarliestDate=function(b,d,c){this.earliestDate.setDayMonthYear(b,d,c)};a.setLatestDate=function(b,d,c){this.latestDate.setDayMonthYear(b,d,c)};a.setViewDate=function(b,d,c){this.viewDate.setDayMonthYear(b,d,c)};a.writeLn=function(b){this.outputHtml+=b+"\n"};a.writeTableStart=function(){this.writeLn('<table width="200" border="0" cellspacing="0" cellpadding="0"><tr><td class="tableborder">');this.writeLn('<table width="200" border="0" cellspacing="1" cellpadding="2">')};
a.writeYearTableStart=function(){this.writeLn('<table width="200" border="0" cellspacing="0" cellpadding="1"><tr><td>');this.writeLn('<table width="200" border="0" cellspacing="0" cellpadding="0" style="margin-top:4px;">')};a.writeTableDivider=function(){this.writeLn("</td></tr><tr><td>")};a.writeTableEnd=function(){this.writeLn("</table>");this.writeLn("</td></tr></table>")};
a.writeCalendar=function(){this.outputHtml="";this.writeLn("<html><head>");this.writeLn('<link rel="StyleSheet" href="'+this.stylesheetPath+'" type="text/css">');this.stylesheetPathColours&&this.writeLn('<link rel="StyleSheet" href="'+this.stylesheetPathColours+'" type="text/css">');this.writeLn("<style>td {text-align:center;}</style>");this.writeLn("</head>");this.writeLn('<body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0"><center>');this.writeLn('<table border="0" width="100" cellspacing="0" cellpadding="2"><tr><td class="background" align="center">');
this.writeYearControls();this.writeTableDivider();this.writeMonth();if(this.showTodayControl=true){this.writeTableDivider();this.writeTodayControl()}this.writeTableDivider();this.writeCloseControl();this.writeLn("</td></tr></table>");this.writeLn("</center></body></html>");this.outputWindow.innerHTML=this.outputHtml;this.outputHtml=""};
a.writeYearControls=function(){this.writeYearTableStart();var b=this.earliestDate.getYearNum(),d=this.viewDate.getYearNum(),c=this.latestDate.getYearNum();this.writeLn("<tr>");d>b?this.writeLn('<td background="../script/calendrier/calprevious.gif" class="yearbuttonprev" width="75"><a href="javascript:calendar.viewPreviousYear()">'+this.prevText+"</a></td>"):this.writeLn('<td width="75" class="yearbuttonprev">&nbsp;</td>');this.writeLn('<td width="50" class="year">'+this.viewDate.getYearNum()+"</td>");
d<c?this.writeLn('<td background="../script/calendrier/calnext.gif" class="yearbuttonnext" align="left" width="75"><a href="javascript:calendar.viewNextYear()">'+this.nextText+"</a></td>"):this.writeLn('<td width="75" class="yearbuttonnext">&nbsp;</td>');this.writeLn("</tr>");this.writeTableEnd()};
a.writeMonthControls=function(){this.viewDate.copyTo(this.counterDate);this.counterDate.setMonthNum(1);this.writeTableStart();this.writeLn("<tr>");for(var b=1;b<=12;b++){if(this.counterDate.monthIsLessThan(this.earliestDate)||this.counterDate.monthIsGreaterThan(this.latestDate))this.writeLn('<td class="disabledmonth">'+this.monthsText[b-1]+"</td>");else this.counterDate.monthIsSameAs(this.viewDate)?this.writeLn('<td class="viewmonth">'+this.monthsText[b-1]+"</td>"):this.writeLn('<td class="month"><a href="javascript:calendar.viewMonth('+
b+')">'+this.monthsText[b-1]+"</a></td>");b==6&&this.writeLn("</tr><tr>");this.counterDate.addMonth()}this.writeLn("</tr>");this.writeTableEnd()};a.writeMonth=function(){this.viewDate.copyTo(this.counterDate);this.writeTableStart();this.writeLn('<tr align="center">');for(var b=0;b<7;b++)this.writeLn('<td width="25" class="dayofweek">'+this.dayText[b]+"</td>");for(this.writeLn("</tr>");this.counterDate.getMonthNum()==this.viewDate.getMonthNum();)this.writeWeek();this.writeTableEnd()};
a.writeWeek=function(){this.writeLn("<tr>");var b=this.counterDate.getDayOfWeekNum();this.writeBlankDays(b);for(b=b;b<7;b++)if(this.counterDate.getMonthNum()==this.viewDate.getMonthNum())this.writeDay();else break;this.writeBlankDays(7-b);this.writeLn("</tr>")};
a.writeDay=function(){var b=this.counterDate.getDayNum(),d=this.counterDate.getMonthNum(),c=this.counterDate.getYearNum();if(this.counterDate.dayIsSameAs(this.selectedDate))this.writeLn('<td class="selectedday"><a href="javascript:calendar.selectDay('+b+","+d+","+c+')">'+this.counterDate.getDayNum()+"</td>");else this.counterDate>=this.earliestDate&&this.counterDate<=this.latestDate?this.writeLn('<td class="day"><a href="javascript:calendar.selectDay('+b+","+d+","+c+')">'+this.counterDate.getDayNum()+
"</a></td>"):this.writeLn('<td class="disabledday">'+this.counterDate.getDayNum()+"</td>");this.counterDate.addDay()};a.writeBlankDays=function(b){b>0&&this.writeLn('<td colspan="'+b+'" class="blankday">&nbsp;</td>')};a.writeCloseControl=function(){this.writeTableStart();this.writeLn('<tr><td class="control"><a href="javascript:calendar.close()">&nbsp; &nbsp; &nbsp; &nbsp; '+this.closeText+" &nbsp; &nbsp; &nbsp; &nbsp;</a></td></tr>");this.writeTableEnd()};
a.writeTodayControl=function(){this.writeTableStart();this.writeLn('<tr><td class="control"><a href="javascript:calendar.selectToday()" onclick="javascript:calendar.selectDay('+day+","+month+","+year+'); window.close();">&nbsp; &nbsp; &nbsp; '+this.todayText+" &nbsp; &nbsp; &nbsp;</a></td></tr>");this.writeTableEnd()};function isIEPC(){return navigator.platform.indexOf("Win")!=-1&&navigator.appVersion.indexOf("MSIE")!=-1}a=Calendar.prototype;
a.show=function(b,d){champdate=b;var c=this.getFormDay(b),e=this.getFormMonth(b);b=this.getFormYear(b);if(Date.isDate(c,e,b)){this.setSelectedDate(c,e,b);if(this.selectedDate.monthIsLessThan(this.earliestDate))this.earliestDate.copyTo(this.viewDate);else if(this.selectedDate.monthIsGreaterThan(this.latestDate)){this.latestDate.copyTo(this.viewDate);alert(this.latestDate+"\n"+this.viewDate)}}isIEPC()&&this.close();this.outputWindow=d;this.viewDate.setDayNum(1);this.writeCalendar();this.outputWindow.focus()};
a.open=function(b){champdate=b;var d=this.getFormDay(b),c=this.getFormMonth(b);b=this.getFormYear(b);if(Date.isDate(d,c,b)){this.setSelectedDate(d,c,b);if(this.selectedDate.monthIsLessThan(this.earliestDate))this.earliestDate.copyTo(this.viewDate);else if(this.selectedDate.monthIsGreaterThan(this.latestDate)){this.latestDate.copyTo(this.viewDate);alert(this.latestDate+"\n"+this.viewDate)}}isIEPC()&&this.close();this.outputWindow=window.open("javascript:''","calendar"+this.id,"width="+this.width+",height="+
this.height+",top="+this.x+",left="+this.y+",noresize");this.viewDate.setDayNum(1);this.writeCalendar();this.outputWindow.focus()};a.close=function(){this.outputWindow&&this.outputWindow.close&&this.outputWindow.close()};a.selectDay=function(b,d,c){this.setSelectedDate(b,d,c);this.setFormDate(b,d,c,champdate);this.close()};a.viewMonth=function(b){this.viewDate.setMonthNum(b);this.writeCalendar()};
a.selectToday=function(){this.todaysDate.copyTo(this.viewDate);this.todaysDate.copyTo(this.selectedDate);this.setFormDate(this.selectedDate.getDayNum(),this.selectedDate.getMonthNum(),this.selectedDate.getYearNum(),champdate);this.viewDate.setDayNum(1);this.writeCalendar()};a.viewPreviousYear=function(){this.viewDate.subtractYear();this.viewDate.setMonthNum(12);this.writeCalendar()};a.viewNextYear=function(){this.viewDate.addYear();this.viewDate.setMonthNum(1);this.writeCalendar()};var calendExp=new CalendarPopup(-110,-160,"calendardiv");var calendTrn=new CalendarPopup(-110,-337,"calendardiv");calendExp.setCssPrefix("CAL_STYLE");calendExp.setYearSelectStartOffset(0);calendExp.setWeekStartDay(6);calendTrn.setCssPrefix("CAL_STYLE");calendTrn.setYearSelectStartOffset(0);calendTrn.setWeekStartDay(6);today=new Date;mo=today.getMonth()+1;day=today.getDate()-1;year=today.getFullYear();
if(day==0){mo--;if(mo==0){mo=12;year=year-1}if(mo==2)if(year%4==0)day=29;else day=28;else if(mo==1||mo==3||mo==5||mo==7||mo==8||mo==10||mo==12)day=31;else day=30}date=year+"-"+mo+"-"+day;calendExp.addDisabledDates(null,date);calendTrn.addDisabledDates(null,date);
function startup(day,today,month,imgpath){calendExp.setDayHeaders(day[6],day[0],day[1],day[2],day[3],day[4],day[5]);calendTrn.setDayHeaders(day[6],day[0],day[1],day[2],day[3],day[4],day[5]);calendExp.setTodayText(today);calendTrn.setTodayText(today);calendExp.setImgPath(imgpath);calendTrn.setImgPath(imgpath);calendExp.setMonthNames(month[0],month[1],month[2],month[3],month[4],month[5],month[6],month[7],month[8],month[9],month[10],month[11]);calendTrn.setMonthNames(month[0],month[1],month[2],month[3],
month[4],month[5],month[6],month[7],month[8],month[9],month[10],month[11])}function validDate(data){if(data!=""){var TabDate=new Array;TabDate=data.split("/");if(TabDate[0].length==1)TabDate[0]="0"+TabDate[0];if(TabDate[1].length==1)TabDate[1]="0"+TabDate[1];if(TabDate[2].length==2)TabDate[2]="20"+TabDate[2];data=TabDate[0]+"/"+TabDate[1]+"/"+TabDate[2];return data}else return""}
function calendar(champ,id,type){if(document.saisie.btheadt[0].checked)calendTrn.select(champ,id,type);else calendExp.select(champ,id,type)}function calendmaj(idin,idout){idin.value=idout.value}var MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");function LZ(x){return(x<0||x>9?"":"0")+x}function isDate(val,format){var date=getDateFromFormat(val,format);if(date==0)return false;return true}function compareDates(date1,dateformat1,date2,dateformat2){var d1=getDateFromFormat(date1,dateformat1);var d2=getDateFromFormat(date2,dateformat2);if(d1==0||d2==0)return-1;else if(d1>d2)return 1;return 0}
function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object;if(y.length<4)y=""+(y-0+1900);value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+
11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0)value["h"]=12;else if(H>12)value["h"]=H-12;else value["h"]=H;value["hh"]=LZ(value["h"]);if(H>11)value["K"]=H-12;else value["K"]=H;value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H>11)value["a"]="PM";else value["a"]="AM";value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format<format.length){c=format.charAt(i_format);token="";while(format.charAt(i_format)==
c&&i_format<format.length)token+=format.charAt(i_format++);if(value[token]!=null)result=result+value[token];else result=result+token}return result}function _isInteger(val){var digits="1234567890";for(var i=0;i<val.length;i++)if(digits.indexOf(val.charAt(i))==-1)return false;return true}function _getInt(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length<minlength)return null;if(_isInteger(token))return token}return null}
function getDateFromFormat(val,format){val=val+"";format=format+"";var i_val=0;var i_format=0;var c="";var token="";var token2="";var x,y;var now=new Date;var year=now.getYear();var month=now.getMonth()+1;var date=1;var hh=now.getHours();var mm=now.getMinutes();var ss=now.getSeconds();var ampm="";while(i_format<format.length){c=format.charAt(i_format);token="";while(format.charAt(i_format)==c&&i_format<format.length)token+=format.charAt(i_format++);if(token=="yyyy"||token=="yy"||token=="y"){if(token==
"yyyy"){x=4;y=4}if(token=="yy"){x=2;y=2}if(token=="y"){x=2;y=4}year=_getInt(val,i_val,x,y);if(year==null)return 0;i_val+=year.length;if(year.length==2)if(year>70)year=1900+(year-0);else year=2E3+(year-0)}else if(token=="MMM"||token=="NNN"){month=0;for(var i=0;i<MONTH_NAMES.length;i++){var month_name=MONTH_NAMES[i];if(val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase())if(token=="MMM"||token=="NNN"&&i>11){month=i+1;if(month>12)month-=12;i_val+=month_name.length;break}}if(month<
1||month>12)return 0}else if(token=="EE"||token=="E")for(var i=0;i<DAY_NAMES.length;i++){var day_name=DAY_NAMES[i+1];if(val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()){i_val+=day_name.length;break}}else if(token=="MM"||token=="M"){month=_getInt(val,i_val,token.length,2);if(month==null||month<1||month>12)return 0;i_val+=month.length}else if(token=="dd"||token=="d"){date=_getInt(val,i_val,token.length,2);if(date==null||date<1||date>31)return 0;i_val+=date.length}else if(token==
"hh"||token=="h"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<1||hh>12)return 0;i_val+=hh.length}else if(token=="HH"||token=="H"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<0||hh>23)return 0;i_val+=hh.length}else if(token=="KK"||token=="K"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<0||hh>11)return 0;i_val+=hh.length}else if(token=="kk"||token=="k"){hh=_getInt(val,i_val,token.length,2);if(hh==null||hh<1||hh>24)return 0;i_val+=hh.length;hh--}else if(token=="mm"||token==
"m"){mm=_getInt(val,i_val,token.length,2);if(mm==null||mm<0||mm>59)return 0;i_val+=mm.length}else if(token=="ss"||token=="s"){ss=_getInt(val,i_val,token.length,2);if(ss==null||ss<0||ss>59)return 0;i_val+=ss.length}else if(token=="a"){if(val.substring(i_val,i_val+2).toLowerCase()=="am")ampm="AM";else if(val.substring(i_val,i_val+2).toLowerCase()=="pm")ampm="PM";else return 0;i_val+=2}else if(val.substring(i_val,i_val+token.length)!=token)return 0;else i_val+=token.length}if(i_val!=val.length)return 0;
if(month==2)if(year%4==0&&year%100!=0||year%400==0){if(date>29)return 0}else if(date>28)return 0;if(month==4||month==6||month==9||month==11)if(date>30)return 0;if(hh<12&&ampm=="PM")hh=hh-0+12;else if(hh>11&&ampm=="AM")hh-=12;var newdate=new Date(year,month-1,date,hh,mm,ss);return newdate.getTime()}
function parseDate(val){var preferEuro=arguments.length==2?arguments[1]:false;generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");var checkList=new Array("generalFormats",preferEuro?"dateFirst":"monthFirst",preferEuro?"monthFirst":"dateFirst");var d=null;for(var i=0;i<checkList.length;i++){var l=window[checkList[i]];for(var j=0;j<l.length;j++){d=
getDateFromFormat(val,l[j]);if(d!=0)return new Date(d)}}return null}
function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object;var x=0,y=0;var use_gebi=false,use_css=false,use_layers=false;if(document.getElementById)use_gebi=true;else if(document.all)use_css=true;else if(document.layers)use_layers=true;if(use_gebi&&document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname])}else if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);
y=AnchorPosition_getPageOffsetTop(o)}else if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname])}else if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++)if(document.anchors[i].name==anchorname){found=1;break}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates}x=document.anchors[i].x;y=document.anchors[i].y}else{coordinates.x=0;coordinates.y=0;return coordinates}coordinates.x=x;coordinates.y=
y;return coordinates}
function getAnchorWindowPosition(anchorname){var coordinates=getAnchorPosition(anchorname);var x=0;var y=0;if(document.getElementById)if(isNaN(window.screenX)){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop}else{x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}else if(document.all){x=coordinates.x-document.body.scrollLeft+
window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop}else if(document.layers){x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset}coordinates.x=x;coordinates.y=y;return coordinates}function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent)!=null)ol+=el.offsetLeft;return ol}
function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft}function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent)!=null)ot+=el.offsetTop;return ot}function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop}
function PopupWindow_getXYPosition(anchorname){var coordinates;if(this.type=="WINDOW")coordinates=getAnchorWindowPosition(anchorname);else coordinates=getAnchorPosition(anchorname);this.x=coordinates.x;this.y=coordinates.y}function PopupWindow_setSize(width,height){this.width=width;this.height=height}function PopupWindow_populate(contents){this.contents=contents;this.populated=false}function PopupWindow_setUrl(url){this.url=url}
function PopupWindow_setWindowProperties(props){this.windowProperties=props}
function PopupWindow_refresh(){if(this.divName!=null)if(this.use_gebi)document.getElementById(this.divName).innerHTML=this.contents;else if(this.use_css)document.all[this.divName].innerHTML=this.contents;else{if(this.use_layers){var d=document.layers[this.divName];d.document.open();d.document.writeln(this.contents);d.document.close()}}else if(this.popupWindow!=null&&!this.popupWindow.closed){if(this.url!="")this.popupWindow.location.href=this.url;else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);
this.popupWindow.document.close()}this.popupWindow.focus()}}
function PopupWindow_showPopup(anchorname){this.getXYPosition(anchorname);this.x+=this.offsetX;this.y+=this.offsetY;if(!this.populated&&this.contents!=""){this.populated=true;this.refresh()}if(this.divName!=null)if(this.use_gebi){document.getElementById(this.divName).style.left=this.x-15;document.getElementById(this.divName).style.top=this.y+178;document.getElementById(this.divName).style.visibility="visible"}else if(this.use_css){document.all[this.divName].style.left=this.x;document.all[this.divName].style.top=
this.y;document.all[this.divName].style.visibility="visible"}else{if(this.use_layers){document.layers[this.divName].left=this.x;document.layers[this.divName].top=this.y;document.layers[this.divName].visibility="visible"}}else{if(this.popupWindow==null||this.popupWindow.closed){if(this.x<0)this.x=0;if(this.y<0)this.y=0;if(screen&&screen.availHeight)if(this.y+this.height>screen.availHeight)this.y=screen.availHeight-this.height;if(screen&&screen.availWidth)if(this.x+this.width>screen.availWidth)this.x=
screen.availWidth-this.width;var avoidAboutBlank=window.opera||document.layers&&!navigator.mimeTypes["*"]||navigator.vendor=="KDE"||document.childNodes&&!document.all&&!navigator.taintEnabled;this.popupWindow=window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"")}this.refresh()}}
function PopupWindow_hidePopup(){if(this.divName!=null)if(this.use_gebi)document.getElementById(this.divName).style.visibility="hidden";else if(this.use_css)document.all[this.divName].style.visibility="hidden";else{if(this.use_layers)document.layers[this.divName].visibility="hidden"}else if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null}}
function PopupWindow_isClicked(e){try{if(this.divName!=null){if(this.use_layers){var clickX=e.pageX;var clickY=e.pageY;var t=document.layers[this.divName];if(clickX>t.left&&clickX<t.left+t.clip.width&&clickY>t.top&&clickY<t.top+t.clip.height)return true;else return false}else if(document.all){var t=window.event.srcElement;while(t.parentElement!=null){if(t.id==this.divName)return true;if(t.name=="ajout_intervale_du")return true;else if(t.name=="ajout_intervale_au")return true;else if(t.name=="filtre_du")return true;
else if(t.name=="filtre_au")return true;else if(t.name=="periode_du")return true;else if(t.name=="periode_au")return true;else if(t.name=="supp_resa_ant")return true;else if(t.name=="attente_arrhes")return true;else if(t.name=="debut")return true;else if(t.name=="fin")return true;else if(t.name=="begin")return true;t=t.parentElement}return false}else if(this.use_gebi){if(e.srcElement!=""&&e.srcElement!=null)var t=e.srcElement;else var t=e.originalTarget;while(t.parentNode!=null){if(t.id==this.divName)return true;
if(t.name=="ajout_intervale_du")return true;else if(t.name=="ajout_intervale_au")return true;else if(t.name=="filtre_du")return true;else if(t.name=="filtre_au")return true;else if(t.name=="periode_du")return true;else if(t.name=="periode_au")return true;else if(t.name=="supp_resa_ant")return true;else if(t.name=="attente_arrhes")return true;else if(t.name=="debut")return true;else if(t.name=="fin")return true;else if(t.name=="begin")return true;t=t.parentNode}return false}return false}return false}catch(error){return true}}
function PopupWindow_hideIfNotClicked(e){if(this.autoHideEnabled&&!this.isClicked(e))this.hidePopup()}function PopupWindow_autoHide(){this.autoHideEnabled=true}function PopupWindow_hidePopupWindows(e){for(var i=0;i<popupWindowObjects.length;i++)if(popupWindowObjects[i]!=null){var p=popupWindowObjects[i];p.hideIfNotClicked(e)}}
function PopupWindow_attachListener(){if(document.layers)document.captureEvents(Event.MOUSEUP);window.popupWindowOldEventListener=document.onmouseup;if(window.popupWindowOldEventListener!=null)document.onmouseup=new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");else document.onmouseup=PopupWindow_hidePopupWindows}
function PopupWindow(){if(!window.popupWindowIndex)window.popupWindowIndex=0;if(!window.popupWindowObjects)window.popupWindowObjects=new Array;if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener()}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.divName=null;this.popupWindow=null;this.width=0;this.height=0;this.populated=false;this.visible=false;this.autoHideEnabled=false;this.contents="";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
if(arguments.length>0){this.type="DIV";this.divName=arguments[0]}else this.type="WINDOW";this.use_gebi=false;this.use_css=false;this.use_layers=false;if(document.getElementById)this.use_gebi=true;else if(document.all)this.use_css=true;else if(document.layers)this.use_layers=true;else this.type="WINDOW";this.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;
this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked}
function CalendarPopup(){var c;if(arguments.length>2){c=new PopupWindow(arguments[2]);c.offsetX=arguments[0];c.offsetY=arguments[1]}else{c=new PopupWindow;c.setSize(150,175);c.offsetX=-100;c.offsetY=-160}c.autoHide();c.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");c.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");c.dayHeaders=new Array("S","M","T","W","T","F",
"S");c.returnFunction="CP_tmpReturnFunction";c.returnMonthFunction="CP_tmpReturnMonthFunction";c.returnQuarterFunction="CP_tmpReturnQuarterFunction";c.returnYearFunction="CP_tmpReturnYearFunction";c.weekStartDay=0;c.isShowYearNavigation=false;c.displayType="date";c.disabledWeekDays=new Object;c.disabledDatesExpression="";c.yearSelectStartOffset=2;c.currentDate=null;c.todayText="Today";c.ImgPath="";c.cssPrefix="";c.isShowYearNavigationInput=false;window.CP_targetInput=null;window.CP_dateFormat="MM/dd/yyyy";
c.setReturnFunction=CP_setReturnFunction;c.setReturnMonthFunction=CP_setReturnMonthFunction;c.setReturnQuarterFunction=CP_setReturnQuarterFunction;c.setReturnYearFunction=CP_setReturnYearFunction;c.setMonthNames=CP_setMonthNames;c.setMonthAbbreviations=CP_setMonthAbbreviations;c.setDayHeaders=CP_setDayHeaders;c.setWeekStartDay=CP_setWeekStartDay;c.setDisplayType=CP_setDisplayType;c.setDisabledWeekDays=CP_setDisabledWeekDays;c.addDisabledDates=CP_addDisabledDates;c.setYearSelectStartOffset=CP_setYearSelectStartOffset;
c.setTodayText=CP_setTodayText;c.setImgPath=CP_setImgPath;c.showYearNavigation=CP_showYearNavigation;c.showCalendar=CP_showCalendar;c.hideCalendar=CP_hideCalendar;c.getStyles=getCalendarStyles;c.refreshCalendar=CP_refreshCalendar;c.getCalendar=CP_getCalendar;c.select=CP_select;c.setCssPrefix=CP_setCssPrefix;c.showYearNavigationInput=CP_showYearNavigationInput;return c}
function CP_tmpReturnFunction(y,m,d){if(window.CP_targetInput!=null){var dt=new Date(y,m-1,d,0,0,0);window.CP_targetInput.value=formatDate(dt,window.CP_dateFormat)}else alert("Use setReturnFunction() to define which function will get the clicked results!")}function CP_tmpReturnMonthFunction(y,m){alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , month="+m)}
function CP_tmpReturnQuarterFunction(y,q){alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , quarter="+q)}function CP_tmpReturnYearFunction(y){alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+y)}function CP_setReturnFunction(name){this.returnFunction=name}function CP_setReturnMonthFunction(name){this.returnMonthFunction=name}
function CP_setReturnQuarterFunction(name){this.returnQuarterFunction=name}function CP_setReturnYearFunction(name){this.returnYearFunction=name}function CP_setMonthNames(){for(var i=0;i<arguments.length;i++)this.monthNames[i]=arguments[i]}function CP_setMonthAbbreviations(){for(var i=0;i<arguments.length;i++)this.monthAbbreviations[i]=arguments[i]}function CP_setDayHeaders(){for(var i=0;i<arguments.length;i++)this.dayHeaders[i]=arguments[i]}function CP_setWeekStartDay(day){this.weekStartDay=day}
function CP_showYearNavigation(){this.isShowYearNavigation=arguments.length>0?arguments[0]:true}function CP_setDisplayType(type){if(type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false}this.displayType=type}function CP_setYearSelectStartOffset(num){this.yearSelectStartOffset=num}
function CP_setDisabledWeekDays(){this.disabledWeekDays=new Object;for(var i=0;i<arguments.length;i++)this.disabledWeekDays[arguments[i]]=true}
function CP_addDisabledDates(start,end){if(arguments.length==1)end=start;if(start==null&&end==null)return;if(this.disabledDatesExpression!="")this.disabledDatesExpression+="||";if(start!=null){start=parseDate(start);start=""+start.getFullYear()+LZ(start.getMonth()+1)+LZ(start.getDate())}if(end!=null){end=parseDate(end);end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate())}if(start==null)this.disabledDatesExpression+="(ds<="+end+")";else if(end==null)this.disabledDatesExpression+="(ds>="+
start+")";else this.disabledDatesExpression+="(ds>="+start+"&&ds<="+end+")"}function CP_setTodayText(text){this.todayText=text}function CP_setImgPath(text){this.ImgPath=text}function CP_setCssPrefix(val){this.cssPrefix=val}function CP_showYearNavigationInput(){this.isShowYearNavigationInput=arguments.length>0?arguments[0]:true}function CP_hideCalendar(){if(arguments.length>0)window.popupWindowObjects[arguments[0]].hidePopup();else this.hidePopup()}
function CP_refreshCalendar(index){var calObject=window.popupWindowObjects[index];if(arguments.length>1)calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));else calObject.populate(calObject.getCalendar());calObject.refresh()}
function CP_showCalendar(anchorname){if(false&&this.currentDate==null)this.currentDate=new Date(parseDate("2004-06-16"));if(arguments.length>1)if(arguments[1]==null||arguments[1]=="")this.currentDate=new Date;else this.currentDate=new Date(parseDate(arguments[1]));this.populate(this.getCalendar());this.showPopup(anchorname)}
function CP_select(inputobj,linkname,format){var selectedDate=arguments.length>3?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return}if(inputobj.type!="text"&&inputobj.type!="hidden"&&inputobj.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");
window.CP_targetInput=null;return}window.CP_targetInput=inputobj;this.currentDate=null;var time=0;if(selectedDate!=null)time=getDateFromFormat(selectedDate,format);else if(inputobj.value!="")time=getDateFromFormat(inputobj.value,format);if(selectedDate!=null||inputobj.value!="")if(time==0)this.currentDate=null;else this.currentDate=new Date(time);window.CP_dateFormat=format;this.showCalendar(linkname)}
function getCalendarStyles(){var result="";var p="";if(this!=null&&typeof this.cssPrefix!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!="")p=this.cssPrefix;result+="<STYLE>\n";result+="."+p+"cpYearNavigation,."+p+"cpMonthNavigation { background-color:#C0C0C0; text-align:center; vertical-align:center; text-decoration:none; color:#000000; font-weight:bold;}\n";result+="."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+
p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText { font-family:arial; font-size:8pt;}\n";result+="TD."+p+"cpDayColumnHeader { text-align:right; border:solid thin #C0C0C0;border-width:0 0 1 0;}\n";result+="."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate { text-align:right; text-decoration:none;}\n";result+="."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+
p+"cpCurrentDateDisabled { color:#D0D0D0; text-align:right; text-decoration:line-through;}\n";result+="."+p+"cpCurrentMonthDate, .cpCurrentDate { color:#000000;}\n";result+="."+p+"cpOtherMonthDate { color:#808080;}\n";result+="TD."+p+"cpCurrentDate { color:white; background-color: #C0C0C0; border-width:1; border:solid thin #800000;}\n";result+="TD."+p+"cpCurrentDateDisabled { border-width:1; border:solid thin #FFAAAA;}\n";result+="TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled { border:solid thin #C0C0C0; border-width:1 0 0 0;}\n";
result+="A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled { height:20px;}\n";result+="A."+p+"cpTodayText { color:black;}\n";result+="."+p+"cpTodayTextDisabled { color:#D0D0D0;}\n";result+="."+p+"cpBorder { border:solid thin #808080;}\n";result+="</STYLE>\n";return result}
function CP_getCalendar(){var now=new Date;if(this.type=="WINDOW")var windowref="window.opener.";else var windowref="";var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendrier</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+='<CENTER><DIV style="position:absolute; background-color:white"><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n'}else{result+='<DIV style="position:absolute; background-color:white"><TABLE CLASS="'+
this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result+="<TR><TD ALIGN=CENTER>\n";result+="<CENTER>\n"}if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null)this.currentDate=now;if(arguments.length>0)var month=arguments[0];else var month=this.currentDate.getMonth()+1;if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1])var year=arguments[1];else var year=this.currentDate.getFullYear();var daysinmonth=new Array(0,
31,28,31,30,31,30,31,31,30,31,30,31);if(year%4==0&&year%100!=0||year%400==0)daysinmonth[2]=29;var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;offset=weekday>=this.weekStartDay?weekday-this.weekStartDay:7-this.weekStartDay+weekday;if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--}display_date=daysinmonth[display_month]-offset+1}var next_month=month+1;var next_month_year=
year;if(next_month>12){next_month=1;next_month_year++}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--}var date_class;if(this.type!="WINDOW")result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";var refresh="javascript:"+windowref+"CP_refreshCalendar";if(this.isShowYearNavigation){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+
"("+this.index+","+last_month+","+last_month_year+');">&lt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+"</SPAN></TD>";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');">&gt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';
result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+"("+this.index+","+month+","+(year-1)+');">&lt;</A></TD>';if(this.isShowYearNavigationInput)result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+"("+this.index+","+month+',this.value-0);"></TD>';else result+='<TD CLASS="'+this.cssPrefix+
'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+"</SPAN></TD>";result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refresh+"("+this.index+","+month+","+(year+1)+');">&gt;</A></TD>'}else{result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+last_month+","+last_month_year+');"><IMG BORDER=0 SRC="'+this.ImgPath+
'calendar/previous.gif"></A></TD>\n';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+" "+year+"</SPAN></TD>\n";result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refresh+"("+this.index+","+next_month+","+next_month_year+');"><IMG BORDER=0 SRC="'+this.ImgPath+'calendar/following.gif"></A></TD>\n'}result+="</TR></TABLE>\n";result+=
"<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";result+="<TR>\n";for(var j=0;j<7;j++)result+='<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+"</TD>\n";result+="</TR>\n";for(var row=1;row<=6;row++){result+="<TR>\n";for(var col=1;col<=7;col++){var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+
this.disabledDatesExpression+")")}var dateClass="";if(display_month==this.currentDate.getMonth()+1&&display_date==this.currentDate.getDate()&&display_year==this.currentDate.getFullYear())dateClass="cpCurrentDate";else if(display_month==month)dateClass="cpCurrentMonthDate";else dateClass="cpOtherMonthDate";if(disabled||this.disabledWeekDays[col-1])result+=' <TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+"</SPAN></TD>\n";else{var selected_date=
display_date;var selected_month=display_month;var selected_year=display_year;if(this.displayType=="week-end"){var d=new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate()+(7-col));selected_year=d.getYear();if(selected_year<1E3)selected_year+=1900;selected_month=d.getMonth()+1;selected_date=d.getDate()}result+=' <TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+"("+selected_year+","+selected_month+","+selected_date+");"+windowref+
"CP_hideCalendar('"+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+"</A></TD>\n"}display_date++;if(display_date>daysinmonth[display_month]){display_date=1;display_month++}if(display_month>12){display_month=1;display_year++}}result+="</TR>"}var current_weekday=now.getDay()-this.weekStartDay;if(current_weekday<0)current_weekday+=7;result+="<TR>\n";result+=' <TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';if(this.disabledDatesExpression!=""){var ds=""+now.getFullYear()+
LZ(now.getMonth()+1)+LZ(now.getDate());eval("disabled=("+this.disabledDatesExpression+")")}if(disabled||this.disabledWeekDays[current_weekday+1])result+=' <SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+"</SPAN>\n";else result+=' <A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+windowref+"CP_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n";result+=" <BR>\n";
result+=" </TD></TR></TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){if(arguments.length>0)var year=arguments[0];else if(this.displayType=="year")var year=now.getFullYear()-this.yearSelectStartOffset;else var year=now.getFullYear();if(this.displayType!="year"&&this.isShowYearNavigation){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+
this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year-1)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/prev.gif"></A></TD>\n';result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+"</TD>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year+1)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/next.gif"></A></TD>\n';
result+="</TR></TABLE>\n"}}if(this.displayType=="month"){result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<4;i++){result+="<TR>";for(var j=0;j<3;j++){var monthindex=i*3+j;result+='<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+"("+year+","+(monthindex+1)+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+"</A></TD>"}result+=
"</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="quarter"){result+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<2;i++){result+="<TR>";for(var j=0;j<2;j++){var quarter=i*2+j+1;result+='<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+"("+year+","+quarter+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+"</A><BR><BR></TD>"}result+=
"</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}if(this.displayType=="year"){var yearColumnSize=4;result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+="<TR>\n";result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year-yearColumnSize*2)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/prev.gif"></A></TD>\n';result+=' <TD CLASS="'+
this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="cpYearNavigation" HREF="javascript:'+windowref+"CP_refreshCalendar("+this.index+","+(year+yearColumnSize*2)+');"><IMG BORDER=0 WIDTH=16 HEIGHT=16 SRC="/images/booking_engine/next.gif"></A></TD>\n';result+="</TR></TABLE>\n";result+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear=year+j*yearColumnSize+i;result+='<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+
this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+"("+currentyear+");"+windowref+"CP_hideCalendar('"+this.index+'\');" CLASS="'+date_class+'">'+currentyear+"</A></TD>"}result+="</TR>"}result+="</TABLE></CENTER></TD></TR></TABLE>\n"}result+='</DIV><iframe style="width:151; height:105%; border:0" src="javascript:false"></iframe>';if(this.type=="WINDOW")result+="</BODY></HTML>\n";return result};/*

Milonic DHTML Menu - JavaScript Website Navigation System.
Version 5.788 - Built: Monday January 14 2008 - 18:57
Copyright 2008 (c) Milonic Solutions Limited. All Rights Reserved.
This is a commercial software product, please visit http://www.milonic.com/ for more information.
See http://www.milonic.com/license.php for Commercial License Agreement
All Copyright statements must always remain in place in all files at all times

*******  PLEASE NOTE: THIS IS NOT FREE SOFTWARE, IT MUST BE LICENSED FOR ALL USE  ******* 

License Details:
 Number: 207296
    URL: iha.com
   Type: Professional
  Dated: Tuesday January 22 2008

*/

lNum=207296;lURL="iha.com";lVer="5.788";_$t_="Please visit www.milonic.com for details on how to remove this evaluation message";_mD=2;_d=document;_dB=_d.body;_n=navigator;_L=location;_nv=$tL(_n.appVersion);_nu=$tL(_n.userAgent);_ps=parseInt(_n.productSub);_cls=_toL=X_=Y_=_n=null;_W=window;_wp=_W.createPopup;ie=(_d.all)?1:0;ie4=(!_d.getElementById&&ie)?1:0;ie5=(!ie4&&ie&&!_wp)?1:0;ie55=(!ie4&&ie&&_wp)?1:0;ie7=(_nu.indexOf("msie 7")!=-1)?1:0;ns6=(_nu.indexOf("gecko")!=-1)?1:0;konq=(_nu.indexOf("konqueror")!=-1)?1:0;sfri=(_nu.indexOf("safari")!=-1)?1:0;if(sfri&&_d.evaluate)sfri=0;if(konq||sfri){_ps=0;ns6=0}ns4=(_d.layers)?1:0;ns61=(_ps>=20010726)?1:0;ns7=(_ps>=20020823)?1:0;ns72=(_ps>=20040804)?1:0;ff15=(_ps>=20060000)?1:0;op=(_W.opera)?1:0;if(op||konq){ie=0;ie7=0;}op5=(_nu.indexOf("opera 5")!=-1)?1:0;op6=(_nu.indexOf("opera 6")!=-1||_nu.indexOf("opera/6")!=-1)?1:0;op7=(_nu.indexOf("opera 7")!=-1||_nu.indexOf("opera/7")!=-1)?1:0;_OpV=(op&&_W.opera.version)?_W.opera.version():0;if(_OpV)op7=1;mac=(_nv.indexOf("mac")!=-1)?1:0;if(ns6||ns4||op||sfri)mac=0;ns60=0;if(ns6&&!ns61)ns60=1;if(op7)op=0;IEDtD=0;if(!op&&((_d.all||ns7)&&_d.compatMode=="CSS1Compat")||(mac&&_d.doctype&&_d.doctype.name.indexOf(".dtd")!=-1))IEDtD=1;_jv="javascript:;";inEditMode=_rstC=inDragMode=_d.dne=lcl=$R1=$mD=_mcnt=_sL=_sT=_ofMT=_oldbW=_bW=_oldbH=_bl=_el=_st=_en=_cKA=$BW=0;_mtX="";_startM=_c=1;_trueItemRef=focusedMenu=t_=_itemRef=_mn=-1;_zi=_aN=_bH=999;if(op)ie55=0;B$="absolute";$O="menu";$5="hidden";$_O="scroll";function $c(v){if(_d.getElementById)return _d.getElementById(v);if(_d.all)return _d.all[v]}function _StO(f,m){return setTimeout(f,m)}_m=[];_mi=[];_sm=[];_tsm=[];_cip=[];$S3="2E636F6D2F";$S4="646D2E706870";$S5=4048;_MT=_StO("",0);_oMT=_StO("",0);_cMT=_StO("",0);_mst=_StO("",0);_Mtip=_StO("",0);$u="undefined ";_Lhr=_L.href;$6="visible";if(op5){$5=$tU($5);$6=$tU($6)}function M_hideLayer(){}function _oTree(){}function mmMouseMove(){}function _TtM(){}function _IdM(){}function _ocURL(){}function mmClick(){}function autoOT(){}function _iF0C(){}function showtip(){}function isEditMode(){}function hidetip(){}function mmVisFunction(){}function doMenuResize(){}function _tMR(){}function _maxm(){}function $9(ap){if(ie55){try{if(ap.filters){return 1}}catch(e){}}else return false}function _p8(a,d){var t=[];for(_a=0;_a<a.length;_a++){if(a[_a]!=d){t[t.length]=a[_a]}}return t}function copyOf(w){for(_cO in w){this[_cO]=w[_cO]}}function $tL(v){if(v)return v.toLowerCase()}function $tU(v){if(v)return v.toUpperCase()}function $pU(v){if(v)return parseInt(v)}_lDd=0;function _gLd(){if(_d.readyState&&_d.readyState!="complete"){setTimeout("_gLd()",50);return}_lDd=1;_oldbH=0}if(!_d.readyState)_d.addEventListener('DOMContentLoaded',_gLd,false);else setTimeout("_gLd()",50);function drawMenus(){_startM=1;_oldbH=0;_oldbW=0;_baL=0;if(_W.buildAfterLoad)_baL=1;for(_y=_mcnt;_y<_m.length;_y++)o$(_y,1,_baL);if(_W._pageIsXML){var G=$c(_menuContainer);if(!G){G=_d.createElement("div");G.id=_menuContainer;_dB.appendChild(G)}G.innerHTML=_mtX}}_$S={menu:0,text:1,url:2,showmenu:3,status:4,onbgcolor:5,oncolor:6,offbgcolor:7,offcolor:8,offborder:9,separatorcolor:10,padding:11,fontsize:12,fontstyle:13,fontweight:14,fontfamily:15,high3dcolor:16,low3dcolor:17,pagecolor:18,pagebgcolor:19,headercolor:20,headerbgcolor:21,subimagepadding:22,subimageposition:23,subimage:24,onborder:25,ondecoration:26,separatorsize:27,itemheight:28,image:29,imageposition:30,imagealign:31,overimage:32,decoration:33,type:34,target:35,align:36,imageheight:37,imagewidth:38,openonclick:39,closeonclick:40,keepalive:41,onfunction:42,offfunction:43,onbold:44,onitalic:45,bgimage:46,overbgimage:47,onsubimage:48,separatorheight:49,separatorwidth:50,separatorpadding:51,separatoralign:52,onclass:53,offclass:54,itemwidth:55,pageimage:56,targetfeatures:57,visitedcolor:58,pointer:59,imagepadding:60,valign:61,clickfunction:62,bordercolor:63,borderstyle:64,borderwidth:65,overfilter:66,outfilter:67,margin:68,pagebgimage:69,swap3d:70,separatorimage:71,pageclass:72,menubgimage:73,headerborder:74,pageborder:75,title:76,pagematch:77,rawcss:78,fileimage:79,clickcolor:80,clickbgcolor:81,clickimage:82,clicksubimage:83,imageurl:84,pagesubimage:85,dragable:86,clickclass:87,clickbgimage:88,imageborderwidth:89,overseparatorimage:90,clickseparatorimage:91,pageseparatorimage:92,menubgcolor:93,opendelay:94,tooltip:95,disabled:96,dividespan:97,tipdelay:98,tipfollow:99,tipmenu:100,menustyle:101,pageoncolor:102,id:103,overpageimage:104,nowrap:105,overflow:106,hotkey:107,leftimage:108,rightimage:109,overleftimage:110,overrightimage:111,pageleftimage:112,pagerightimage:113,nobreadcrumb:114,custom:115,subimagecss:116,onsubimagecss:117};function mm_style(){for($i in _$S)this[$i]=_n;this.built=0}_$M={items:0,name:1,top:2,left:3,itemwidth:4,screenposition:5,style:6,alwaysvisible:7,align:8,orientation:9,keepalive:10,openstyle:11,margin:12,overflow:13,position:14,overfilter:15,outfilter:16,menuwidth:17,itemheight:18,followscroll:19,menualign:20,mm_callItem:21,mm_obj_ref:22,mm_built:23,menuheight:24,ignorecollision:25,divides:26,zindex:27,opendelay:28,resizable:29,minwidth:30,maxwidth:31,mm_fixheight:32,C:33,rawcss:34};function menuname(name){for($i in _$M)this[$i]=_n;this.name=$tL(name);_c=1;_mn++}function f_(i){_mi[_bl]=[];_mi[_bl][0]=_mn;i=i.split(";");_sc="";for(var a=0;a<i.length;a++){var p=i[a].indexOf("`");if(p!=-1){_sc=";";_tI=i[a];if(p==i[a].lastIndexOf("`")){for(var b=a;b<i.length;b++){if(i[b+1]){_tI+=";"+i[b+1];a++;if(i[b+1].indexOf("`")!=-1)b=i.length}}}i[a]=_tI.replace(/`/g,"")}p=i[a].indexOf("=");if(p==-1){if(i[a])_si=_si+";"+i[a]+_sc}else{_si=i[a].slice(p+1);_w=i[a].slice(0,p);if(_w=="showmenu")_si=$tL(_si)}if(i[a]&&_$S[_w])_mi[_bl][_$S[_w]]=_si}var S=_x[6];if(_mi[_bl][101])S=eval(_mi[_bl][101]);for($i in S)if(S[$i]){var v=_mi[_bl][_$S[$i]];if(!v&&v!="")_mi[_bl][_$S[$i]]=S[$i]}_m[_mn][0][_c-2]=_bl;_c++;_bl++}_c=0;function ami(t){_t=this;if(_c==1){_c++;_m[_mn]=[];_x=_m[_mn];for($i in _t)_x[_$M[$i]]=_t[$i];_x[21]=-1;_x[0]=[];if(!_x[12])_x[12]=0;var s=_m[_mn][6];var m=_m[_mn];if(m[15]==_n)m[15]=s.overfilter;if(m[16]==_n)m[16]=s.outfilter;if(m[13]==_n)m[13]=s.overflow;s[65]=(s.borderwidth)?$pU(s.borderwidth):0;s[64]=s.borderstyle;s[63]=s.bordercolor;if(_W.ignoreCollisions)m[25]=1;if(!s.built){_WzI=_zi;if(_W.menuZIndex){_WzI=_W.menuZIndex;_zi=_WzI}lcl++;var v=s.visitedcolor;if(v&&!_W._pageIsXML){_oC=s.offcolor;if(!_oC)_oC="#000000";if(!v)v="#ff0000";_d.write("<style>.g_"+lcl+":link{color:"+_oC+"}.g_"+lcl+":visited{color:"+v+"}</style>");s.g_="g_"+lcl}s.built=1}}f_(t)}menuname.prototype.aI=ami;
// fonctions async
function BasketGetXmlHttpObject()
{
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	
	}
	return objXMLHttp
}

function BasketstateChanged(fonction, xmlHttp)
{
	
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete") fonction(xmlHttp.responseText);
}

function BaskethtmlData(url, type, fonction, param, name)
{	
	var xmlHttp=BasketGetXmlHttpObject()
	
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return;
	}
	
	url=url+"&sid="+name+Math.random();
	
	if (type=="GET") { 
		xmlHttp.open("GET",url,true) ;
		xmlHttp.send(param);
	} else {
		xmlHttp.open("POST",url,true);
		if (param!="") {
			xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
			xmlHttp.setRequestHeader("Content-length", param.length);
			xmlHttp.setRequestHeader("Connection", "close");
		}
		xmlHttp.send(param);
	}
	
	xmlHttp.onreadystatechange= function() { 
		BasketstateChanged(fonction, xmlHttp);
	}
}

function refresh_basket (n_annonce, type, form) {
	
	var menu_cookie = document.cookie;
	if (menu_cookie=="") return;
	var str = "n_annonce="+n_annonce+"&type="+type+"&form="+form;
	BaskethtmlData('script/async_basket.html', "POST", refresh_count_basket, str, "basket");
	
}

function refresh_count_basket (val) {
		
	if (val=="") return;
	
	var doc = eval('(' + val + ')'); 
	
	var tab = doc.obj[0];
	
	var style = "";
	if (tab["count"]!="0") {
		document.getElementById("basket_count").style.color="green"; 
		document.getElementById("basket_count").style.fontSize="12px"; 
		document.getElementById("basket_count").style.fontWeight="bold";
	} else {
		document.getElementById("basket_count").style.color=""; 
		document.getElementById("basket_count").style.fontSize=""; 
		document.getElementById("basket_count").style.fontWeight="";
	}
	
	document.getElementById("basket_count2").innerHTML=tab["count"];
	if (tab["form"]!="undefined") eval('document.'+tab["form"]+'.submit();');
}function ihagradient (obj1, obj2, start, end, type, quality, width2) {
	var gbase = document.getElementById(obj1);
	var width = gbase.clientWidth;
	var height = gbase.clientHeight;	
	gbase.style.background = start;	
	var gbase2 = document.getElementById(obj2);	
	var degrad_height = height/quality;
	var degrad_width = width/quality;
	if (width2>0) {width=width2; degrad_width = width2/quality;}	
	if(type=='vertical') {
		for(i = 0; i < height/degrad_height; i++) {
			var g = document.createElement('div');
			g.style.fontSize = '0px';
			g.style.overflow = 'hidden';
			g.style.height = degrad_height+'px';
			g.style.width = width + 'px';
			g.style.background = end;
			g.style.opacity = i/(height/degrad_height);
			g.style.filter = 'alpha(opacity=' + i/(height/(100*degrad_height)) + ')';
			gbase2.appendChild(g);
		}
	} else {
		for(i = (width/degrad_width); i > 1; i--) {
			var g = document.createElement('div');
			g.style.cssText = 'float:left;';
			g.style.height = height + 'px';
			g.style.width = degrad_width+'px';
			g.style.fontSize = '0px';
			g.style.overflow = 'hidden';
			g.style.background = end;
			g.style.opacity = i/(width/degrad_width);
			g.style.filter = 'alpha(opacity=' + i/(width/(100*degrad_width)) + ')';
			gbase2.appendChild(g);
		}
	}
	document.getElementById(obj1).appendChild(gbase2);
}