//===========================================================
function openStudentPlayerOR(){
	alert("Le site est actuellement en train d’être mis à jour. La démo sera en ligne Samedi 29 novembre.");
}

//===========================================================
function openStudentPlayer(){
	// Set according to screen size
	if (screen.availWidth > 1024 && screen.availHeight > 768) {
		var URLStr = "http://menoyot.com/ESv1/loadPlayerLg.html";
		//var URLStr = "http://localhost/ESv1/loadPlayerLg.html";
		//var URLStr = "../ESv1/loadPlayerLg.html";
		var myWidth = 1024;
		var myHeight = 768;
	} else {
		var URLStr = "http://menoyot.com/ESv1/loadPlayer.html";
		//var URLStr = "http://localhost/ESv1/loadPlayer.html";
		//var URLStr = "../ESv1/loadPlayer.html";
		var myWidth = 980;
		var myHeight = 735;
	}
	var myPosX = Number((screen.availWidth - myWidth)/2);
	var myPosY = Number((screen.availHeight - myHeight)/2);
	myWin = window.open(URLStr,'EasySkankingPlayer','resizable=yes,menubar=no,titlebar=no,toolbar=no,scrollbars=no,status=no,directories=no,height=' + myHeight + ',width=' + myWidth + ',top=' + myPosY + ',left=' +myPosX);
	myWin.focus();
}
//===========================================================
function openWizardPlayerOR(){
	alert("Le site est actuellement en train d’être mis à jour. La démo sera en ligne Samedi 29 novembre.");
}
//===========================================================
function openWizardPlayer(){
	// Set according to screen size
	if (screen.availWidth > 1024 && screen.availHeight > 768) {
		var URLStr = "http://menoyot.com/ESv1/loadWizardLg.html";
		//var URLStr = "http://localhost/ESv1/loadWizardLg.html";
		//var URLStr = "../ESv1/loadWizardLg.html";
		var myWidth = 1024;
		var myHeight = 768;
	} else {
		var URLStr = "http://menoyot.com/ESv1/loadWizard.html";
		//var URLStr = "http://localhost/ESv1/loadWizard.html";
		//var URLStr = "../ESv1/loadWizard.html";
		var myWidth = 980;
		var myHeight = 735;
	}
	var myPosX = Number((screen.availWidth - myWidth)/2);
	var myPosY = Number((screen.availHeight - myHeight)/2);
	myWin = window.open(URLStr,'EasySkankingPlayer','resizable=yes,menubar=no,titlebar=no,toolbar=no,scrollbars=no,status=no,directories=no,height=' + myHeight + ',width=' + myWidth + ',top=' + myPosY + ',left=' +myPosX);
	myWin.focus();
}
//===========================================================
function openCleanSOOR(){
	alert("Le site est actuellement en train d’être mis à jour. La démo sera en ligne Samedi 29 novembre.");
}
//===========================================================
function openCleanSO(){
	var URLStr = "http://menoyot.com/ESv1/Tools/cleanSO.html";
	//var URLStr = "http://localhost/ESv1/Tools/cleanSO.html";
	//var URLStr = "../ESv1/cleanSO.html";
	var myWidth = 620;
	var myHeight = 560;
	var myPosX = Number((screen.availWidth - myWidth)/2);
	var myPosY = Number((screen.availHeight - myHeight)/2);
	myWin = window.open(URLStr,'EasySkankingPlayer','resizable=yes,menubar=no,titlebar=no,toolbar=no,scrollbars=no,status=no,directories=no,height=' + myHeight + ',width=' + myWidth + ',top=' + myPosY + ',left=' +myPosX);
	myWin.focus();
}
//===========================================================
//function goCleaner(url) {
	//myWin = window.open(url,'Cleaner','resizable,height=550,width=620,top=0,left=0');
	//myWin.focus();
// }
 //===========================================================
 function getBrowserVersion() {
  var userAgent=navigator.userAgent, version=0;
  if (userAgent.indexOf('Netscape') != -1) {
	  version = parseFloat(userAgent.substring(userAgent.indexOf('Netscape')+9,userAgent.length));
	if (version < 8.0) {
		document.write("<FONT color=red><strong> You must upgrade to a more recent version.</strong></font>");
	} else {
		document.write("Your browser is fine.");
	}
	
  } else if (userAgent.indexOf('MSIE') != -1) {
		document.write("<Font color=red><B>Your browser is NOT recommended - See notice below.</B></font></td></TR><tr><td><strong class=style16>Microsoft Explorer Issue</strong>: This browser generates memory errors randomly and closes the application without prior notification. We suggest that you choose rather the Free <a href=http://www.firefox.com target=_blank>Mozilla FireFox v.2</a>, or <a href=http://www.opera.com target=_blank>Opera v.9</a>. These two browsers are much more dependable for viewing the demos below.</td></TR>");
   } else if (userAgent.indexOf('Firefox') != -1) {
	   version = parseFloat(userAgent.substring(userAgent.indexOf('Firefox')+8,userAgent.length));
	if (version < 2) {
		document.write("<FONT color=red><strong> You are using Firefox version " + version + ". You should upgrade to a more recent version.</strong></font>");
	} else {
		document.write("Your browser is perfect.");
	}
	
	} else if (userAgent.indexOf('Opera') != -1) {
		 version = parseFloat(userAgent.substring(userAgent.indexOf('Opera')+6,userAgent.length));
		if (version < 9) {
			document.write("<FONT color=red><strong> You are using Opera version " + version + ". You should upgrade to a more recent version.</strong></font> <font color=red>Linux version not fully supported.</font>");
		} else {
			document.write("Your browser is fine. <font color=red>Linux version not fully supported.</font>");
		}
  } else {
	document.write("<FONT color=red><strong> This site currently requires MS Internet Explorer v7, Firefox v2, Netscape v8 or Opera v9.</strong></font>");
  }
}
function getBrowserVersionFR() {
  var userAgent=navigator.userAgent, version=0;
  if (userAgent.indexOf('Netscape') != -1) {
	  version = parseFloat(userAgent.substring(userAgent.indexOf('Netscape')+9,userAgent.length));
	if (version < 8.1) {
		document.write("<FONT color=red><strong> Vous devriez installer une version plus r?ente.</strong></font>");
	} else {
		document.write("Votre navigateur est correct.");
	}
	
  } else if (userAgent.indexOf('MSIE') != -1) {
	  document.write("<Font color=red><b>Votre navigateur N'EST PAS recommand? voyez la note ci-dessous.</b></font></TD></TR><tr><td><p><strong class=style22>Microsoft Explorer - Attention</strong>: Ce navigateur semble  provoquer des erreurs de m&eacute;moire et ferme l&rsquo;application sans notice pr&eacute;alable. Nous  vous sugg&eacute;rons de choisir un des deux navigateurs suivants  qui sont gratuits&nbsp;:  <a href=http://www.firefox.com target=_blank>Mozilla FireFox v.2</a>, ou <a href=http://www.opera.com target=_blank>Opera v.9</a>. Ces deux  navigateurs sont bien plus fiables pour les d&eacute;mos ci-dessous du logiciel.</p></TD></TR>");
   } else if (userAgent.indexOf('Firefox') != -1) {
	   version = parseFloat(userAgent.substring(userAgent.indexOf('Firefox')+8,userAgent.length));
		if (version < 2) {
			document.write("<FONT color=red><strong> Vous utilisez Firefox version " + version + ". Vous devriez installer une version plus r?ente.</strong></font>");
		} else {
			document.write("Votre navigateur est parfait.");
		}
	
	} else if (userAgent.indexOf('Opera') != -1) {
		version = parseFloat(userAgent.substring(userAgent.indexOf('Opera')+6,userAgent.length));
		if (version < 9) {
			document.write("<FONT color=red><strong> Vous utilisez Opera version " + version + ". Vous devriez installer une version plus r?ente.</strong></font> <font color=red>Version Linux pas vraiment compatible.</font>");
		} else {
			document.write("Votre navigateur est correct. <font color=red>Version Linux pas vraiment compatible.</font>");
		}
	
  } else {
	document.write("<FONT color=red><strong> Ce site exige MS Internet Explorer v7 ou Firefox v2.</strong></font>");
  }
}
// JavaScript Document
function MM_checkBrowser(NSvers,NSpass,NSnoPass,IEvers,IEpass,IEnoPass,OBpass,URL,altURL) { //v5.0
  var newURL='demos.html', userAgent=navigator.userAgent, version=0;
  if (userAgent.indexOf('Netscape') != -1) {
	version = parseFloat(userAgent.substring(userAgent.indexOf('Netscape')+9,userAgent.length));
	if (version >= NSvers) {if (NSpass>0) newURL=(NSpass==1)?URL:altURL;}
	else {if (NSnoPass>0) newURL=(NSnoPass==1)?URL:altURL;}
  } else if ((userAgent.indexOf('MSIE') != -1) ||  (userAgent.indexOf('Firefox') != -1) ||  (userAgent.indexOf('Opera') != -1)) {
	version = parseFloat(userAgent.substring(userAgent.indexOf('MSIE')+4,userAgent.length));
	if (version >= IEvers)
	 {if (IEpass>0) newURL=(IEpass==1)?URL:altURL;}
	else {if (IEnoPass>0) newURL=(IEnoPass==1)?URL:altURL;}
  } else if (OBpass>0) newURL=(OBpass==1)?URL:altURL;
  if (newURL) { window.location=unescape(newURL); document.MM_returnValue=false; }
}
function goDemoPage(){
	MM_checkBrowser(4.0,0,0,4.0,1,1,0,'demosRun.html','');
}
function goDemoPageFR(){
	MM_checkBrowser(4.0,0,0,4.0,1,1,0,'demosRunFr.html','');
}
function goFrenchSite(){
	window.location="indexFr.html";
}

function translateNow() {
	var Url = location.href;
	var pageLang = "fr";
	if (navigator.appName == 'Netscape')
    	var language = navigator.language;
	else
    	var language = navigator.browserLanguage;
	var userLang = language.substring(0,2);
	if (userLang == pageLang) userLang = "en";
	//alert(userLang);
	var dest = "http://translate.google.com/translate?js=y&prev=_t&hl=es&ie=UTF-8&layout=1&eotf=1&u=" + Url + "&sl=" + pageLang + "&tl=" + userLang;
	//alert(dest);
	newwindow = window.open(dest,'Translation');
	if (window.focus) {newwindow.focus()}

 }
 
 function translateFR() {
	var Url = location.href;
	var pageLang = "en";
	if (navigator.appName == 'Netscape')
    	var language = navigator.language;
	else
    	var language = navigator.browserLanguage;
	var userLang = "fr";
	//alert(userLang);
	var dest = "http://translate.google.com/translate?js=y&prev=_t&hl=es&ie=UTF-8&layout=1&eotf=1&u=" + Url + "&sl=" + pageLang + "&tl=" + userLang;
	//alert(dest);
	newwindow = window.open(dest,'Translation');
	if (window.focus) {newwindow.focus()}

 }