// fonctions xiti
function xt_clic(typecl,section,page,url,nvlle)
{
if (page == null || page == '' || page == 'undefined')
{
page = section;
section = 0;
}
Xt_r = document.referrer;
Xt_h = new Date();
xt_img = new Image();
Xt_i = 'http://logi6.xiti.com/hit.xiti?s=275322&s2='+section;
Xt_i += '&p='+page+'&clic='+typecl+'&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xiti_s=screen;Xt_i += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;}
Xt_i += '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$');
xt_img.src = Xt_i;
if ((url != null)&&(url!=undefined))
{ if ((nvlle=='')||(nvlle==null)) { document.location = url;} else {xfen = window.open(url,'xfen',''); xfen.focus();}}
else
{return;}
}

function xt_flash(typefl,page)
{
Xt_r = document.referrer;
Xt_h = new Date();
xt_img = new Image();
Xt_i = 'http://logi6.xiti.com/hit.xiti?s=275322&s2=2';
Xt_i += '&p='+page+'&type='+typefl+'&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
if(parseFloat(navigator.appVersion)>=4)
{Xiti_s=screen;Xt_i += '&r=' + Xiti_s.width + 'x' + Xiti_s.height + 'x' + Xiti_s.pixelDepth + 'x' + Xiti_s.colorDepth;}
Xt_i += '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$');
xt_img.src = Xt_i;
return;
}
// fonctions générales
var url = "http://www.lawebcamdubureau.com";
var title = "La webcam du bureau";
function makeLink(){
if(document.all)
window.external.AddFavorite(url,title)
}

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;
}

// 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.location.href="/presse/index.html";
xt_clic('N','presse');
}
function contact() {
alert('Prochainement');
//window.location.href="/contact.html";
xt_clic('N','contact');
}

// 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 paramètres
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 création du tableau des paramètres
var urlParam = TJSExtraireParam();

// Acces Episode1
function verif(){
if (document.formep01.WORD.value == "webcam") {
window.location.href="webcam_s2_e1_fr.htm" 
} 
else {
alert("Désolé, 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');
}

//Barnabé
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');
}

