// JavaScript Document

var bo_ns_id = 0;

function startIeFix(){
  if(isIE()){
    document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');
  }
}

function endIeFix(){
  if(isIE()){
    document.write('</div>');
    var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);
    var theCode = theObject.innerHTML;
    theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))
    document.write(theCode);
  }
}

function isIE(){
  // only for Win IE 6+
  // But not in Windows 98, Me, NT 4.0, 2000
  var strBrwsr= navigator.userAgent.toLowerCase();
  if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){
    if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){
      return false;
    }
    if(strBrwsr.indexOf("win98") > -1 ||
       strBrwsr.indexOf("win 9x 4.90") > -1 ||
       strBrwsr.indexOf("winnt4.0") > -1 ||
       strBrwsr.indexOf("windows nt 5.0") > -1)
    {
      return false;
    }
    return true;
  }else{
    return false;
  }
}

function popVideoWin( atomid) {

	Page = "../FlashPlayer/index.php?ID="+atomid;
	Title = "AlouetteFLVPlayer";
	scrbar = "no";
	w = 415;
	h = 350;

	LPos = (screen.width - w)/2;
	TPos = (screen.height - h)/2;
		
		window.open(Page,Title,"height="+h+",width="+w+",scrollbars="+scrbar+",resizable=0,maximize=no,left="+LPos+", top="+TPos);
	
}

function popWin() {

	Page = "../Player/";
	Title = "AlouetteMP3Player";
	scrbar = "no";
	w = 300;
	h = 288;
	
	LPos = (screen.width - w)/2;
	TPos = (screen.height - h)/2;
	
	what = navigator.userAgent;
	if ( (what.indexOf('Safari') > 0) || (what.indexOf('Firefox') > 0))
		window.location="../Ecouter/";
	else
		window.open(Page,Title,"height="+h+",width="+w+",scrollbars="+scrbar+",resizable=0,maximize=no,left="+LPos+", top="+TPos);
	
}

function popDownload() {

	Page = "../ThirdParty/";
	Title = "AlouetteTelechargement";
	scrbar = "yes";
	w = 800;
	h = 600;
	
	LPos = (screen.width - w)/2;
	TPos = (screen.height - h)/2;
		
		window.open(Page,Title,"height="+h+",width="+w+",scrollbars="+scrbar+",resizable=true,maximize=no,left="+LPos+", top="+TPos);
	
}

function popAcheter() {

	Page = "../ThirdParty/Acheter.php";
	Title = "AlouetteAchat";
	scrbar = "yes";
	w = 800;
	h = 600;
	
	LPos = (screen.width - w)/2;
	TPos = (screen.height - h)/2;
		
		window.open(Page,Title,"height="+h+",width="+w+",scrollbars="+scrbar+",resizable=1,maximize=no,left="+LPos+", top="+TPos);
	
}