// Stand: 13. Oktober 2006
// Autor: Robin Kump
// ----------------------------------------------------------------------


// Image PopUp (Begin)
// ----------------------------------------------------------------------

function openImageWindow(URL,Language) {

	if ((URL.search(/^http:\/\//) > -1) && (URL.indexOf(window.location.hostname) > -1)) {
		URL = URL.replace(/^http:\/\/.+\/(1\d\d\d\d\d\d\/.+)/,"$1");
	}
	
	if (navigator.appName == "Netscape" && parseInt(navigator.appVersion.charAt(0)) < 5) {
		window.open(URL,"_blank","").focus();
	}
	else {
		var Properties = "width=250,height=100,left="+((screen.availWidth-(250+10))/2)+",top="+((screen.availHeight-(100+36))/2)+",scrollbars=yes,menubar=no,toolbar=no,location=no,status=no,resizable=no";
		var filepath = "/fsi-internet/module_fsi-internet/html/master/popup/"+Language+".htm?"+URL;
		if (Language.search(/\bDE\b|\bEN\b|\bTR\b|\bRU\b|\bPL\b|\bl1\b|\bl2\b/) != -1) {
			window.open(filepath,"METRO Group Future Store Initiative",Properties).focus();
    	}
    	else {
			window.open("/fsi-internet/module_fsi-internet/html/master/popup/EN.htm?"+URL,"METRO Group Future Store Initiative", Properties).focus();
		}
	}
}
// ----------------------------------------------------------------------
// Image PopUp (End)

// Stream PopUp (Begin)
// ----------------------------------------------------------------------

function openStreamWindow(Player,URL,VideoWidth,VideoHeight,Language) {

	switch(Player) {
	case "MP":
	var StreamWidth = VideoWidth;
	var StreamHeight = VideoHeight + 47;
	var WindowWidth = StreamWidth + 30;
	var WindowHeight = StreamHeight + 60;
	var xpos = Math.max(0,(screen.availWidth-(WindowWidth+10))/2);
	var ypos = Math.max(0,(screen.availHeight-(WindowHeight+36))/2);
	var Parameters = 'StreamURL=' + escape(URL) + '&StreamWidth=' + StreamWidth + '&StreamHeight=' + StreamHeight;
	var Properties = "width="+WindowWidth+",height="+WindowHeight+",left="+xpos+",top="+ypos+",scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,status=no,copyhistory=no";
	var filepath = "/fsi-internet/module_fsi-internet/html/master/popup/"+Language+".htm?"+Parameters;

	if (Language.search(/\bDE\b|\bEN\b|\bTR\b|\bRU\b|\bPL\b|\bl1\b|\bl2\b/) != -1) {
		window.open(filepath,"METRO Group Future Store Initiative",Properties).focus();
  	}
	else {
		window.open("/fsi-internet/module_fsi-internet/html/master/popup/EN.htm?"+Parameters,"_blank",Properties).focus();
	}
    break;

	case "RP":
	var StreamWidth = VideoWidth;
	var StreamHeight = VideoHeight;
	var WindowWidth = StreamWidth + 30;
	var WindowHeight = StreamHeight + 90;
	var xpos = Math.max(0,(screen.availWidth-(WindowWidth+10))/2);
	var ypos = Math.max(0,(screen.availHeight-(WindowHeight+36))/2);
	var Parameters = 'StreamURL=' + escape(URL) + '&StreamWidth=' + StreamWidth + '&StreamHeight=' + StreamHeight;
	var Properties = "width="+WindowWidth+",height="+WindowHeight+",left="+xpos+",top="+ypos+",scrollbars=no,resizable=no,toolbar=no,location=no,directories=no,status=no,copyhistory=no";
	var filepath = "/fsi-internet/module_fsi-internet/html/master/popup/"+Language+".htm?"+Parameters;

	if (Language.search(/\bDE\b|\bEN\b|\bTR\b|\bRU\b|\bPL\b|\bl1\b|\bl2\b/) != -1) {
		window.open(filepath,"METRO Group Future Store Initiative",Properties).focus();
  	}
	else {
		window.open("/fsi-internet/module_fsi-internet/html/master/popup/EN.htm?"+Parameters,"_blank",Properties).focus();
	}
    break;
    }
}
// ----------------------------------------------------------------------
// Stream PopUp (End)
