function HideBox(divId){document.getElementById(divId).style.display='none';}
function ShowBox(divId){document.getElementById(divId).style.display='block';}
function toggleBox(divId){var box=document.getElementById(divId);if(box.style.display=='block'){box.style.display='none';}
else{box.style.display='block';}
return false;}
function HideAndShow(divId1,divId2){document.getElementById(divId1).style.display='none';document.getElementById(divId2).style.display='block';}
function getUrlRubrique(url){var rubrique=url.substring(url.lastIndexOf("#"));rubrique=rubrique.replace("#","");return rubrique;}
function checkAndDisplay(rubriqueId,rubriqueIndex){var localDoc=document;if(rubriqueIndex==null){var url=localDoc.location.toString();var chapter=url.substring(url.indexOf('#')+1);switch(chapter){case'actualites':rubriqueIndex=1;break;case'perspectives':rubriqueIndex=2;break;case'entreprises':rubriqueIndex=3;break;case'experiences':rubriqueIndex=1;break;case'secteur':rubriqueIndex=2;break;case'temoignages':rubriqueIndex=3;break;case'conseils':rubriqueIndex=1;break;case'metiers':rubriqueIndex=2;break;case'informations':rubriqueIndex=3;break;default:rubriqueIndex=1;break;}}
for(var i=1;i<=3;i++){if(i!=rubriqueIndex){localDoc.getElementById('rubrique_'+i).style.display='none';localDoc.getElementById('rubriqueLink_'+i).style.display='block';localDoc.getElementById(rubriqueId+i).className='';}else{localDoc.getElementById('rubrique_'+i).style.display='block';localDoc.getElementById('rubriqueLink_'+i).style.display='none';localDoc.getElementById(rubriqueId+i).className='selectedLink';}}}
function redirectURL(optionList){var url=optionList.options[optionList.selectedIndex].value;if(url!=""){location.href=url;}}
function toggleMenuMultiple(rubrique,initial,pageRubriqueIndex){var arrow=document.getElementById(rubrique+'Title');var menu=document.getElementById(rubrique+'Menu');var sousMenu=document.getElementById(rubrique+'Menu1');var linksInMenu=menu.getElementsByTagName('A');if(sousMenu!=null){for(var i=1;i<=5;i++){sousMenu=document.getElementById(rubrique+'Menu'+i);if(sousMenu!=null){if(sousMenu.style.display=='none'){sousMenu.style.display='block';arrow.className='arrow_ON';}
else if(initial!=true){sousMenu.style.display='none';arrow.className='arrow_OFF';}}}}
else if(menu!=null){if(menu.style.display=='none'){menu.style.display='block';arrow.className='arrow_ON';}
else if(initial!=true){menu.style.display='none';arrow.className='arrow_OFF';}}
var arrayLength=linksInMenu.length;for(i=0;i<arrayLength;i++){if(linksInMenu[i].href==document.location.href||(pageRubriqueIndex!=''&&pageRubriqueIndex==linksInMenu[i].id)){linksInMenu[i].className="selectedLink";}}}
function prepMenus(rubrique,isSelected,indexPage){if(!isSelected){var menu=document.getElementById(rubrique+'Menu');var arrow=document.getElementById(rubrique+'Title');if(!indexPage){menu.style.display='none';arrow.className='arrow_OFF';}
for(var i=1;i<=10;i++){sousMenu=document.getElementById(rubrique+'Menu'+i);if(sousMenu!=null){sousMenu.style.display='none';}}}
else{var menu=document.getElementById(rubrique+'Menu');var arrow=document.getElementById(rubrique+'Title');menu.style.display='block';arrow.className='arrow_ON';var hasSelectedSousMenu=false;for(var i=1;i<=10;i++){sousMenu=document.getElementById(rubrique+'Menu'+i);if(sousMenu!=null){openSousMenu=boldSelectedLink(sousMenu);if(openSousMenu){sousMenu.style.display='block';hasSelectedSousMenu=true;}else{sousMenu.style.display='none';}}}
if(!hasSelectedSousMenu){boldSelectedLink(menu);}}}
function toggleMenu(rubrique){var arrow=document.getElementById(rubrique+'Title');var menu=document.getElementById(rubrique+'Menu');if(menu.style.display=="none"){menu.style.display='block';arrow.className='arrow_ON';}else{menu.style.display='none';arrow.className='arrow_OFF';}}
function boldSelectedLink(menu){var linksInMenu=menu.getElementsByTagName('A');var arrayLength=linksInMenu.length;for(i=0;i<arrayLength;i++){if(linksInMenu[i].href==document.location.href){linksInMenu[i].className="selectedLink";return true;}}
return false;}
document.getElementsByClassName=function(clsName){var retVal=new Array();var elements=document.getElementsByTagName("*");var arrayLength=elements.length;for(var i=0;i<arrayLength;i++){if(elements[i].className.indexOf(" ")>=0){var classes=elements[i].className.split(" ");for(var j=0;j<classes.length;j++){if(classes[j]==clsName)
retVal.push(elements[i]);}}
else if(elements[i].className==clsName)
retVal.push(elements[i]);}
return retVal;}
Array.prototype.in_array=function(p_val){var arrayLength=this.length;for(var i=0,l=arrayLength;i<l;i++){if(this[i]==p_val){return true;}}
return false;}
function mailMe(email){var mailContact="contact@meteojob.com";chaine_mail="mailto:"+mailContact;chaine_mail+="?subject= Recevoir la newsletter de Meteojob";chaine_mail+="&body= Votre adresse mail : "+email;location.href=chaine_mail;}
function randomNberMinMax(min,max){var randNber=min+Math.floor((max-min+1)*Math.random());return randNber;}
function isInProdEnv(){return window.location.href.indexOf("www.meteojob.com")<10;}
function switchContent(selectedId){var item=document.getElementById("ongletTitle_"+selectedId);for(i=1;i<=3;i++){document.getElementById("box_"+i).style.display="none";document.getElementById("ongletTitle_"+i).className="btnOff";}
if(item.className=="btnOn"){item.className="btnOff";}
else{item.className="btnOn";}
document.getElementById("box_"+selectedId).style.display="block";}
function printItem(titre,contenu)
{var zoneId=document.getElementById(contenu).innerHTML;var Headers='';var Footers='';Headers+='<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\" >\n';Headers+='<html xmlns=\"http://www.w3.org/1999/xhtml\">\n';Headers+='<head>\n';Headers+='<title>'+titre+'</title>\n';Headers+='<link rel=\"stylesheet\" href=\"../CS/css/meteojobEditorial_styles_print.css\" type=\"text/css\" media=\"screen,print\" />\n';Headers+='<body onload="window.print(); window.close()">\n';Headers+='<body>\n';Headers+='<div id="'+contenu+'">\n';Footers+='</div>\n';Footers+='<script type=\"text/javascript\">\n';Footers+='document.getElementById("box_1").style.display = "block"\n';Footers+='document.getElementById("box_2").style.display = "block"\n';Footers+='document.getElementById("box_3").style.display = "block"\n';Footers+='document.getElementById("readMoreBox").style.display = "block"\n';Footers+='document.getElementById("readMore").style.display = "none"\n';Footers+='</script>\n';Footers+='</body></html>\n';var f=window.open("","ZoneImpr","height=600, width=600, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, status=no, location=no, left=10, top=10");f.document.body.style.color='#000000';f.document.body.style.backgroundColor='#FFFFFF';f.document.body.style.padding="5px";f.document.title=titre;f.document.write(""+Headers+zoneId+Footers);f.document.close();return;}
function displayMetiersList(selectedItem,linkSelected){for(var i=0;i<=24;i++){if(document.getElementById('list_'+i)){document.getElementById('list_'+i).style.display='none';document.getElementById('link_'+i).className='OFF';}}
document.getElementById(selectedItem).style.display='block';linkSelected.className='selectedLetter';}
function displayMetiersSecteur(optionList){var secteurNber=optionList.options[optionList.selectedIndex].value;var optionsListNber=document.getElementById('secteursSelectList').options.length;if(secteurNber!=""){for(var i=1;i<=16;i++){if(document.getElementById('list_secteur_'+i)){document.getElementById('list_secteur_'+i).style.display='none';}}
for(var j=1;j<optionsListNber;j++){document.getElementById('secteursSelectList').options[j].className='noselected'}
document.getElementById('list_secteur_'+secteurNber).style.display='block';optionList.options[optionList.selectedIndex].className='selected';}}
function getXMLHttp(){var XMLHttp=null;if(window.XMLHttpRequest){try{XMLHttp=new XMLHttpRequest();}catch(e){}}
else if(window.ActiveXObject){try{XMLHttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{XMLHttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
return XMLHttp;}
function loadXMLFile(){XMLHttp.open("GET","jobList.xml");}
function toggleBoxModifyLink(boxId,linkId){var box=document.getElementById(boxId);var link=document.getElementById(linkId);var linkValue=link.childNodes[0].nodeValue;if(box){if(box.style.display=='block'){box.style.display='none';link.innerHTML='Lire la suite ...';}
else{box.style.display='block';link.innerHTML='<span style=\"font-style:normal;\">Fermer</span>';}
return false;}}
function addFunctionByClass(selectedCssClass){var links=document.getElementsByClassName(selectedCssClass);var linksTotal=links.length;for(var i=0;i<linksTotal;i++){links[i].onclick=function(){return toggleBoxModifyLink('readMoreBox','readMore');}}}
function addFunctionByClassGeneric(selectedCssClass){var links=document.getElementsByClassName(selectedCssClass);var linksTotal=links.length;for(var i=0;i<linksTotal;i++){links[i].onclick=function(){return toggleBox('archivesBox');}}}
var newWin=null;function closeWin(){if(newWin!=null){if(!newWin.closed)
newWin.close();}}
function isIE6(){var IE6=false
var strChUserAgent=navigator.userAgent;var intSplitStart=strChUserAgent.indexOf("(",0);var intSplitEnd=strChUserAgent.indexOf(")",0);var strChMid=strChUserAgent.substring(intSplitStart,intSplitEnd);if(strChMid.indexOf("MSIE 6")!=-1)IE6=true;return IE6;}
var xitiParam="http://logc35";if(!Array.indexOf){Array.prototype.indexOf=function(obj){arrayLength=this.length;for(var i=0;i<arrayLength;i++){if(this[i]==obj){return i;}}
return-1;}}
function displayRandomMenu(eltId,min,max,nbrToDisplay){for(var i=min;i<=max;i++){var elt=document.getElementById(eltId+i);if(elt!=null){elt.style.display='none';}}
var counter=0;var counter2=0;var alreadyDisplayed=Array();while(true){var randomNbr=randomNberMinMax(1,15);if(alreadyDisplayed.indexOf(randomNbr)==-1){var elt=document.getElementById(eltId+randomNbr);if(elt!=null){elt.style.display='block';alreadyDisplayed.push(randomNbr);counter++;}}
counter2++;if((counter>=nbrToDisplay)||(counter2>10000)){break;}}}
function submitFormMetier(regionId){document.getElementById("formError").innerHTML="";var targetURL="http://www.meteojob.com/candidate/offers/candidateOffersSearchResults.mj?q=";var formElements=document.forms['formMetier'].elements;var count=0;for(var i=0;i<formElements.length;i++){if(formElements[i].checked){var jobId=formElements[i].id.substring(4,formElements[i].id.length);targetURL+="job-type:"+jobId+"+";count++;}}
if(regionId!=''){targetURL+="region%3A"+regionId;}
if(count>3){document.getElementById("formError").innerHTML="Vous ne pouvez pas choisir plus de 3 métiers.";}else if(count>0||regionId!=''){window.location=targetURL;}else{window.location="http://www.meteojob.com/offres-emploi";}}
function submitFormVille(){document.getElementById("formError").innerHTML="";var targetURL="http://www.meteojob.com/candidate/offers/candidateOffersSearchResults.mj?q=";var formElements=document.forms['formVille'].elements;var count=0;for(var i=0;i<formElements.length;i++){if(formElements[i].checked){targetURL+=""+formElements[i].id+",";count++;}}
if(count>0){targetURL=targetURL.substring(0,targetURL.length-1)+"";}
var macroJob=document.forms['formVille'].elements['macroJob'].value;if(macroJob!=""){if(count>0){targetURL+=" ";}
targetURL+="macro-job%3A"+macroJob;}
if(count>3){document.getElementById("formError").innerHTML="Vous ne pouvez pas choisir plus de 3 villes.";}else if(count>0||macroJob!=""){window.location=targetURL;}else{window.location="http://www.meteojob.com/offres-emploi";}}
function randomNberGeneric(min,max){var randNber=min+Math.floor((max-min+1)*Math.random());return randNber;}
function swapImage(mapEltId,regionId){var mainPictureId=document.getElementById(mapEltId);switch(regionId){case(""):pictName="France";break;case("42"):pictName="Alsace";break;case("72"):pictName="Aquitaine";break;case("83"):pictName="Auvergne";break;case("25"):pictName="Basse-Normandie";break;case("26"):pictName="Bourgogne";break;case("53"):pictName="Bretagne";break;case("24"):pictName="Centre";break;case("21"):pictName="Champagne-Ardenne";break;case("94"):pictName="Corse";break;case("43"):pictName="Franche-Comte";break;case("23"):pictName="Haute-Normandie";break;case("11"):pictName="Ile-de-France";break;case("91"):pictName="Languedoc-Roussillon";break;case("74"):pictName="Limousin";break;case("41"):pictName="Lorraine";break;case("73"):pictName="Midi-Pyrenees";break;case("31"):pictName="Nord-Pas-de-Calais";break;case("52"):pictName="Pays-de-la-Loire";break;case("22"):pictName="Picardie";break;case("54"):pictName="Poitou-Charentes";break;case("93"):pictName="Provence-Alpes-Cote-Azur";break;case("82"):pictName="Rhone-Alpes";break;}
mainPictureId.src="/images/home/cartesFrance/"+pictName+".gif";}
function StringBuffer(){this.buffer=[];}
function StringBuffer(string){this.buffer=[];this.buffer.push(string);}
StringBuffer.prototype.append=function append(string){this.buffer.push(string);return this;};StringBuffer.prototype.toString=function toString(){return this.buffer.join("");};activateMenu=function(nav){if(document.all&&document.getElementById(nav).currentStyle){var navroot=document.getElementById(nav);var lis=navroot.getElementsByTagName("LI");for(i=0;i<lis.length;i++){if(lis[i].lastChild.tagName=="UL"){lis[i].onmouseover=function(){this.lastChild.style.display="block";}
lis[i].onmouseout=function(){this.lastChild.style.display="none";}}}}}
function addLoadListener(func){if(window.addEventListener){window.addEventListener("load",func,false);}else if(document.addEventListener){document.addEventListener("load",func,false);}else if(window.attachEvent){window.attachEvent("onload",func);}else if(typeof window.onload!="function"){window.onload=func;}else{var oldonload=window.onload;window.onload=function(){oldonload();func();};}}
function addScriptLoadListener(script,callback){script.onload=function(){callback();return;}
script.onreadystatechange=function(){if(script.readyState=='loaded'||script.readyState=='complete'){callback();}}
if(typeof(Prototype)!="undefined"){if((Prototype.Browser.WebKit&&!navigator.userAgent.match(/Version\/3/))||Prototype.Browser.Opera){LazyLoader.timer[url]=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(LazyLoader.timer[url]);callback();}},10);}}}
function loadHeader(){var xmlhttp=getXMLHttp();if(xmlhttp){xmlhttp.onreadystatechange=function(){if(xmlhttp.readyState==4){if(xmlhttp.status==200){var ajaxResponseString=xmlhttp.responseText;ajaxResponseString=ajaxResponseString.replace('<div id="navBar">','');ajaxResponseString=ajaxResponseString.replace("activateMenu('navBar');","");ajaxResponseString=ajaxResponseString.substr(0,(ajaxResponseString.length-6));if(document.getElementById('navBar')!=null){document.getElementById('navBar').innerHTML=ajaxResponseString;}}}}}
xmlhttp.open("GET","/header.mj",true);xmlhttp.send(null);if(isIE6()){setTimeout("activateMenu('navBar')",1000);activateMenu('navBar');}}
var bannerElementIds=new Array();var bannerTypes=new Array();function displayAd(elementId,type){bannerElementIds[bannerElementIds.length]=elementId;bannerTypes[bannerTypes.length]=type;}
function downloadCSJSAtOnload(){var localDoc=document;var element=localDoc.createElement("script");element.src="/seam/resource/remoting/resource/remote.js";element.charset="utf-8";addScriptLoadListener(element,downloadCSJSAtOnload2);localDoc.body.appendChild(element);}
function downloadCSJSAtOnload2(){var localDoc=document;var element=localDoc.createElement("script");element.src="/seam/resource/remoting/interface.js?statisticsRemoteDistributor";element.charset="utf-8";addScriptLoadListener(element,downloadCSJSAtOnload3);localDoc.body.appendChild(element);}
function downloadCSJSAtOnload3(){var localDoc=document;var element=localDoc.createElement("script");element.src="/CS/js/afterload.201003181600.js";element.charset="utf-8";localDoc.body.appendChild(element);var element=localDoc.createElement("script");element.src="/js/meteojobBanner_scripts.201003181600.js";localDoc.body.appendChild(element);}
addLoadListener(downloadCSJSAtOnload);function changePartnerLocation(form){fieldSelect=form.elements['fieldSelect'];if(fieldSelect.selectedIndex>0){window.location=fieldSelect.options[fieldSelect.selectedIndex].value;return true;}
themeSelect=form.elements['themeSelect'];if(themeSelect.selectedIndex>0){window.location=themeSelect.options[themeSelect.selectedIndex].value;}
return true;}
function switchTab(divId){var tabNber="2";var tabPrefix="tab_";var tab;for(var i=1;i<=tabNber;i++){tab=document.getElementById(tabPrefix+i);if(tab!=null){tab.className="tabActu_OFF";}}
document.getElementById(tabPrefix+divId).className="tabActu_ON";}
