/*
open popUp window from flash
*/

function openPopUp(popName) {
	// set parameters
	noPopup = false;
	popWidth = 720;
	popHeight = 502;
	if(popName == 'aufstehn')
	{
		popWidth = 1018;
		popHeight = 660;
		popUrl = '../aufstehn/index.asp';
	};
	if(popName == 'emspektakel')
	{
		popWidth = 900;
		popHeight = 700;
		popUrl = '../emspektakel/index.html';
	};	
	if(popName == 'nutellago')
	{
		popWidth = 800;
		popHeight = 600;
		popUrl = '../go/index.html';
	};
	
	if(popName == 'tvspots')
	{
		popWidth = 752;
		popHeight = 648;
		popUrl = '../spots/index.html';
	};	
	if (popName == 'impressum') 
	{ 
		popWidth = 421;
		popHeight = 500;
		popUrl = '../aufstehn/html/impressum.html' 
	};
	if (popName == 'newsletter') 
	{ 
		popWidth = 421;
		popHeight = 500;
		popUrl = '../aspnet/newsletter.aspx' 
	};
	if (popName == 'faq') 
	{ 
		popWidth = 421;
		popHeight = 500;
		popUrl = '../aufstehn/html/faq.html' 
	};
	if (popName == 'fragen') 
	{ 
		popWidth = 500;
		popHeight = 700;
		popUrl = '../aufstehn/html/produktinfos.html' 
	};
	if (popName == 'produkt') 
	{ 
		popWidth = 500;
		popHeight = 700;
		popUrl = '../aufstehn/html/produktinfos.html' 
	};
	if(popName == 'asse')
	{
		popWidth = 800;
		popHeight = 600;
		popUrl = '5asse/5_asse_start.html ';
	};
	if (popName == 'just') 
	{ 
		popWidth = 1000;
		popHeight = 550;
		popUrl = 'http://www.justsports.de/';
	};
	if (popName == 'datenschutz') 
	{ 
		popWidth = 421;
		popHeight = 500;
		popUrl = 'site/html/datenschutz.html' 
	};
	if (popName == 'kontakt') 
	{ 
		popWidth = 1013;
		popHeight = 610;
		popUrl = 'http://www.ferrero.de/metanav/service/fragen.aspx' 
	};
	if (popName == 'elfmeterkiller') 
	{ 
		noPopup = true;
		popUrl = '../elfmeterkiller/' 
	};
	if (popName == 'wmf') 
	{ 
		popWidth = 800;
		popHeight = 600;
		popUrl = 'http://www.nutella.de/wmf/';
	};
	if (popName == 'kunstwettbewerb') 
	{ 
		popWidth = 1000;
		popHeight = 600;
		popUrl = 'http://www.nutella-kunstwettbewerb.de';
	};
	if (popName == 'fanconnection') 
	{ 
		popWidth = 1024;
		popHeight = 605;
		popUrl = 'http://www.fanconnection.de';
	};
	if (popName == 'buch_teilnahmebedingungen') 
	{ 
		popWidth = 421;
		popHeight = 500;
		popUrl = 'site/html/tbdg_kochbuch.html';
	};
	
	//
	// calculate coordinates for centering
	posX = (screen.width / 2) - (popWidth / 2);
	posY = (screen.height / 2) - (popHeight / 2);
	// open window
	if (noPopup) {
		popWindow = open(popUrl,popName); // url & name, only
	} else {
		popWindow = open(
			popUrl,popName, // url & name
			'width=' + popWidth + ',height=' + popHeight + ',' + // dimensions
			'top=' + posY + ',left=' + posX + ',' + // position
			'scrollbars="no"' // window attributes
		);
	}
	// set focus
	popWindow.focus();
}