function blockswitch(bid) {
  var bhe  = document.getElementById('he'+bid);
  var bfo  = document.getElementById('fo'+bid);
  var bimg = document.getElementById('img'+bid);
  if (bhe && bhe.style.display=="none") 
  {
    bhe.style.display="";
  } 
  else 
  {
    if (bhe) 
    { 
      bhe.style.display="none"; 
    }
  }
  if (bfo && bfo.style.display=="none") 
  {
    bfo.style.display="";
  } 
  else 
  {
    if (bfo) 
    { 
      bfo.style.display="none"; 
    }
  }
  if (bimg && bimg.src.indexOf("hidepart.gif")>=0) 
  {
    bimg.src="images/showpart.gif";
    bimg.alt="Afficher";
  } 
  else 
  {
    if (bimg) 
    { 
      bimg.src="images/hidepart.gif"; 
      bimg.alt="Cacher";
    }
  }
}
function columnswitch() {
  var bcol1  = document.getElementById('col1');
  var bcol3  = document.getElementById('col3');
  var bimg = document.getElementById('imgcolswitch');
  if (bcol1 && bcol1.style.display=="none") {
    bcol1.style.display="";
  } else {
    if (bcol1) { bcol1.style.display="none"; }
  }
  if (bcol3 && bcol3.style.display=="none") {
    bcol3.style.display="";
  } else {
    if (bcol3) { bcol3.style.display="none"; }
  }
  if (bimg && bimg.src.indexOf("hidecol.gif")>=0) {
    bimg.src="images/showcol.gif";
    bimg.alt="Afficher les menus";
  } else {
    if (bimg) { 
     bimg.src="images/hidecol.gif"; 
     bimg.alt="Afficher plein écran";
    }
  }
  
}

function launchPlayerWin(url, name, divide) {
	var py = (screen.availHeight-580)/divide;
	var px = (screen.availWidth-768)/divide;
	var str = "left=" + px + ",screenX=" + px + ",top=" + py + ",screenY=" + py ;

	if (window.screen) {
	  var ah = 370;
	  var aw = 625;
	  str += ",height=" + ah;
	  str += ",innerHeight=" + ah;
	  str += ",width=" + aw;
	  str += ",innerWidth=" + aw;
	  str += ",scrollbars=no";
	  // str += ",toolbar=yes";
	  // if toolbar needed
	  //str += ",resizable"; // so the user can resize the window manually
	} else {
	  str += ""; 
	  //str += ",resizable"; // so the user can resize the window manually
	}

	return window.open(url, name, str);
}

function launchDialogWin(url, name, divide, aw, ah) {
	var py = (screen.availHeight-580)/divide;
	var px = (screen.availWidth-768)/divide;
	var str = "left=" + px + ",screenX=" + px + ",top=" + py + ",screenY=" + py ;

	if (window.screen) {
//	  var ah = 370;
//	  var aw = 625;
	  str += ",height=" + ah;
	  str += ",innerHeight=" + ah;
	  str += ",width=" + aw;
	  str += ",innerWidth=" + aw;
	  str += ",scrollbars=no";
	  str += ",toolbar=no";
	  str += ",statusbar=no";
	  // if toolbar needed
	  //str += ",resizable"; // so the user can resize the window manually
	} else {
	  str += ""; 
	  //str += ",resizable"; // so the user can resize the window manually
	}

	return window.open(url, name, str);
}
