//==== Michelin Recrute ====//
//A-134 : Les javascripts specifiques du projet dans le fichier recrute.js au lieu de la page head.jsp

function change_display(id){
	var element_style=null
	if (document.getElementById) {
	     element_style=document.getElementById(id).style;
	}else if (document.all) {
	     element_style=document.all[id];
	}else if (document.layers) {
	     element_style=document.layers[id].style;
	}
	if(element_style){
		element_style.display="block";
	}
}

function showButton(obj, RE_2URL) {
	if (URL_showButton != '') {
		if(RE_2URL != '' && RE_2URL != ' '){
			document.getElementById(obj).innerHTML = document.getElementById(obj).innerHTML + '<div class=\"lien_bouton\"><a target=\"Rflex\" name=\"Rflex\" href=\"'+ URL_showButton + '&' + RE_2URL +'\" onclick=\"openRflexURL(this.href)\" ><img src=\"images/offres.gif\" border=\"0\" alt=\"Voir les offres\" title=\"Voir les offres\"/></a></div>';
		}else{
			document.getElementById(obj).innerHTML = document.getElementById(obj).innerHTML + '<div class=\"lien_bouton\"><a target=\"Rflex\" name=\"Rflex\" href=\"'+ URL_showButton +'\" onclick=\"openRflexURL(this.href)\" ><img src=\"images/offres.gif\" border=\"0\" alt=\"Voir les offres\" title=\"Voir les offres\"/></a></div>';
		}
	}
}

// Script pour crée un link vers le blog 

function openBlog(URL, width, height, param){
	if (arguments.length == 1 ) {
		openBlog_1(URL);
	}else if (arguments.length == 2 ) {
		openBlog_2(URL, width);
	}else if (arguments.length == 3 ) {
		openBlog_3(URL, width, height);
	}else if (arguments.length == 4 ) {
		openBlog_4(URL, width, height,param);
	}
}

function openBlog_4(URL, width, height, param) {
	//alert(URL);
	if (URLblog != '') {
		URLblog2 = URLblog + URL;

		newWindowBlog = window.open(URLblog2, "blog", "width=" + width + ", height=" + height +", " + param);
		if (window.focus) {newWindowBlog.focus()}
		return false;
	} else {
		alert('Erreur : impossible d’accéder à votre requête.\nVeuillez la renouveler ultérieurement.');
	}
}

function openBlog_3(URL, width, height) {
	//alert(URL);
	if (URLblog != '') {
		URLblog2 = URLblog + URL;

		newWindowBlog = window.open(URLblog2, "blog", "width=" + width + ", height=" + height + ", toolbar=1, location=1, directories=1, status=1, menubar=1, scrollbars=1, resizable=1");
		if (window.focus) {newWindowBlog.focus()}
		return false;
	} else {
		alert('Erreur : impossible d’accéder à votre requête.\nVeuillez la renouveler ultérieurement.');
	}
}

function openBlog_2(URL, param) {
	//alert(URL);
	if (URLblog != '') {
		URLblog2 = URLblog + URL;
		//alert(param);
		newWindowBlog = window.open(URLblog2, "blog", param);
		if (window.focus) {newWindowBlog.focus()}
		return false;
	} else {
		alert('Erreur : impossible d’accéder à votre requête.\nVeuillez la renouveler ultérieurement.');
	}
}

function openBlog_1(URL) {
	//alert(URL);
	if (URLblog != '') {
		URLblog2 = URLblog + URL;
		newWindowBlog = window.open(URLblog2, "blog", "width=850, height=600, toolbar=1, location=1, directories=1, status=1, menubar=1, scrollbars=1, resizable=1");
		if (window.focus) {newWindowBlog.focus()}
		return false;
	} else {
		alert('Erreur : impossible d’accéder à votre requête.\nVeuillez la renouveler ultérieurement.');
	}
}

// Script pour crée un link vers Rflex

function openRflex(URL, width, height, param){
	if (arguments.length == 1 ) {
		openRflex_1(URL);
	}else if (arguments.length == 2 ) {
		openRflex_2(URL, width);
	}else if (arguments.length == 3 ) {
		openRflex_3(URL, width, height);
	}else if (arguments.length == 4 ) {
		openRflex_4(URL, width, height,param);
	}
}

function openRflex_4(URL, width, height, param) {
	//alert(URL);
	if (URLRflex != '') {
		URLRflex2 = URLRflex + URL;

		newWindowRflex = window.open(URLRflex2, "Rflex", "width=" + width + ", height=" + height +", " + param);
		if (window.focus) {newWindowRflex.focus()}
		return false;
	} else {
		alert('Erreur : impossible d’accéder à votre requête.\nVeuillez la renouveler ultérieurement.');
	}
}
function openRflex_3(URL, width, height) {
	//alert(URL);
	if (URLRflex != '') {
		URLRflex2 = URLRflex + URL;

		newWindowRflex = window.open(URLRflex2, "Rflex", "width=" + width + ", height=" + height +", toolbar=1, location=1, directories=1, status=1, menubar=1, scrollbars=1, resizable=1");
		if (window.focus) {newWindowRflex.focus()}
		return false;
	} else {
		alert('Erreur : impossible d’accéder à votre requête.\nVeuillez la renouveler ultérieurement.');
	}
}

function openRflex_2(URL, param) {
	//alert(URL);
	if (URLRflex != '') {
		URLRflex2 = URLRflex + URL;
		//alert(param);
		newWindowRflex = window.open(URLRflex2, "Rflex", param);
		if (window.focus) {newWindowRflex.focus()}
		return false;
	} else {
		alert('Erreur : impossible d’accéder à votre requête.\nVeuillez la renouveler ultérieurement.');
	}
}

function openRflex_1(URL) {
	//alert(URL);
	if (URLRflex != '') {
		URLRflex2 = URLRflex + URL;

		newWindowRflex = window.open(URLRflex2, "Rflex", "width=900, height=600, toolbar=1, location=1, directories=1, status=1, menubar=1, scrollbars=1, resizable=1");
		if (window.focus) {newWindowRflex.focus()}
		return false;
	} else {
		alert('Erreur : impossible d’accéder à votre requête.\nVeuillez la renouveler ultérieurement.');
	}
}

function openRflexURL(URL) {
	URLRflex2 = URLRflex + URL;

	newWindowRflex = window.open(URLRFlex2, "Rflex", "width=900, height=600, toolbar=1, location=1, directories=1, status=1, menubar=1, scrollbars=1, resizable=1");
	if (window.focus) {newWindowRflex.focus()}
	return false;
}