/* Javascript file instructions */
if (typeof(navigator.language)!="undefined")lang=navigator.language
else if (typeof(navigator.userLanguage)!="undefined")lang=navigator.userLanguage
else if (typeof(navigator.browserLanguage)!="undefined")lang=navigator.browserLanguage
else	lang="en";

        lang = lang.substr(0,2);
        if (lang=="fr")
        {
                language='fr';
        }
        else if (lang=="de")
        {
                language='de';
        }
        else if (lang=="es")
        {
                language='es';
        }
								else if (lang=="it")
        {
                language='it';
        }
								else
        {
                language='en';
        }

function menuLeftDE_DoFSCommand(command, args) {
  if (command == "action") {
		if ( args.indexOf("javascript:") > -1 ) {
			eval(args.substring(11));
		}
		else {
			window.mainFrame.document.location.href = args;
		}
  }
}
function menuLeftFR_DoFSCommand(command, args) {
  if (command == "action") {
		if ( args.indexOf("javascript:") > -1 ) {
			eval(args.substring(11));
		}
		else {
			window.mainFrame.document.location.href = args;
		}
  }
}
function menuLeftEN_DoFSCommand(command, args) {
  if (command == "action") {
		if ( args.indexOf("javascript:") > -1 ) {
			eval(args.substring(11));
		}
		else {
			window.mainFrame.document.location.href = args;
		}
  }
}
function menuLeftES_DoFSCommand(command, args) {
  if (command == "action") {
		if ( args.indexOf("javascript:") > -1 ) {
			eval(args.substring(11));
		}
		else {
			window.mainFrame.document.location.href = args;
		}
  }
}
function menuLeftIT_DoFSCommand(command, args) {
  if (command == "action") {
		if ( args.indexOf("javascript:") > -1 ) {
			eval(args.substring(11));
		}
		else {
			window.mainFrame.document.location.href = args;
		}
  }
}
// Retrieve USER AGENT from the browser
var agt=navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));

if ( is_ie ) {
  var sParameters = 'browser=ie';
} else {
  var sParameters = 'browser=other';
}

function popscreen(url){
  window.open(url,'ScreenShoot','resizable=yes');
}

function popvideo(url){
  window.open(url,'BandeAnnonce', 'width=400, height=420');
}

function rollover(img, name, i, extension)
{
	if(i == 1)
		img.src = '../images/' + name + '_haut.' + extension;
	else
		img.src = '../images/' + name + '_bas.' + extension;
}

function linktoopener(url) {

opener.location.href = url

}

function midpopup (URL,largeur,hauteur,options) {
	var top = Math.round((screen.height-hauteur)/2);
	var left = Math.round((screen.width-largeur)/2);
	window.open(URL,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}

function calcHeight()
{

	modHeight(10);
	var the_height = 0;
	if ((navigator.userAgent.indexOf("Opera")>-1 && document.getElementById))
	{
		the_height = document.getElementById('mainFrame').contentDocument.document.body.scrollHeight;
	}
	else
	{
		the_height = document.getElementById('mainFrame').contentWindow.document.body.scrollHeight;
	}
 	modHeight(the_height);
}

function modHeight(h)
{
   	document.getElementById('mainFrame').style.height=h;
}

function popup(theURL,winName,features) {
  window.open(theURL,winName,features);
}