var url_du_Site = "http://www.1mndepause.fr/";

// fonctions pour le dialogues entre fichiers Flash
function deplace(nFlash,nValeur1) {
  nFlash.TGotoLabel("/",nValeur1);
}
function nomVar(nFlash,nVar,nValeur) {
  nFlash.SetVariable(nVar,nValeur);
}

/*
// fonctions pour le popup on exit
function lanceAvertissement(){
	ConfirmerFermeture = true; //Appelle cette fonction si l'avatar a ete cree et pas enregistre
	// Of-course you could call this is Keypress event of a text box or so...
}

function AvertissementInutile(){
	ConfirmerFermeture = false; //Appelle cette fonction si l'alerte n'est plus necessaire.
}

window.onbeforeunload = confirmExit;

function confirmExit(){
	if (ConfirmerFermeture){
		return "Vous n'avez pas sauvegard\xE9 votre double !\nSi vous ne l'enregistrez pas, toutes vos modifications seront perdues...\n\nPour ENREGISTRER votre double, cliquez sur le bouton \"Annuler\".\n\nSi vous \xEAtes s\xFBr(e) de vouloir fermer la page, cliquez sur OK.";
	}else{
		return ;
	}
}
*/


// XITI
function xt_med(type,section,page,x1,x2,x3,x4,x5)
{xt_img = new Image();
xtdate = new Date();
xts = screen;
xt_ajout = (type=='F') ? '' : (type=='M') ? '&a='+x1+'&m1='+x2+'&m2='+x3+'&m3='+x4+'&m4='+x5 : '&clic='+x1;
Xt_im = 'http://logi6.xiti.com/hit.xiti?s=367077&s2='+section;
Xt_im += '&p='+page+xt_ajout+'&hl=' + xtdate.getHours() + 'x' + xtdate.getMinutes() + 'x' + xtdate.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xt_im += '&r=' + xts.width + 'x' + xts.height + 'x' + xts.pixelDepth + 'x' + xts.colorDepth;}
xt_img.src = Xt_im;
if ((x2 != null)&&(x2!=undefined)&&(type=='C'))
{ if ((x3=='')||(x3==null)) { document.location = x2} else {xfen = window.open(x2,'xfen',''); xfen.focus();}}
else
{return;}}

// Bouton Envoyez Carte 2010
function envoyezCarte2010() { 
	window.location.href="ecard2010.html";
	xt_med('C','','carte2010-boutonEnvoyezCarte2010','N');
}



// fonctions generales

/***** Ajouter le portail aux favoris (Firefox / IE) *****/
var urlAddress="http://www.1mndepause.fr";
var pageName='1 minute de pause';

function AjoutFavoris() {
    if (document.all) {
        window.external.AddFavorite(urlAddress,pageName);
    }
    else {
        alert("D\xE9sol\xE9!\nVotre navigateur ne supporte pas l'ajout automatique de favoris.\nMais vous pouvez utiliser le menu de votre logiciel pour le faire.");
    }
}



function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function decrement(nom) {
nom.filters.item("DXImageTransform.Microsoft.Alpha").opacity -=50;
}

function increment(nom) {
nom.filters.item("DXImageTransform.Microsoft.Alpha").opacity +=50;
}


// Page d'accueil v1

// -----------------

// Bouton Creez votre double
function creezvotredouble() { 
 	window.location.href=url_du_Site+"creez-votre-double.php";
	xt_med('C','','accueil::btn_creez_votre_double','N');
}

// Bouton Creez votre collegue
function creezvotrecollegue() { 
 	window.location.href=url_du_Site+"creez-votre-collegue.php";
	xt_med('C','','accueil::btn_creez_votre_collegue','N');
}
// Bouton Creez votre double Femme
function creezvotredouble_femme() { 
 	window.location.href=url_du_Site+"creez-votre-double-femme.php";
	xt_med('C','','accueil::btn_creez_votre_double_Femme','N');
}

// Bouton Creez votre double Homme
function creezvotredouble_homme() { 
 	window.location.href=url_du_Site+"creez-votre-double-homme.php";
	xt_med('C','','accueil::btn_creez_votre_double_Homme','N');
}

// Bouton Mot de passe oublie
function motdepasse_oublie() { 
	xt_med('C','','accueil::btn_motdepasse_oublie','N');
}

// Interface de creation de l'avatar
// --------------------------------
// Bouton Homme
function je_suis_un_homme() { 
	xt_med('C','','crea_avatar::btn_homme','N');
}

// Bouton Femme
function je_suis_une_femme() { 
	xt_med('C','','crea_avatar::btn_femme','N');
}

// Bouton Choix des Cheveux
function choix_cheveux() { 
	xt_med('C','','crea_avatar::btn_cheveux','N');
}

// Bouton des Fronts
function choix_front() { 
	xt_med('C','','crea_avatar::btn_front','N');
}

// Bouton Choix des Nez
function choix_nez() { 
	xt_med('C','','crea_avatar::btn_nez','N');
}

// Bouton des Sourcils
function choix_sourcils() { 
	xt_med('C','','crea_avatar::btn_sourcils','N');
}

// Bouton Choix des Lunettes
function choix_lunettes() { 
	xt_med('C','','crea_avatar::btn_lunettes','N');
}

// Bouton des Moustaches
function choix_moustaches() { 
	xt_med('C','','crea_avatar::btn_moustaches','N');
}

// Bouton des Bijoux
function choix_bijoux() { 
	xt_med('C','','crea_avatar::btn_bijoux','N');
}

// Bouton Choix des Bustes
function choix_buste() { 
	xt_med('C','','crea_avatar::btn_buste','N');
}

// Bouton des Jambes
function choix_jambes() { 
	xt_med('C','','crea_avatar::btn_jambes','N');
}

// Bouton des Chaussures
function choix_chaussures() { 
	xt_med('C','','crea_avatar::btn_chaussures','N');
}

// Bouton Choix de la Corpulence et de la Couleur de peau
function choix_corpulence_et_peau() { 
	xt_med('C','','crea_avatar::btn_corpulence_et_peau','N');
}

// Bouton Sauvegarder
function sauvegarder_double() { 
	xt_med('C','','crea_avatar::btn_sauvegarder_double','N');
}

// Bouton Validation
function valider_double() { 
	xt_med('C','','crea_avatar::btn_valider_double','N');
}

// Bouton Signaler
function signaler_site() { 
	xt_med('C','','crea_avatar::btn_signaler_site','N');
}

// Bouton Cartes postales (non actif)
function cartes_postales() { 
	xt_med('C','','crea_avatar::btn_cartes_postales','N');
}

// Bouton Imprimer (non actif)
function imprimer_double() { 
	xt_med('C','','crea_avatar::btn_imprimer_double','N');
}

// Bouton Telecharger (non actif)
function telecharger_double() { 
	xt_med('C','','crea_avatar::btn_telecharger_double','N');
}


// Flash Bandeau haut site webcam
function retouraccueil() {
window.location.href="http://www.lawebcamdubureau.com/";
xt_clic('N','retouraccueil');
}

function votreavis() {
//window.location.href="votreavis.htm";
window.location.href="/interactivite/questionnaire.html";
//alert('Prochainement');
xt_clic('N','votreavis');
}

function newslettersanspopup() {
window.location.href="/newsletter.htm";
xt_clic('N','newsletter');
}

function newsletter() {
window.open('/membre.html','newsletter','toolbar=no, width=500, height=300');
xt_clic('N','membre-newsletter');
}

function transfert() {
window.open('/transfert.html','transfert','toolbar=no, width=600, height=500');
xt_clic('N','transfert');
}

function jmbruneau() {
window.open("http://www.jm-bruneau.fr/index.cgi?Page=/lawebcamdubureau/landing-webcam.htm", "_blank");
xt_clic('N','jmbruneau');
}

// Popup Transfert Quiz
function transfertquiz() {
window.open('http://www.jm-bruneau.fr/lawebcamdubureau/jeu_cam.cgi?nom_jeu=lawebcamdubureau&E=6','transfert','toolbar=yes, width=600, height=500');
xt_clic('N','transfertquiz');
}

// Flash Bandeau bas site webcam
function episodes() {
window.location.href="/episodes/index.html";
xt_clic('N','episodes');
}

function jeux() {
window.location.href="/jeux/index.html";
//alert('Prochainement');
xt_clic('N','jeux');
}

function interactivite() {
window.location.href="/interactivite/index.html";
xt_clic('N','interactivite');
}

function bonus() {
window.location.href="/bonus/index.html";
xt_clic('N','bonus');
}

function venus() {
window.location.href="/venus-detectives/index.html";
xt_clic('N','venus');
}

function presse() {
//window.open("http://www.lawebcamdubureau.com/presse/");
window.open("http://www.1mndepause.fr/presse/presse.html");
xt_clic('N','presse');
}

function developpement_durable() {
window.open("http://www.jm-bruneau.fr/developpement-durable/");
xt_clic('N','developpement_durable');
}

function contact() {
alert('Prochainement');
//window.location.href="/contact.html";
xt_clic('N','contact');
}

function contactez_nous() {
window.open('http://www.1mndepause.fr/donnez-votre-avis.html','contact','toolbar=yes, width=830, height=520');
//window.open("http://www.1mndepause.fr/donnez-votre-avis.html");
}

// Flash Bande Annonce
function sitelawebcam() {
window.parent.location.href="http://www.lawebcamdubureau.com/";
xt_clic('N','sitelawebcam');
}

// Flash Accueil site
function bandeannonce() {
window.location.href="webcam_s2_ba_fr.htm";
xt_clic('N','bandeannonce');
}

// Fonction d'extraction des parametres
function TJSExtraireParam() {
		url = window.location.href;
		var exp=new RegExp("[&?]+","g");
		var exp2=new RegExp("[=]+","g");
		var tabNom=url.split(exp);
		var	tabParam=new Array();
		if (tabNom!=null) {
			for (var i=1;i<tabNom.length;i++){
				var tabTemp=tabNom[i].split(exp2);
				tabParam[tabTemp[0]]=tabTemp[1];
			}
		}
		return tabParam;
	}

// Appel de la fonction et creation du tableau des parametres
var urlParam = TJSExtraireParam();

// Acces Episode1
function verif(){
if (document.formep01.WORD.value == "webcam") {
window.location.href="webcam_s2_e1_fr.htm" 
} 
else {
alert("Desole, le mot de passe est incorrect");}}


//--------------------- POPUP POUR QUIZ -------------------------//
function popupquiz() { 
  window.open('http://www.lawebcamdubureau.com/jeux/quiz-popup.html','quiz','width=810, height=408','toolbar=yes');
xt_clic('N','popupquiz');
}

//--------------------- POPUP ANTIBUG POUR QUIZ -------------------------//
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

//tmtC_winOpen
var newWin;
//tmtC_winOpenEnd

function tmt_winOpen(u,id,f,df){
	if(eval(id)==null||eval(id+".closed")){
	eval(id+"=window.open('"+u+"','"+id+"','"+f+"')");eval(id+".focus()");}
	else if(df){eval(id+".focus()");}
	else{eval(id+"=window.open('"+u+"','"+id+"','"+f+"')");eval(id+".focus()");}
}

//--------------------- POPUP DES PAGES INTERACTIVITE-------------------------//
//vanessa
function popupvanessa() { 
  window.open('http://jmb-php.cvf.fr/webcam/popup_vanessa.php','vanessa','width=500, height=300','toolbar=yes');
}
//Diego
function popupdiego() { 
  window.open('http://jmb-php.cvf.fr/webcam/popup_diego.php','diego','width=500, height=300','toolbar=yes');
}
//Martine
function popupmartine() { 
  window.open('http://jmb-php.cvf.fr/webcam/popup_martine.php','martine','width=500, height=300','toolbar=yes');
}
//Barnabe
function popupbarnabe() { 
  window.open('http://jmb-php.cvf.fr/webcam/popup_barnabe.php','barnabe','width=500, height=300','toolbar=yes');
}
//Agence
function popupagence() { 
  window.open('http://jmb-php.cvf.fr/webcam/popup_agence.php','agence','width=700, height=450','toolbar=yes');
}

//--------------------- POPUP REGLEMENT CONCOURS OLYMPIA-------------------------//
function reglementolympia() { 
  window.open('http://www.lawebcamdubureau.com/bonus/ecards/reglement.htm','olympiarules','width=500, height=300,scrollbars=yes');
xt_clic('N','reglementolympia');
}

//-------------------- code Benjamin Raaymakers 08/07/2008 ----------------------//
//--------------------- telechargement du double --------------------------------//
//capture
function capture(prenom,nom,societe,idCarte,strmsg,strprenomDest,strnomDest) { 
	msg = strmsg;
	prenomDest = strprenomDest;
	nomDest = strnomDest;
	//http://www.1mndepause.fr/
	//http://localhost/1mndepause/
	popCapture = window.open('http://www.1mndepause.fr/capture.php?prenom='+prenom+'&nom='+nom+'&societe='+societe+'&carte='+idCarte,'capture','width=820, height=600','toolbar=yes');
}

function closeWin(){
	window.close();
	//popCapture.close();
}

//------------------ boutons WWF ------------------------------//
// Accueil WWF
function accueilWWF() { 
	window.open("http://www.wwf.fr/");
	xt_med('C','','bonusWWF::btn_accueil','N');
}

// Dons au WWF
function donsWWF() { 
	window.open("https://faireundon.wwf.fr/");
	xt_med('C','','bonusWWF::btn_dons','N');
}

// Planete Attitude
function WWFplaneteAttitude() { 
	window.open("http://www.planete-attitude.fr/");
	xt_med('C','','bonusWWF::banniere_planeteAttitude','N');
}

// Calculateur empreinte ecologique
function WWFempreinteEcolo() { 
	window.open("http://www.footprint-wwf.be/footprintpage.aspx?projectId=100&languageId=1");
	xt_med('C','','bonusWWF::calcul_empreinteEcolo','N');
}

