if (document.getElementById) {
  window.GetObject = function(id) {
    return document.getElementById(id);
  }
} else if (document.all) {
  window.GetObject = function(id) {
    return document.all[id]
  }
} else {
  window.GetObject = function(id) {
    return false;
  }
}


function verifSuppAlbum (formName,msg,from){
  if (confirm(msg)){
    if(from=="voir_albums")
      document.forms[formName].action="../album/index.php?fuseaction=supprimer_album&from=voir_albums";
    else
      document.forms[formName].action="../album/index.php?fuseaction=supprimer_album";
    document.forms[formName].submit();
  }
}

function pop_vipix(pays,langue) {
  window.open('http://www.pixmania.com/'+pays+'/'+langue+'/s_action/VIPix2/index.html', 'myPIXmania');
  //window.open('../VIPix/popupVIPix.php', 'myPIXmania', config='height=600, width=700, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
}

function pop_promo_happy_hour(){
  pop_tarif=window.open('../home/popup_happy_hour.php','popup_happy_hour','width=670,height=355');
}
function pop_promo_stval(){
  pop_tarif_stval=window.open('../home/popup/popup_pomo_fotofantaisie.php','popup_ST_VAL','width=370,height=340');
}
function pop_promo_uk() {
    pop_tarif=window.open('../home/offre_uk.php','popup','width=530,height=240');
}
function pop_promo() {
  pop_tarif=window.open('../home/offre.php','popup','width=600,height=250');
}
function pop_promo2() {
  pop_tarif=window.open('../home/offre2.php','popup2','width=350,height=150');
}
function pop_promo3() {
  pop_tarif=window.open('../home/offre3.php','popup3','width=350,height=160');
}
function pop_promo_happy_hour() {
  pop_tarif=window.open('../home/popup_happy_hour.php','popup_happy_hour','width=670,height=355');
}
function pop_promo_stval() {
  pop_tarif_stval=window.open('../home/popup/popup_pomo_fotofantaisie.php','popup_ST_VAL','width=370,height=340');
}

function pop_promo_formats_numeriques(){
  window.open('../home/popup/popup_promo_formats_numeriques.php', '', 'width=269,height=323');
}

function popup_pack(){
  window.open("../home/popup/popup_packphoto.php","pop1","width=570,height=420");
}

window.defaultStatus = "myPIXmania";
Xoffset = 0;    // modify these values to ...
Yoffset = 20;    // change the popup position.

var old,skn,iex = (document.all);
var yyy = -1000;

var ns4 = document.layers;
var ns6 = document.getElementById&&!document.all;
var ie4 = document.all;

function init_info_bulle() {
  if (ns4) {
    skn=document.dek;
  } else if (ns6) {
    skn=document.getElementById("dek").style;
  } else if (ie4) {
    skn=document.all.dek.style;
  }

  if (ns4) {
    document.captureEvents(Event.MOUSEMOVE);
  } else {
    skn.visibility="visible"
    skn.display="none"
  }

  document.onmousemove = get_mouse;
}

function info_bulle_doud(msg, bak) {
  var content = "<TABLE cellSpacing='0' cellPadding='0' border='1' Bordercolor='#000000' "+"BGCOLOR=" + bak + "><TD vAlign='top'><FONT COLOR='white' SIZE='1' FACE='verdana'>" + msg + "</FONT></TD></TABLE>";
  yyy=Yoffset;
  if (ns4) {
   skn.document.write(content);skn.document.close();skn.visibility="visible"
  }
  if (ns6) {
   document.getElementById("dek").innerHTML=content;skn.display=''
  }
  if (ie4) {
   document.all("dek").innerHTML=content;skn.display=''
  }
}

function get_mouse(e){
  var x = (ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
  skn.left = x + Xoffset;
  var y = (ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
  skn.top = y + yyy;
}

function kill() {
  yyy = -1000;
  if (ns4) {
    skn.visibility="hidden";
  } else if (ns6||ie4) {
    skn.display="none";
  }
}

function MM_openBrWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

function manageKeys(e) {
  if (!e) var e = window.event;

  var targ;
  if (e.target) targ = e.target;
  else if (e.srcElement) targ = e.srcElement;

  switch (targ.tagName) {
    case 'SELECT':
    case 'INPUT':
    case 'TEXTAREA':
      return;
      break;
  }

  k = e.keyCode;

  if (typeof(oTest) != 'undefined') {
    oTest.value = k;
  }

  if (typeof(keyMapping) == "undefined") {
    return;
  }

  if (typeof(keyMapping[k]) != "undefined") {
    eval(keyMapping[k]);
  }
}

function confirmDelete() {
  if (confirm('Etes vous-sūr ?')) {
    return true;
  } else {
    return false;
  }
}

//aide ą parcourir une arbo DOM
function getSpecificsChilds(element,type){
  retour = new Array();
  j = 0;
  for(var i = 0 ; i < element.childNodes.length ; i++){
    if (element.childNodes[i].nodeName == type){
      //alert(element.childNodes[i]);
      retour[j] = element.childNodes[i];
      j++
    }
  }
  return retour;
}

function session_keeper() {
	if (self.setInterval) {
	  var code = "var i = new Image();\n";
	  code += "r = Math.floor(10000000*Math.random());\n";
	  code += "i.src = '../image/all_language/session_keeper.php?r=' + r ;\n";
	  code += "delete(i)\n";

	  // toutes les cinq minutes
	  self.setInterval(code, 5*60*1000);
  }
}

function tt_Show() {
	return;
}

function tt_Show2() {
	return;
}

