document.documentElement.className+=" js";if(is_ie6){document.documentElement.setAttribute("xmlns:v","urn:schemas-microsoft-com:vml")}var moviLib={lang:undefined,acceptedLanguage:["fr","en"],baseURL:document.baseURI||document.getElementsByTagName("BASE")[0].href,binding:function(a,b){return function(){return b.apply(a,arguments)}},register:function(a){a()},getLanguageFromUrl:function(){if(unescape(window.location.search.substr(1)).indexOf("&")!=-1){var b=unescape(window.location.search.substr(1)).split("&");$_GET=new Array();for(var c=0;c<b.length;c++){$_GET[b[c].substring(0,b[c].indexOf("="))]=b[c].substr(b[c].indexOf("=")+1)}return $_GET.lang||"fr"}else{var b=unescape(window.location.href.substr(this.baseURL.length)).split("/");if(jQuery.inArray(b[0],this.acceptedLanguage)!=-1){return this.acceptedLanguage[jQuery.inArray(b[0],this.acceptedLanguage)]}else{return"fr"}}},extractUrlParameters:function(a){var b=a.split("?");return b[1]},checkKeyOnInput:function(b){var a=b.target;if(a.nodeName&&(a.nodeName=="INPUT"||a.nodeName=="TEXTAREA")){return true}else{return false}},newWindowsForLink:function(f,e,d,c,b,a){if(jQuery("a."+f).length==0){return}jQuery("a."+f).live("click",function(g){if(((!jQuery.browser.msie||(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)>=8))&&g.button==0)||(jQuery.browser.msie&&g.button==1)){g.preventDefault();moviLib.nouvelleFenetre(this.href,this.target,e,d,c,b,a)}});return},nouvelleFenetre:function(b,c,a,d,f,g,h){var i="";if(!h&&!g){var h=Math.floor((jQuery(window).height()-f)/2);var g=Math.floor((jQuery(window).width()-d)/2)}if(a=="console"){i="resizable=yes,scrollbars=yes,status=yes,height="+f+",width="+d+",left="+g+",top="+h}if(a=="withMenu"){i="resizable=yes,scrollbars=yes,menubar=yes,status=yes,height="+f+",width="+d+",left="+g+",top="+h}if(a=="withTool"){i="resizable=yes,scrollbars=yes,status=yes,toolbar=yes,height="+f+",width="+d}if(a=="image"){i="resizable=yes,scrollbars=yes,status=yes,toolbar=yes,width="+d}var e=window.open(b,jQuery.removeSpace(c),i);e.focus()},retFalse:function(){return false}};(function(a){a.extend({isObject:function(b){return(b instanceof Object||b.constructor==Object)},removeSpace:function(b){return unescape(b).split(/\s/g).join("")},enleveAccent:function(f){var e="";var d=f.length;for(var c=0;c<d;c++){var b=f.charAt(c);if((b=="à")||(b=="â")){b="a"}else{if(b=="ç"){b="c"}else{if((b=="é")||(b=="è")||(b=="ê")||(b=="ë")){b="e"}else{if((b=="ï")||(b=="î")){b="i"}else{if((b=="ö")||(b=="ô")){b="o"}else{if((b=="ü")||(b=="ù")||(b=="û")){b="u"}else{if(b==" "){b=""}}}}}}}e+=b}return e},stripslashes:function(b){return(b+"").replace("/\0/g","0").replace("/(.)/g","$1")},str_pad:function(f,g,e,d){var c=f;for(var b=f.length;b<g;b++){d=d||"STR_PAD_LEFT";if(d=="STR_PAD_LEFT"){c=e+c}if(d=="STR_PAD_RIGHT"){c=c+e}}return c},array_fill:function(b,d,f){var e,c={};if(!isNaN(b)&&!isNaN(d)){for(e=0;e<d;e++){c[(e+b)]=f}}return c},isUrl:function(b){return/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(b)},keys:function(d){var b=[];for(var c in d){b.push(c)}return b},values:function(d){var b=[];for(var c in d){b.push(d[c])}return b}})})(jQuery);(function(a){a.extend(a.expr[":"],{data:function(f,g,d){var h=a(f).get(0),c;if(!d[3]){for(var b in h){if((/jQuery\d+/).test(b)){return true}}}else{c=d[3].split("=");if(c[1]){if((/^\/.+\/([mig]+)?$/).test(c[1])){return(new RegExp(c[1].substr(1,c[1].lastIndexOf("/")-1),c[1].substr(c[1].lastIndexOf("/")+1))).test(a(f).data(c[0]))}else{return a(f).data(c[0])==c[1]}}else{if(a(f).data(c[0])){return true}else{a(f).removeData(c[0]);return false}}}return false}})})(jQuery);if(jQuery){(function(){jQuery.extend(jQuery.fn,{rightClick:function(a){jQuery(this).each(function(){jQuery(this).mousedown(function(c){var b=c;jQuery(this).mouseup(function(){jQuery(this).unbind("mouseup");if(b.button==2){a.call(jQuery(this),b);return false}else{return true}})});jQuery(this)[0].oncontextmenu=function(){return false}});return jQuery(this)},rightMouseDown:function(a){jQuery(this).each(function(){jQuery(this).mousedown(function(b){if(b.button==2){a.call(jQuery(this),b);return false}else{return true}});jQuery(this)[0].oncontextmenu=function(){return false}});return jQuery(this)},rightMouseUp:function(a){jQuery(this).each(function(){jQuery(this).mouseup(function(b){if(b.button==2){a.call(jQuery(this),b);return false}else{return true}});jQuery(this)[0].oncontextmenu=function(){return false}});return jQuery(this)},noContext:function(){jQuery(this).each(function(){jQuery(this)[0].oncontextmenu=function(){return false}});return jQuery(this)}})})(jQuery)}(function(a){a.fn.inputdynvalue=function(b){var c=a.extend({},$.fn.inputdynvalue.defaults,b);return this.each(function(){var d=c.htext;switch(c.htext){case"title":d=a(this).attr("title");break;case"value":d=a(this).attr("value");break;case"label":d=a(this).prev().text();break}$(this).attr("value",d).addClass(c.hclass).unbind("focus.dynvalue blur.dynvalue").bind("focus.dynvalue",function(){if(this.value===d){this.value="";$(this).removeClass(c.hclass)}}).bind("blur.dynvalue",function(){if(this.value===""){this.value=d;$(this).addClass(c.hclass)}})})};a.fn.inputdynvalue.defaults={htext:"label",hclass:"hint"}})(jQuery);function preLoadPanel(a){jQuery("#page").append(jQuery('<div id="'+a+'"><img src="./images/ld.gif" alt="" style="border:none;"/></div>'));return function(){if(jQuery("#carte").length==0){return}var d=jQuery("#rechercheiti").clone();jQuery("#rechercheiti").remove();d.attr("id","rechercheiti").addClass(moviLib.getLanguageFromUrl());oCart.oInterface.oHTML.append(d);d.addClass("active");var b=d.width();var c=d.height();d.css({left:parseInt(oCart.oMask.css("left"))+Math.floor(parseInt(oCart.oMask.width())/2)-Math.floor(b/2),top:parseInt(oCart.oMask.css("top"))+Math.floor(parseInt(oCart.oMask.height())/2)-Math.floor(c/2)})}}(function(a){a.fn.resetInputs=function(){return this.each(function(){if(a(this).attr("value")!=a(this).prev().text()&&a(this).attr("value")!=""){if(a(this).parent().find(".reset").length>0){return}var b=a('<img class="reset" src="./images/close.gif" alt="Reset"/>').bind("click",function(){a(this).siblings(".ac_location").val("");a(this).prev().inputdynvalue({htext:"label"});a(this).remove()});a(this).after(b)}})}})(jQuery);function onLoadFunctions(){jQuery("input.dynvalue").each(function(){jQuery(this).resetInputs()}).inputdynvalue({htext:"value"}).live("focusout",function(){jQuery(this).resetInputs()});jQuery("table not(.nozebra) tr").hover(function(){jQuery(this).addClass("rowover")},function(){jQuery(this).removeClass("rowover")});jQuery("table not(.nozebra) tr:even").addClass("rowimp");jQuery("table not(.nozebra) tr:odd").addClass("rowpai");moviLib.newWindowsForLink("newwindow","withMenu",650,400);moviLib.newWindowsForLink("externe");if(typeof jQuery.datepicker!="undefined"){jQuery.datepicker.setDefaults(jQuery.extend({defaultDate:null,showOn:"button",minDate:new Date,maxDate:new Date(2011,07-1,02),buttonImage:"./images/calendar.gif",buttonImageOnly:true},jQuery.datepicker.regional.fr));jQuery("#dateField").datepicker(jQuery.datepicker.regional[moviLib.getLanguageFromUrl()])}if(typeof jQuery.iPhone=="undefined"){var paramsVille={cacheLength:1,max:500,minChars:3,width:250,matchContains:true,extraParams:{lang:moviLib.getLanguageFromUrl(),only:function(){return jQuery("#restrict").val()||""}},formatItem:function(row){if(row[0].indexOf("---")==-1){return row[0]+" ("+row[1]+")"}else{return"<strong>"+row[0]+"</strong>"}},formatResult:function(row){if(row[0].indexOf("---")==-1){return row[0]+" ("+row[1]+")"}else{return row[1]}}};var paramsLieu={cacheLength:1,max:300,minChars:3,matchContains:true,formatItem:function(row){if(row[0].indexOf("---")!=-1){return"<strong>"+row[0]+"</strong>"}else{if(typeof row[1]!="undefined"){return row[0]+" ("+row[1]+")"}else{return row[0]}}},formatResult:function(row){if(row[0].indexOf("---")!=-1){return row[1]}else{if(typeof row[1]!="undefined"){return row[0]+" ("+row[1]+")"}else{return row[0]}}}};jQuery("input.ville").autocomplete("./gen_include/commune.php",paramsVille).result(function(event,data,formatted){if(data){if(data[0].indexOf("---")==-1){var oInput=jQuery(this).parents("fieldset").find("input.lieu");oInput.siblings(".ac_location").val("");jQuery(this).parents("fieldset").find(".ac_flag").val("yes");if(jQuery("#ac_location_"+this.id).length==0){jQuery('<input type="hidden" id="ac_location_'+this.id+'" name="ac_location_'+jQuery(this).attr("name")+'" class="ac_location" />').val(data[2]).appendTo(jQuery(this).parent())}else{jQuery("#ac_location_"+this.id).val(data[2])}if(oInput.parents("fieldset").eq(0).prev().find("input:checked").length!=0){oInput.data("transports",oInput.parents("fieldset").eq(0).prev().find("input:checked").val())}if(oInput.attr("value")!=oInput.prev().text()){oInput.attr("value",oInput.prev().text());oInput.inputdynvalue({htext:"value"})}paramsLieu=jQuery.extend({},paramsLieu,{extraParams:{lang:moviLib.getLanguageFromUrl(),chp2:function(){return oInput.parents("fieldset").find("input.ville").val()},transports:function(){return oInput.data("transports")||""},mode:function(){return oInput.attr("id")}}});oInput.autocomplete("./gen_include/lieu.php",paramsLieu).result(function(event,data,formatted){if(data){if(data[0].indexOf("---")==-1){jQuery(this).parents("fieldset").find("input.ac_location").val("");if(jQuery("#ac_location_"+this.id).length==0){jQuery('<input type="hidden" id="ac_location_'+this.id+'" name="ac_location_'+jQuery(this).attr("name")+'" class="ac_location" />').val(data[2]).appendTo(jQuery(this).parent())}else{jQuery("#ac_location_"+this.id).val(data[2])}jQuery(this).parents("fieldset").find(".ac_flag").val("yes")}}})}}});jQuery("input.lieu").each(function(){var inputville=jQuery(this).parents("fieldset").find("input.ville");if(inputville.attr("value")!==""&&inputville.attr("value")!=inputville.prev().text()){var oInput=jQuery(this);if(oInput.parents("fieldset").eq(0).prev().find("input:checked").length!=0){oInput.data("transports",oInput.parents("fieldset").eq(0).prev().find("input:checked").val())}paramsLieu=jQuery.extend({},paramsLieu,{extraParams:{lang:moviLib.getLanguageFromUrl(),chp2:function(){return oInput.parents("fieldset").find("input.ville").val()},transports:function(){return oInput.data("transports")||""},mode:function(){return oInput.attr("id")}}});oInput.autocomplete("./gen_include/lieu.php",paramsLieu).result(function(event,data,formatted){if(data){if(data[0].indexOf("---")==-1){jQuery(this).parents("fieldset").find("input.ac_location").val("");if(jQuery("#ac_location_"+this.id).length==0){jQuery('<input type="hidden" id="ac_location_'+this.id+'" name="ac_location_'+jQuery(this).attr("name")+'" class="ac_location" />').val(data[2]).appendTo(jQuery(this).parent())}else{jQuery("#ac_location_"+this.id).val(data[2])}jQuery(this).parents("fieldset").find(".ac_flag").val("yes")}}})}});jQuery(".favoris select").bind("change",function(){var selected=jQuery("option:selected",this);var oInputVille=jQuery(this).closest("fieldset").find("input.ville");var oInputLieu=jQuery(this).closest("fieldset").find("input.lieu");if(selected.val()!="novalue"){var value=eval("("+selected.val()+")");oInputVille.val(value.ville);if(value.lieu!=""){oInputLieu.val(value.lieu)}else{oInputLieu.attr("value",oInputLieu.prev().text())}}else{oInputVille.attr("value",oInputVille.prev().text());oInputLieu.attr("value",oInputLieu.prev().text())}oInputVille.trigger("focusout");oInputLieu.trigger("focusout")});jQuery(".results ul").live("click",function(event){if(((!jQuery.browser.msie||(jQuery.browser.msie&&parseInt(jQuery.browser.version,10)>=8))&&event.button==0)||(jQuery.browser.msie&&event.button==1)){var element=jQuery(event.target).closest("a");if(element.parent().not(".selected")){element.parents(".results").find("li.selected").removeClass("selected");element.parents().addClass("selected")}}});jQuery("#itiRetour .collapsible").live("click",function(event){event.preventDefault();jQuery(this).next().slideToggle()})}}jQuery(function(){onLoadFunctions()});
