var adrBase = "http://www.webcallstudio.fr/webcall/";
var curUrl = window.location.href;

var tabPrixAvec = new Array(0,112,96,80,72,63,54,42);
var tabPrixSans = new Array(0,82,70,58,56,46,42,32);
var tabPrix = new Array(tabPrixAvec,tabPrixSans);
var tabLangue = new Array(0,60,50,42,38,32,28,22);

function EcritNewsIdent(GEN_IDENTIFIER,GEN_NOMCLIENT,ID_PHRASE) {
	document.write("<div style=\"position: relative; left: -30px; top: 0px\">");
	//NEWSLETTER
	if (presence_Newsletter) {
		document.write("	<div onclick=\"NewsValide()\" style=\"cursor: pointer; font-family: Verdana; font-size: 8pt; background-color: #000000; color: #FFFFFF; position: absolute; top: 71px; left: 340px; width: 22px\">");
		document.write("		<div title=\"Validez votre inscription à notre newsletter\" style=\"padding: 2px\"><b>OK</b></div>");
		document.write("	</div>");
		document.write("	<div style=\"font-family: Verdana; font-size: 7pt; position: absolute; top: 60px; left: 125px; width: 210px\" align=\"right\">");
		document.write("		<form name=\"frmNews\" method=\"POST\" action=\"http://80.11.206.215/addmail.asp\" target=\"_blanck\">");
		document.write("		<b>S'INSCRIRE À LA NEWSLETTER</b><br>");
		document.write("		<input type=\"text\" id=\"txtAdr\" name=\"txtAdr\" style=\"width: 210px; border: 1px solid #C0C0C0; color: #000000; font-family: verdana; font-size: 7pt\">");
		document.write("		<input type=\"hidden\" name=\"numsite\" value=\"" + numSite + "\">");
		document.write("		</form>");
		document.write("	</div>");
	}
	//IDENTIFICATION
	if (presence_Acces_Compte) {
		if(GEN_IDENTIFIER=="non") {
			//on est pas identifier
			document.write("	<form name=\"frmProtect\" method=\"post\" action=\"" + adrBase + "secure.php\" target=\"_self\">");
			document.write("		<div onclick=\"Connecter()\" style=\"cursor: pointer; font-family: Verdana; font-size: 8pt; background-color: #000000; color: #FFFFFF; position: absolute; top: 31px; left: 340px; width: 22px\">");
			document.write("			<div style=\"position: absolute; left: -240px; top: -20px; height: 1px; width: 1px; overflow: hidden\"><br><input type=\"submit\" value=\"\"></div><div title=\"Validez votre demande de connection\" style=\"padding: 2px\"><b>OK</b></div>");
			document.write("		</div>");
			document.write("		<div class=\"texte\" style=\"font-family: Verdana; font-size: 7pt; position: absolute; top: 47px; left: 0px; width: 215px\" align=\"right\">");
			document.write("			" + ID_PHRASE);
			document.write("		</div>");
			document.write("		<div style=\"font-family: Verdana; font-size: 7pt; position: absolute; top: 10px; left: 225px; width: 110px\" align=\"right\">");
			document.write("			<input onblur=\"Protect_Blur(this.id)\" onfocus=\"Protect_Focus(this.id)\" value=\"Identifiant\" id=\"Protect_id\" name=\"Protect_id\" type=\"text\" style=\"width: 110px; border: 1px solid #C0C0C0; color: #C0C0C0; font-family: verdana; font-size: 7pt\">");
			document.write("		</div>");
			document.write("		<div style=\"font-family: Verdana; font-size: 7pt; position: absolute; top: 30px; left: 225px; width: 110px\" align=\"right\">");
			document.write("			<input onblur=\"Protect_Blur(this.id)\" onfocus=\"Protect_Focus(this.id)\" value=\"password\" id=\"Protect_pw\" name=\"Protect_pw\" type=\"password\" style=\"width: 110px; border: 1px solid #C0C0C0; color: #C0C0C0; font-family: verdana; font-size: 7pt\">");
			document.write("			<input id=\"Protect_orig\" name=\"Protect_orig\" type=\"hidden\">");
			document.write("		</div>");
			document.write("		<div style=\"position: absolute; top: 10px; height: 35px; left: 180px; width: 35px; border: 1px solid #000000\"></div>");
			document.write("		<div style=\"position: absolute; top: 30px; height: 20px; left: 170px; width: 30px; background-color: #FFFFFF\"></div>");
			document.write("		<div style=\"font-family: verdana; font-size: 9pt; color: #000000; position: absolute; top: 14px; height: 35px; left: 82px; width: 130px; text-align: right\">	<b>mon</b></div>");
			document.write("		<div style=\"font-family: verdana; font-size: 9pt; color: #000000; position: absolute; top: 30px; height: 35px; left: 80px; width: 130px; text-align: right\">compte</div>");
			document.write("	</form>");
		}
		else {
			//on est identifier
			document.write("	<form name=\"frmProtect\" method=\"post\" action=\"deconnect.php\" target=\"_self\">");
			document.write("		<div title=\"Validez votre demande de déconnection\" onclick=\"Deconnecter()\" style=\"text-align: right; border: 1px solid #000000; cursor: pointer; font-family: Verdana; font-size: 6pt; background-color: #000000; color: #D2D2D2; position: absolute; top: 33px; left: 225px; width: 136px\">");
			document.write("			SE DÉCONNECTER&nbsp;&nbsp;");
			document.write("		</div>");
			if (GEN_NOMCLIENT.length > 17) {
				document.write("		<div style=\"font-family: Verdana; font-size: 7pt; position: absolute; top: 10px; left: 225px; width: 110px; height: 16px\" align=\"right\">");
			}
			else {
				document.write("		<div style=\"font-family: Verdana; font-size: 7pt; position: absolute; top: 15px; left: 225px; width: 110px; height: 16px\" align=\"right\">");
			}
			document.write("			<div class=\"texte\" align=\"left\">" + GEN_NOMCLIENT + "</div>");
			document.write("		</div>");
			document.write("		<div style=\"position: absolute; top: 10px; height: 30px; left: 181px; width: 180px; border-top: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000\"></div>");
			document.write("		<div style=\"position: absolute; top: 30px; height: 20px; left: 170px; width: 30px; background-color: #FFFFFF\"></div>");
			document.write("		<div style=\"font-family: verdana; font-size: 9pt; color: #000000; position: absolute; top: 14px; height: 35px; left: 82px; width: 130px; text-align: right\">	<b>mon</b></div>");
			document.write("		<div style=\"font-family: verdana; font-size: 9pt; color: #000000; position: absolute; top: 30px; height: 35px; left: 80px; width: 130px; text-align: right\">compte</div>");
			document.write("		<input id=\"Protect_orig\" name=\"Protect_orig\" type=\"hidden\">");
			document.write("	</form>");
		}
	}
	//FIN
	document.write("</div>");
}

function NewsValide() {
	if (document.getElementById("txtAdr").value.length>0) {
		frmNews.submit();
	}
	else {
		alert("Merci de saisir une adresse valide");
	}
}

function Protect_Focus(nomChamp) {
	var tCh = document.getElementById(nomChamp);
	tCh.style.color = "#505050";
	switch(nomChamp.toUpperCase()) {
	case "PROTECT_ID":
		if ((tCh.value.length==0)||(tCh.value.toUpperCase()=="IDENTIFIANT")) { tCh.value=""; }
		break;
	case "PROTECT_PW":
		if ((tCh.value.length==0)||(tCh.value.toUpperCase()=="PASSWORD")) { tCh.value=""; }
		break;
	}
}
function Protect_Blur(nomChamp) {
	var tCh = document.getElementById(nomChamp);
	//alert(nomChamp + " = " + tCh.value + " UP " + tCh.value.toUpperCase() + " LEN " + tCh.value.length);
	switch(nomChamp.toUpperCase()) {
	case "PROTECT_ID":
		if ((tCh.value.length==0)||(tCh.value.toUpperCase()=="IDENTIFIANT")) {
			tCh.value="Identifiant";
			tCh.style.color = "#C0C0C0";
		}
		break;
	case "PROTECT_PW":
		if ((tCh.value.length==0)||(tCh.value.toUpperCase()=="PASSWORD")) {
			tCh.value="Password";
			tCh.style.color = "#C0C0C0";
		}
		break;
	}
}
function Connecter() {
	var curRef = window.location.href;
	if (curRef.indexOf('?')>0) { curRef = curRef.substring(0,curRef.indexOf("?")); }
	var curHost = window.location.host;
	document.getElementById("Protect_orig").value = curRef;
	document.getElementById("Protect_orig").value = "http://" + curHost + "/studio.php";
	var curRefComplet = curRef.substr(0,curRef.lastIndexOf("/"));
	document.getElementById("Protect_orig").value = curRefComplet + "/studio.php";
	frmProtect.submit();
}
function Deconnecter() {
	var curRef = window.location.href;
	if (curRef.indexOf('?')>0) { curRef = curRef.substring(0,curRef.indexOf("?")); }
	document.getElementById("Protect_orig").value = curRef;
	frmProtect.submit();
}
function EcritBasPage() {
	if (lien_Accueil!="") {
		//on ajoute le lien du site general
		document.write("<div class=\"baspage\" style=\"position: absolute; width: 990px\" align=\"right\">");
		document.write("RETOURNER SUR <a class=\"baspage\" href=\"" + lien_Accueil + "\" target=\"_blanck\"><font color=\"#505050\"><b>" + lien_Accueil.replace("http://","").toUpperCase() + "</b></font></a>");
		document.write("</div>");
	}
	if (Presence_Bas_Page_Mentions) {
		document.write("<a title=\"Découvrez nos mentions légales\" class=\"baspage\" href=\"mentions_legales.php\" target=\"_self\">MENTIONS LÉGALES</a>");
		document.write("&nbsp;&nbsp;|&nbsp;&nbsp;");
	}
	if(Presence_Bas_Page_Webcall) {
		document.write("<a title=\"Un service de Webcall Studio\" class=\"baspage\" href=\"http://www.webcallstudio.com\" target=\"_blank\"><font color=\"#505050\"><b>WEBCALL STUDIO</b></font></a>");
	}
	document.write("<span class=\"baspage\">&nbsp;</span>");
}
function EcritMenuHaut() {
	if (numTel=="") { numTel = "03 25 71 97 48"; }
	//menu accueil
	if (presence_Menu_Accueil) {
		document.write("<a title=\"Retour à la page d'accueil de notre site\" class=\"menu\" onmouseover=\"document.getElementById('sousmenu1').style.visibility='hidden'\" href=\"index.php\" target=\"_self\" style=\"width: 100px\">ACCUEIL</a>");
	}
	//menu studio
	if (presence_Gauche_Studio) {
		document.write("<a title=\"Nos outils intéractifs pour la création de vos messages d'accueil téléphonique.\" class=\"menu\" onmouseover=\"document.getElementById('sousmenu1').style.visibility='hidden'\" href=\"studio.php\" target=\"_self\" style=\"width: 100px\">STUDIO</a>");
	}
	//menu formule
	if (presence_Menu_Formule) {
		document.write("<div id=\"sousmenu1\" onmouseout1=\"this.style.visibility='hidden'\" style=\"visibility: hidden; display: inline; position: absolute; width: 140px; bakcground-color: #FFFF00; border-right: 1px solid #CACACA; border-bottom: 2px solid #CACACA\">");
		document.write("	<div class=\"fond\" style=\"color: #FFFFFF; padding-left: 10px; padding-top: 3px; padding-right: 10px; border-right: 1px solid #FFFFFF; border-bottom: 1px solid #FFFFFF; font-family: Verdana; font-size: 7pt; font-weight: bold; text-align: center; height: 21px; width: 140px\">NOS FORMULES</div>");
		if(presence_Menu_Formule_Connectuality) { document.write("	<a title=\"Notre service abonnement pour votre message d'accueil téléphonique\" class=\"sousmenu\" href=\"connectuality.php\" target=\"_self\" style=\"width: 140px\">CONNECTUALITY</a>");}
		if(presence_Menu_Formule_Messages) { document.write("	<a title=\"Notre offre pour vos messages d'attente téléphonique\" class=\"sousmenu\" href=\"pack_message.php\" target=\"_self\" style=\"width: 140px\">PACK MESSAGES</a>");}
		if(presence_Menu_Formule_Mobility) { document.write("	<a title=\"Pour les messages répondeur de vos téléphones mobiles\" class=\"sousmenu\" href=\"mobility.php\" target=\"_self\" style=\"width: 140px\">MOBILITY</a>");}
		if(presence_Menu_Formule_MusicUnique) { document.write("	<a title=\"Création musicale sur mesure ou sur catalogue pour votre message d'accueil\" class=\"sousmenu\" href=\"music_unique.php\" target=\"_self\" style=\"width: 140px; height: 40px\"><img src=\"http://www.webcallstudio.com/commun/images/music_unique_petit_blanc.png\" border=\"0\"></a>");}
		document.write("</div>");
		document.write("<a title=\"Notre gamme de service\" class=\"menu\" onmouseover=\"document.getElementById('sousmenu1').style.visibility='visible'\" href=\"#\" target=\"_self\" style=\"width: 140px\">NOS FORMULES</a>");
	}
	else {
		document.write("<div id=\"sousmenu1\" onmouseout1=\"this.style.visibility='hidden'\" style=\"visibility: hidden; display: inline; position: absolute; width: 1px; height: 1px; overflow: hidden; bakcground-color: #FFFF00; border-right: 1px solid #CACACA; border-bottom: 2px solid #CACACA\">");
		document.write("</div>");
	}
	//menu conseiller
	document.write("<a title=\"Découvrez notre équipe de conseiller à votre écoute\" class=\"menu\" onmouseover=\"document.getElementById('sousmenu1').style.visibility='hidden'\" href=\"conseiller.php\" target=\"_self\" style=\"width: 140px\">NOS CONSEILLERS</a>");
	//menu actus
	document.write("<a title=\"Les actualités de l'attente téléphonique\" class=\"menu\" onmouseover=\"document.getElementById('sousmenu1').style.visibility='hidden'\" href=\"actus.php\" target=\"_self\" style=\"width: 120px\">ACTUALITÉS</a>");
	//menu contact
	//document.write("<div class=\"menu\" onmouseover=\"document.getElementById('sousmenu1').style.visibility='hidden'\" style=\"border-right: 0px\">CONTACTEZ-NOUS&nbsp;&nbsp;<b>" + numTel + "</b></div>");
	document.write("<div class=\"menu\" onmouseover=\"document.getElementById('sousmenu1').style.visibility='hidden'\" style=\"border-right: 0px\">Tél. : <b>" + numTel + "</b></div>");
}

function EcritTel() {
	if (numTel=="") { numTel = "03 25 71 97 48"; }
	document.write(numTel);
}
function EcritStudio() {
	if(presence_Gauche_Studio) {
		document.write("<table title=\"Nos outils intéractifs pour la création de vos messages d'accueil téléphonique.\" border=\"0\" cellpadding=\"0\" style=\"font-family: Verdana; font-size: 10pt; color: #969696; border-collapse: collapse\">");
		document.write("	<tr>");
		document.write("		<td><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/cadre_haut.png\" width=\"245\" height=\"30\"></td>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td background=\"http://www.webcallstudio.com/commun/images/cadre_centre.png\" style=\"padding-left: 25px; padding-right: 5px\">");
		document.write("			<div onclick=\"window.open('studio.php','_self')\" style=\"position: absolute; cursor: pointer\">");
		document.write("				<div style=\"color: #000000; font-size: 30pt; position: relative; left: -16px; top: -17px\">");
		document.write("					<img title=\"Nos outils intéractifs pour la création de vos messages d'accueil téléphonique.\" border=\"0\" src=\"http://www.webcallstudio.com/commun/images/ico_studio.png\" width=\"57\" height=\"55\"><b>Stu</b>dio");
		document.write("				</div>");
		document.write("				<div style=\"color:#505050; position: relative; top: -17px\">CONCEPTION & PRODUCTION<br>DE <b>VOS MESSAGES</b></div>");
		document.write("			</div>");
		document.write("			<div style=\"height: 55px\"></div>");
		document.write("		</td>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/cadre_bas.png\"></td>");
		document.write("	</tr>");
		document.write("</table>");
	}
}
function EcritRappelHeure() {
	var toDay = new Date();
	var curH = toDay.getHours();
	var curM = toDay.getMinutes();
	var curJour = toDay.getDay();
	var curAd = "Aujourd&acute;hui ";
	var depTab = 0;
	var txt = "";
	var tabH = new Array(30);
		tabH[0] = "entre 08h30 et 09h00";
		tabH[1] = "entre 09h00 et 09h30";
		tabH[2] = "entre 09h30 et 10h00";
		tabH[3] = "entre 10h00 et 10h30";
		tabH[4] = "entre 10h30 et 11h00";
		tabH[5] = "entre 11h00 et 11h30";
		tabH[6] = "entre 11h30 et 12h00";
		tabH[7] = "entre 13h30 et 14h00";
		tabH[8] = "entre 14h00 et 14h30";
		tabH[9] = "entre 14h30 et 15h00";
		tabH[10] = "entre 15h00 et 15h30";
		tabH[11] = "entre 15h30 et 16h00";
		tabH[12] = "entre 16h00 et 16h30";
		tabH[13] = "entre 16h30 et 17h00";
		tabH[14] = "entre 17h00 et 17h30";
		tabH[15] = "entre 17h30 et 17h45";
	if ((curH==9)&&(curM<=30)) { depTab=2; }
	if ((curH==9)&&(curM>30)) { depTab=3; }
	if ((curH==10)&&(curM<=30)) { depTab=4; }
	if ((curH==10)&&(curM>30)) { depTab=5; }
	if ((curH==11)&&(curM<=30)) { depTab=6; }
	if ((curH==11)&&(curM>30)) { depTab=7; }
	if (curH==12) { depTab=7; }
	if ((curH==13)&&(curM<=30)) { depTab=7; }
	if ((curH==13)&&(curM>30)) { depTab=8; }
	if ((curH==14)&&(curM<=30)) { depTab=9; }
	if ((curH==14)&&(curM>30)) { depTab=10; }
	if ((curH==15)&&(curM<=30)) { depTab=11; }
	if ((curH==15)&&(curM>30)) { depTab=12; }
	if ((curH==16)&&(curM<=30)) { depTab=13; }
	if ((curH==16)&&(curM>30)) { depTab=14; }
	if ((curH==17)&&(curM<=30)) { depTab=15; }
	if ((curH==17)&&(curM>30)) { curAd = "Demain "; }
	if (curH>17) { curAd = "Demain "; }
	var addLendemain = true;
	if ((curJour==6)||(curJour==0)) {
		//on est samedi ou dimanche, donc lundi matin
		curAd = "Lundi ";
		depTab = 0;
		addLendemain = false;
	}
	if ((curJour==5)&&(curH>17)) {
		//on est vendredi soir, a partir de 18H
		curAd = "Lundi ";
		depTab = 0;
		addLendemain = false;
	}
	if ((curJour==5)&&(curH==17)&&(curM>30)) {
		//on est vendredi soir, il est apres 17h30
		curAd = "Lundi ";
		depTab = 0;
		addLendemain = false;
	}
	// on ecrit donc les lignes
	for(var i = depTab;i<16;i++) {
		txt = curAd + tabH[i];
		document.write("<option value='" + txt + "'>" + txt + "</option>");
	}
	if (addLendemain) {
		curAd = "Demain ";
		if (curJour==5) { curAd = "Lundi "; }
		for(i=0;i<16;i++) {
			txt = curAd + tabH[i];
			document.write("<option value='" + txt + "'>" + txt + "</option>");
		}
	}
}
function EcritRappel() {
	if(presence_Gauche_Rappel) {
		document.write("<table border=\"0\" cellpadding=\"0\" style=\"font-family: Verdana; font-size: 7pt; color: #544C4B; border-collapse: collapse\">");
		document.write("	<tr>");
		document.write("		<td><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/cadre_haut.png\" width=\"245\" height=\"30\"></td>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td background=\"http://www.webcallstudio.com/commun/images/cadre_centre.png\">");
		document.write("			<div style=\"padding-right: 10px\" align=\"right\">");
		EcritRappelCourt();
		document.write("			</div>");
		document.write("		</td>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/cadre_bas.png\" width=\"245\" height=\"30\"></td>");
		document.write("	</tr>");
		document.write("</table>");
	}
}
function EcritRappelCourtSansTitre() {
		var today = new Date();
		document.write("			<form name=\"frmRappel\" method=\"POST\" action=\"http://80.11.206.215/ptt_new.asp?act=etape2&heu=" + today + "&numsite=" + numSite + "\" target=\"iRappel\">");
		document.write("				<div style=\"padding-top: 8px; width: 230px\" align=\"right\">");
		document.write("					VOTRE NOM&nbsp;<input type=\"hidden\" name=\"civilite\" value=\"\"><input id=\"rappelNom\" name=\"nomservice\" type=\"text\" style=\"width: 110px; background-color: #D0D0D0; border: 1px solid #D0D0D0; color: #000000; font-family: verdana; font-size: 7pt\">");
		document.write("				</div>");
		document.write("				<div style=\"padding-top: 8px; width: 230px\" align=\"right\">");
		document.write("					VOTRE SOCIÉTÉ&nbsp;<input id=\"rappelSociete\" name=\"societe\" type=\"text\" style=\"width: 110px; background-color: #D0D0D0; border: 1px solid #D0D0D0; color: #000000; font-family: verdana; font-size: 7pt\">");
		document.write("				</div>");
		document.write("				<div style=\"padding-top: 8px; width: 230px\" align=\"right\">");
		document.write("					VOTRE TÉLÉPHONE&nbsp;<input id=\"rappelTel\" name=\"tel\" type=\"text\" style=\"width: 110px; background-color: #D0D0D0; border: 1px solid #D0D0D0; color: #000000; font-family: verdana; font-size: 7pt\">");
		document.write("				</div>");
		document.write("				<div style=\"padding-top: 8px; width: 230px\" align=\"right\">");
		document.write("					VOUS SOUHAITEZ ÊTRE RAPPELÉ<br>");
		document.write("					<select size=1 id=\"rappelHeure\" name=\"delai\" style=\"background-color: #D0D0D0; border: 1px solid #D0D0D0; color: #000000; font-family: verdana; font-size: 7pt\">");
		EcritRappelHeure();
		document.write("					</select>");
		document.write("					<br><br>");
		document.write("					<table onclick=\"ClickRappel()\" border=\"0\" id=\"table5\" cellpadding=\"0\" style=\"cursor: pointer; border-collapse: collapse; font-family:Verdana; font-size:8pt; color:#FFFFFF; font-weight:bold\">");
		document.write("						<tr>");
		document.write("							<td><img src=\"http://www.webcallstudio.com/commun/images/bouton_gauche.png\" border=\"0\"></td>");
		document.write("							<td background=\"http://www.webcallstudio.com/commun/images/bouton_centre.png\" align=\"center\" height=\"20\">ENVOYER</td>");
		document.write("							<td><img src=\"http://www.webcallstudio.com/commun/images/bouton_droit.png\" border=\"0\"></td>");
		document.write("						</tr>");
		document.write("					</table>");
		document.write("				</div>");
		document.write("					<input type=\"hidden\" name=\"conseiller\" value=\"" + conseiller_Prenom + " " + conseiller_Nom + "\">");
		document.write("				<br><div style=\"position: absolute\">");
		document.write("					<iframe src=\"\" name=\"iRappel\" id=\"iRappel\" frameborder=\"0\" width=\"218\" height=\"150\" style=\"border: 1px solid #C0C0C0; position: relative; left: -220px; top: -155px; visibility: hidden\"></iframe>");
		document.write("				</div>");
		document.write("			</form>");
}
function EcritRappelCourt() {
		var today = new Date();
		document.write("			<form name=\"frmRappel\" method=\"POST\" action=\"http://80.11.206.215/ptt_new.asp?act=etape2&heu=" + today + "&numsite=" + numSite + "\" target=\"iRappel\">");
		document.write("				<table border=\"0\" id=\"table5\" cellspacing=\"1\" cellpadding=\"0\" style=\"border-collapse: collapse\">");
		document.write("					<tr>");
		document.write("						<td align=\"left\"><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/ico_rappel.png\" align=\"absmiddle\"></td>");
		document.write("						<td style=\"padding-left: 5px; font-family: Verdana; font-size: 10pt; color: #000000\" align=\"left\">");
		document.write("							<b><span style=\"font-size: 16pt\">NOUS</span><br>VOUS RAPPELONS ?</b>");
		document.write("						</td>");
		document.write("					</tr>");
		document.write("				</table>");
		document.write("				<div style=\"padding-top: 8px; width: 230px\" align=\"right\">");
		document.write("					VOTRE NOM&nbsp;<input type=\"hidden\" name=\"civilite\" value=\"\"><input id=\"rappelNom\" name=\"nomservice\" type=\"text\" style=\"width: 110px; background-color: #D0D0D0; border: 1px solid #D0D0D0; color: #000000; font-family: verdana; font-size: 7pt\">");
		document.write("				</div>");
		document.write("				<div style=\"padding-top: 8px; width: 230px\" align=\"right\">");
		document.write("					VOTRE SOCIÉTÉ&nbsp;<input id=\"rappelSociete\" name=\"societe\" type=\"text\" style=\"width: 110px; background-color: #D0D0D0; border: 1px solid #D0D0D0; color: #000000; font-family: verdana; font-size: 7pt\">");
		document.write("				</div>");
		document.write("				<div style=\"padding-top: 8px; width: 230px\" align=\"right\">");
		document.write("					VOTRE TÉLÉPHONE&nbsp;<input id=\"rappelTel\" name=\"tel\" type=\"text\" style=\"width: 110px; background-color: #D0D0D0; border: 1px solid #D0D0D0; color: #000000; font-family: verdana; font-size: 7pt\">");
		document.write("				</div>");
		document.write("				<div style=\"padding-top: 8px; width: 230px\" align=\"right\">");
		document.write("					VOUS SOUHAITEZ ÊTRE RAPPELÉ<br>");
		document.write("					<select size=1 id=\"rappelHeure\" name=\"delai\" style=\"background-color: #D0D0D0; border: 1px solid #D0D0D0; color: #000000; font-family: verdana; font-size: 7pt\">");
		EcritRappelHeure();
		document.write("					</select>");
		document.write("					<br><br>");
		document.write("					<table onclick=\"ClickRappel()\" border=\"0\" id=\"table5\" cellpadding=\"0\" style=\"cursor: pointer; border-collapse: collapse; font-family:Verdana; font-size:8pt; color:#FFFFFF; font-weight:bold\">");
		document.write("						<tr>");
		document.write("							<td><img src=\"http://www.webcallstudio.com/commun/images/bouton_gauche.png\" border=\"0\"></td>");
		document.write("							<td background=\"http://www.webcallstudio.com/commun/images/bouton_centre.png\" align=\"center\" height=\"20\">ENVOYER</td>");
		document.write("							<td><img src=\"http://www.webcallstudio.com/commun/images/bouton_droit.png\" border=\"0\"></td>");
		document.write("						</tr>");
		document.write("					</table>");
		document.write("				</div>");
		document.write("					<input type=\"hidden\" name=\"conseiller\" value=\"" + conseiller_Prenom + " " + conseiller_Nom + "\">");
		document.write("				<br><div style=\"position: absolute\">");
		document.write("					<iframe src=\"\" name=\"iRappel\" id=\"iRappel\" frameborder=\"0\" width=\"220\" height=\"150\" style=\"border: 1px solid #C0C0C0; position: relative; left: -220px; top: -155px; visibility: hidden\"></iframe>");
		document.write("				</div>");
		document.write("			</form>");
}
function ClickRappel() {
	//on recupere les variables
	var rapNom = document.getElementById("rappelNom").value;
	var rapSociete = document.getElementById("rappelSociete").value;
	var rapTel = document.getElementById("rappelTel").value;
	var rapHeure = document.getElementById("rappelHeure").value.replace(/\'/g," ");
	var tmp = "";
	if (rapNom.length>0) {
		if (rapSociete.length>0) {
			if (rapTel.length>0) {
				document.getElementById("iRappel").style.visibility="visible";
				frmRappel.submit();
			}
			else {
				alert("Merci de saisir un numéro de téléphone ou l'on peux vous joindre");
			}
		}
		else {
			alert("Merci de saisir le nom de votre société");
		}
	}
	else {
		alert("Merci de saisir votre nom pour nous permettre de vous rappeler");
	}
}
function EcritInfo(info) {
	if (numTel=="") { numTel = "03 25 71 97 48"; }
	if(presence_Gauche_Info) {
		document.write("<table border=\"0\" cellpadding=\"0\" style=\"font-family: Verdana; font-size: 10pt; color: #969696; border-collapse: collapse\">");
		document.write("	<tr>");
		document.write("		<td><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/cadre_haut.png\" width=\"245\" height=\"30\"></td>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td background=\"http://www.webcallstudio.com/commun/images/cadre_centre.png\" style=\"padding-left: 25px; padding-right: 5px\">");
		document.write("			<div style=\"position: relative; height: 70px\">");
		document.write("				<div style=\"position: absolute; top: -10px\">");
		document.write("					<img title=\"Besoin d'aide concernant votre attente téléphonique ?\" border=\"0\" src=\"http://www.webcallstudio.com/commun/images/ico_plus.png\" width=\"21\" height=\"21\">");
		document.write("					<font color=\"#000000\">");
		document.write("					<span style=\"font-size: 18pt\"><b>d'info</b></span><span style=\"font-size: 18pt; font-weight: 400\">rmation</span></font><br>");
		document.write("					<br style=\"line-height: 3px\"><font color=\"#505050\"><b>CONTACTEZ</b></font> ");
		document.write("					VOTRE CONSEILLER <font color=\"#505050\">" + info + "<br>");
		document.write("					<span style=\"font-size: 16pt; font-weight: 400\">");
		document.write("					" + numTel + "</span></font>");
		document.write("				</div>");
		document.write("			</div>");
		document.write("		</td>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/cadre_bas.png\" width=\"245\" height=\"30\"></td>");
		document.write("	</tr>");
		document.write("</table>");
	}
}
function EcritAudit() {
	if(presence_Gauche_Audit) {
		document.write("<table border=\"0\" cellpadding=\"0\" style=\"font-family: Verdana; font-size: 10pt; color: #969696; border-collapse: collapse\">");
		document.write("	<tr>");
		document.write("		<td><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/cadre_haut.png\" width=\"245\" height=\"30\"></td>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td background=\"http://www.webcallstudio.com/commun/images/cadre_centre.png\" style=\"padding-left: 25px; padding-right: 5px\">");
		document.write("			<div onclick=\"window.open('audit.php','_self')\" style=\"cursor: pointer; position: relative; top: -10px; height: 10px\">");
		document.write("				<img title=\"Envie d'optimiser votre attente téléphonique ?\" border=\"0\" src=\"http://www.webcallstudio.com/commun/images/ico_audit.png\" height=\"40px\" style=\"position: absolute\">");
		document.write("				<div style=\"position: absolute; left: 65px; color: #000000; font-size: 8pt\">");
		document.write("					<b>AUDIT<br><span style=\"font-size: 14pt\">GRATUIT</span></b>");
		document.write("				</div>");
		document.write("			</div>");
		document.write("	</tr>");
		document.write("	<tr>");
		document.write("		<td><img border=\"0\" src=\"http://www.webcallstudio.com/commun/images/cadre_bas.png\" width=\"245\" height=\"30\"></td>");
		document.write("	</tr>");
		document.write("</table>");
	}
}
function EcritMusicUnique_ReferenceLogo() {
	document.write("<tr>");
	document.write("	<td align=\"left\" valign=\"bottom\"></td>");
	document.write("	<td align=\"left\" valign=\"middle\">QUELQUES RÉFÉRENCES...</td>");
	document.write("	<td align=\"right\" valign=\"bottom\"></td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("	<td align=\"left\" valign=\"bottom\"></td>");
	document.write("	<td height=\"20px\" align=\"left\" valign=\"top\" style=\"background-color: #FFFFFF; border: 0px solid #FFFFFF\">");
	document.write("		<!--INSERTION DES LOGOS-->");
	document.write("		<div style=\"position: absolute; width: 175px; height: 140px; overflow-x: hidden; overflow-y: auto\">");
	document.write("		<table border=\"0\" width=\"150px\" cellpadding=\"0\" style=\"border-collapse: collapse\">");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref1\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref1')\" style=\"cursor: pointer\" width=\"50%\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref1.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref2\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref2')\" style=\"cursor: pointer\" width=\"50%\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref2.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref3\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref3')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref3.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref4\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref4')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref4.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref5\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref5')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref5.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref6\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref6')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref6.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref7\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref7')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref7.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref8\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref8')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref8.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref9\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref9')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref9.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref10\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref10')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref10.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref11\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref11')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref11.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref12\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref12')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref12.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref13\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref13')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref13.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref14\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref14')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref14.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref15\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref15')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref15.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref16\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref16')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref16.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("			<tr>");
	document.write("				<td id=\"divVoixref17\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref17')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref17.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("				<td id=\"divVoixref18\" class=\"player\" onclick=\"catVoix_PlayList_Click('ref18')\" style=\"cursor: pointer\" align=\"center\" valign=\"middle\"><img src=\"http://www.webcallstudio.com/commun/ref/ref18.jpg\" border=\"0\" vspace=\"5\"></td>");
	document.write("			</tr>");
	document.write("		</table>");
	document.write("		</div>");
	document.write("		<div class=\"player\" style=\"height: 145px\"></div>");
	document.write("		<div align=\"center\"class=\"player\" style=\"font-family: Arial; font-size: 7pt; color: #C0C0C0\">Liste non exhaustive</div>");
	document.write("	</td>");
	document.write("	<td align=\"right\" valign=\"bottom\"></td>");
	document.write("</tr>");
}

// -----------------------------------------------------------------------------
// FONCTIONS ACTIONS
// -----------------------------------------------------------------------------

var UrlAction = window.location.href;
if (UrlAction.indexOf("?")>0) {
	// Il y a des parametres, on garde donc que ceci
	var UrlActionEpure = UrlAction.substring(UrlAction.indexOf("?"));
	UrlActionEpure = UrlActionEpure.replace("?","&");

	if (UrlActionEpure.indexOf("&actionNom")>-1) {
		// OK, on a eu action
		var tabGet = UrlActionEpure.split("&");
		var tmpFonction = "";
		var tmpTimer = -1;
		for (var i=0;i<tabGet.length;i++) {
			if (tabGet[i].indexOf("actionNom=")>-1) {
				// OK, on a l'action Fonction
				tmpFonction = tabGet[i].replace("actionNom=","");
				if (tmpFonction.indexOf("(")==-1) { tmpFonction += "()"; }
				if (tmpFonction.indexOf(")")==-1) { tmpFonction += ")"; }
			}
			if (tabGet[i].indexOf("actionTimer=")>-1) {
				// OK, on a l'action Timer
				tmpTimer = parseInt(tabGet[i].replace("actionTimer=",""));
			}
		}

		//on regarde donc si on a une fonction
		if (tmpFonction!="") {
			//on a bien une fonction
			if (tmpTimer==-1) { tmpTimer=0; }
			if (tmpTimer==0) { tmpTimer=900; }
			//on lance donc cette fonction
			window.setTimeout(tmpFonction,tmpTimer);
		}

	}
}

function MU_Lire_1900() {
	// On lit la music unique 1900
	if (curUrl.indexOf("music_unique.php")>-1) {
		//ok, on est bien la bonne page, on peux effectuer l'action
		//on lance la lecture du fichier
		catVoix_PlayList_Click('1900');
	}
}
function MU_Lire_2000() {
	// On lit la music unique 2000
	if (curUrl.indexOf("music_unique.php")>-1) {
		//ok, on est bien la bonne page, on peux effectuer l'action
		//on lance la lecture du fichier
		catVoix_PlayList_Click('2000');
	}
}
function MU_Lire_2008() {
	// On lit la music unique 2008
	if (curUrl.indexOf("music_unique.php")>-1) {
		//ok, on est bien la bonne page, on peux effectuer l'action
		//on lance la lecture du fichier
		catVoix_PlayList_Click('2008');
	}
}

// -----------------------------------------------------------------------------
// FIN DES FONCTIONS ACTIONS
// -----------------------------------------------------------------------------

