if(typeof(REAL_HTTP)=="undefined"||REAL_HTTP==null||REAL_HTTP==undefined){var dir_http="http://www.bureauxlocaux.com/"}else{var dir_http=REAL_HTTP}var DIR_HTTP_SCRIPTS=dir_http+"cap_buroloco/scripts/";UTF8={encode:function(d){for(var f,b=-1,a=(d=d.split("")).length,e=String.fromCharCode;++b<a;d[b]=(f=d[b].charCodeAt(0))>=127?e(192|(f>>>6))+e(128|(f&63)):d[b]){}return d.join("")},decode:function(h){for(var f,d,g=-1,e=(h=h.split("")).length,m=String.fromCharCode,n="charCodeAt";++g<e;((f=h[g][n](0))&128)&&(h[g]=(f&252)==192&&((d=h[g+1][n](0))&192)==128?m(((f&3)<<6)+(d&63)):m(128),h[++g]="")){}return h.join("")}};function write_div(a,b){document.getElementById(b).innerHTML=a}function openpopup(d,e,b,a,g,f){var c=window.open(d,e,"height="+a+",width="+b+",resizable="+g+",scrollbars="+f+",menubar=no");c.focus()}function imprime_article(a){openpopup(dir_http+"imprimer.php?url="+a,"imprime",800,600,"yes","yes")}function transmet_article(b,a){openpopup(dir_http+"transmettre.php?e="+b+"&url="+a,"imprime",800,600,"yes","yes")}function transmet_annonce(a){openpopup(dir_http+"transmettre_annonce.php?IDS="+a,"Message2","config=' ,height=550px,width=700px, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no'")}function show_zoom(b,c,a){url_zoom=dir_http+"zoom.php?photo="+b;if(c!=null){url_zoom+="&id_photo="+c+"&id_edito="+a}openpopup(url_zoom,"zoom_photo",800,600,"yes","yes")}function getYScroll(){y=0;if(document.body){y=document.body.scrollTop}return y}function page_scroll_by(a){self.scrollBy(0,a)}function refresh_template(a,b){refresh_article(a,b);refresh_preview(a,b)}function refresh_preview(a,b){gab=document.getElementById("select_gabari_"+a).value;zone=document.getElementById("select_zone_"+a).value;cat=document.getElementById("select_categorie_"+a).value;if(b==-1){b=document.getElementById("select_edito_"+a).value}document.getElementById("hidden_frame").contentWindow.location.href="../scripts/get_preview_tag.php?tag="+a+"&gabarit="+gab+"&id_edito="+b+"&zone="+zone+"&cat="+cat+"&force_retaille=1"}function refresh_article_news(a,c){cat=document.getElementById("select_categorie_"+a).value;zone=document.getElementById("select_zone_"+a).value;var b=new XHRConnection();b.setRefreshArea("div_select_edito_"+a);url="../scripts/get_liste_article.php?name="+a+"&categorie="+cat+"&selected="+c+"&zone="+zone;b.sendAndLoad(url,"GET")}function refresh_article(a,c){cat=document.getElementById("select_categorie_"+a).value;zone=document.getElementById("select_zone_"+a).value;var b=new XHRConnection();b.setRefreshArea("div_select_edito_"+a);url="../scripts/get_liste_article.php?tag="+a+"&categorie="+cat+"&selected="+c+"&zone="+zone;b.sendAndLoad(url,"GET")}function set_view(c,b,a){if(a==1){if(document.getElementById(c).style.visibility=="hidden"){document.getElementById(c).style.visibility="visible"}}else{if(document.getElementById(c).style.visibility=="visible"){document.getElementById(c).style.visibility="hidden"}}}function popup_color_picker(d,b){var c=400;var a=300;window.open("../scripts/color_choice.php?FORM="+d+"&tag="+b,"cp","resizable=no, location=no, width="+c+", height="+a+", menubar=no, status=yes, scrollbars=no, menubar=no")}function writeZone(b,a){text_src=document.getElementById(b).value;text_src=parseStr(text_src);document.getElementById(a).innerHTML=text_src;document.getElementById(a).className=""}function add_cadre(f,c,a,e){deb=0;fin=0;color1=document.getElementById(a).value;color2=document.getElementById(e).value;giveSelect(f);text_src=document.getElementById(f).value;var b=text_src.length;var d=new String;d=text_src.substring(0,deb);d=d+'<div style="border:1px solid '+color1+";background-color:"+color2+';padding:5px;">'+text_src.substring(deb,fin)+"</div>";d=d+text_src.substring(fin,b);document.getElementById(f).value=d}function add_color(e,c,a){deb=0;fin=0;color1=document.getElementById(a).value;giveSelect(e);text_src=document.getElementById(e).value;var b=text_src.length;var d=new String;d=text_src.substring(0,deb);d=d+'<span style="color:'+color1+';">'+text_src.substring(deb,fin)+"</span>";d=d+text_src.substring(fin,b);document.getElementById(e).value=d}function addBalise(e,c,b){deb=0;fin=0;giveSelect(e);text_src=document.getElementById(e).value;var a=text_src.length;var d=new String;d=text_src.substring(0,deb);if(b=="a"){lien=window.prompt("Lien ?","http://");if(lien!=null){d=d+'<a href="'+lien+'" target="_blank">'+text_src.substring(deb,fin)+"</a>"}else{d=d+text_src.substring(deb,fin)}}else{if(b=="divc"){d=d+"<div align=center>"+text_src.substring(deb,fin)+"</div>"}else{if(b=="divl"){d=d+"<div align=left>"+text_src.substring(deb,fin)+"</div>"}else{if(b=="divr"){d=d+"<div align=right>"+text_src.substring(deb,fin)+"</div>"}else{if(b=="divj"){d=d+"<div align=justify>"+text_src.substring(deb,fin)+"</div>"}else{if(b=="Quot"){d=d+"&quot;"+text_src.substring(deb,fin)+"&quot;"}else{if(b=="br"){d=d+text_src.substring(deb,fin)+"<br>"}else{d=d+"<"+b+">"+text_src.substring(deb,fin)+"</"+b+">"}}}}}}}d=d+text_src.substring(fin,a);document.getElementById(e).value=d}function giveSelect(a){if(document.selection){getPosCurseur(document.getElementById(a))}else{deb=document.getElementById(a).selectionStart;fin=document.getElementById(a).selectionEnd}}function getPosCurseur(b){var d=b.value;var f=document.selection.createRange();var a=f.text;var g="{.*";f.text=g+a+g;f.moveStart("character",(0-a.length-(g.length*2)));var e=b.value;f.text=a;fl_first_curseur=1;for(i=0;i<=e.length;i++){var c=e.substring(i,i+g.length);if(c==g){if(fl_first_curseur==1){deb=i;fl_first_curseur=0}else{fin=i-3}}}}function copy_chp_to(b,a,c){document.forms[b].elements[c].value=document.forms[b].elements[a].value}function OpenForm(a){window.document.location.href=a}function TListview_OrderBy(c,a,b,d){var e="A";if(a>""&&d>""&&a==d&&b=="A"){e="D"}document.location.href=modifyUrl(modifyUrl(modifyUrl(document.location.href,"orderColumn",d),"orderTyp",e),"tblname",c)}function TListviewUrl_OrderBy(d,c,a,b,e){var f="A";if(a>""&&e>""&&a==e&&b=="A"){f="D"}document.location.href=modifyUrl(modifyUrl(modifyUrl(d,"orderColumn",e),"orderTyp",f),"tblname",c)}function modifyUrl(e,d,c){if(e.search(d+"=")!=-1){var a=e.substring(0,e.indexOf(d+"=",0))+d+"=";var b="";if(e.indexOf("&",a.length-1)>0){b=e.substring(e.indexOf("&",a.length-1),e.length)}e=a+c+b}else{if(e.search("=")!=-1){e+="&"+d+"="+c}else{e+="?"+d+"="+c}}return e}function showPopup(f,e,b,a,c){var d="";d+=f;if((e!="")||(b!="")){d+="?"}if(e!=""){d+="FORM="+e}l=b.length;if(b!=""&&l>0){param="";j=0;k=0;while(j<l){i=b.indexOf(";",j);if(i==-1){i=l}if((param!="")||(e!="")){param+="&"}param+="p"+k+"="+b.substring(j,i);j=i+1;k++}d+=param}if(!a){a=400}if(!c){c=700}window.open(d,e,"left=10, top=10, width="+a+", height="+c+", resizable=yes,dependent=yes,scrollbars=yes")}function LinkForm(strNomForm,strFormData){with(window.opener.document){for(var i=0;i<forms.length;i++){if(forms[i].name==strNomForm){for(var j=0;j<forms[i].elements.length;j++){iIndex=strFormData.indexOf(forms[i].elements[j].name+"=",0);if((iIndex)>-1){iIndex+=(forms[i].elements[j].name).length+1;if(strFormData.indexOf(";",iIndex)>-1){strValue=strFormData.substring(iIndex,strFormData.indexOf(";",iIndex));forms[i].elements[j].value=strValue}}}}}}window.opener=null;self.close()}function addFam(a){lib=window.prompt("Libellé : ","Nouvelle famille");if(lib!=null){document.location.href="admin_fam.php?action=ADD&id="+a+"&lib="+lib}}function supprFam(a){if(window.confirm("C'est sur ?")){document.location.href="admin_fam.php?action=DEL&id="+a}}function renFam(b,a){a=window.prompt("Libellé : ",a);if(a!=null){document.location.href="admin_fam.php?action=REN&id="+b+"&lib="+a}}function go(a){document.location.href="http://dev.batiactu.com/cap_indus/OperatingSystem/frame.php?page=prod&parent_fam="+document.forms.formprod.elements.produit.options[document.forms.formprod.elements.produit.selectedIndex].value+"&"+a}function TDBListview_PreviousPage(a,b){if(b==null){b="."}if(a>0){a--;document.location.href=modifyUrl(modifyUrl(document.location.href,"pageNumber",a),"tblname",b)}}function TDBListview_NextPage(b,a,c){if(c==null){c="."}if(b<a){b++;document.location.href=modifyUrl(modifyUrl(document.location.href,"pageNumber",b),"tblname",c)}}function TDBListview_GoToPage(b,a,c){if(c==null){c="."}if(b<=a&&b>=0){document.location.href=modifyUrl(modifyUrl(document.location.href,"pageNumber",b),"tblname",c)}}function TDBListviewUrl_PreviousPage(c,a,b){if(b==null){b="."}if(a>0){a--;document.location.href=modifyUrl(modifyUrl(c,"pageNumber",a),"tblname",b)}}function TDBListviewUrl_NextPage(d,b,a,c){if(c==null){c="."}if(b<a){b++;document.location.href=modifyUrl(modifyUrl(d,"pageNumber",b),"tblname",c)}}function TDBListviewUrl_GoToPage(d,b,a,c){if(c==null){c="."}if(b<=a&&b>=0){document.location.href=modifyUrl(modifyUrl(d,"pageNumber",b),"tblname",c)}}function write_preview(){document.getElementById("preview").innerHTML=getHTML()}function openHelp(a){showPopup("../dlg/help_for.php?h="+a,"","",400,400)}function write_nbcarrest(c,a,b,d){nb_actu=c.value.length;nb_rest=b-nb_actu;if((nb_rest<0)&&(d==true)){document.getElementById(a).innerHTML="<b>Texte plein</b>";c.value=c.value.substr(0,b)}else{if(nb_rest<0){document.getElementById(a).innerHTML="<b>"+nb_rest+" caractères restants - trop de caractères</b>"}else{document.getElementById(a).innerHTML=nb_rest+" caractères restants"}}}function LinkForm2(strNomForm,strFormData){with(window.opener.document){for(var i=0;i<forms.length;i++){if(forms[i].name==strNomForm){for(var j=0;j<forms[i].elements.length;j++){iIndex=strFormData.indexOf(forms[i].elements[j].name+"=",0);if((iIndex)>-1){iIndex+=(forms[i].elements[j].name).length+1;if(strFormData.indexOf(";",iIndex)>-1){strValue=strFormData.substring(iIndex,strFormData.indexOf(";",iIndex));forms[i].elements[j].value=strValue}}}forms[i].submit()}}}window.opener=null;self.close()}function go_prixmarche(){var a=document.forms.littleprixmarche.elements.GO_PXMARCHE.value;window.location.href=a}function submit_form(){document.forms.littlenews1.submit()}function submit_form2(){document.forms.littlenews2.submit()}function countvisu(a){var b=new XHRConnection();b.sendAndLoad(a,"GET")}function see_and_play(){if(navigator.appName=="Microsoft Internet Explorer"){document.all.ID_MENU1.style.visibility="visible"}else{document.getElementById("ID_MENU1").style.visibility="visible"}PlayFlashMovie()}function hide_and_stop(){if(navigator.appName=="Microsoft Internet Explorer"){document.all.ID_MENU1.style.visibility="hidden"}else{document.getElementById("ID_MENU1").style.visibility="hidden"}StopFlashMovie()}function getFlashMovieObject(a){if(window.document[a]){return window.document[a]}if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds&&document.embeds[a]){return document.embeds[a]}}else{return document.getElementById(a)}}function StopFlashMovie(){var a=getFlashMovieObject("index2");a.StopPlay()}function PlayFlashMovie(){var a=getFlashMovieObject("index2");a.Play()};
