var w = screen.availWidth;
var h = screen.availHeight; 
var popW = 150;
var popH = 600;
var leftPos = (w+(w/1.9))/2;topPos = h/10;

function ostern_de(){ ostern('de'); } 
function ostern_en(){ ostern('en'); } 

function ECARD_de(){ ECARD('de'); } 
function ECARD_en(){ ECARD('en'); } 


function ECARD(lang) 
{ 
var wleft =200;
var wtop = 170;
if (lang == 'de')
	{
		seite = 'http://ecard.bayermaterialscience.de/check6.html';
	}else{
		seite = 'http://ecard.bayermaterialscience.de/check_e_6.html';
	}
wshelp = window.open (seite, 'ecard','width=638,height=473,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}

function ostern(lang) 
{ 
var wleft =200;
var wtop = 170;
if (lang == 'de')
	{
		seite = 'http://www.game.bayermaterialscience.de/osterspiel/eastergame_2005_de.html';
	}else{
		seite = 'http://www.game.bayermaterialscience.com/egg-hunting/eastergame_2005_e.html';
	}
wshelp = window.open (seite, 'eastern','width=688,height=535,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}

function xmas(lang) 
{ 

var wleft = 200;
var wtop = 170;
	if (lang == 'de')
	{
		seite = 'http://www.game.bayermaterialscience.de/xmas2005/xmas_window_de.html';
	}else{
		seite = 'http://www.game.bayermaterialscience.com/xmas2005/xmas_window_eng.html';
	}
              
wshelp = window.open (seite, 'get','width=691,height=544,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}


function discovery(lang) 
{ 

var wleft = 200;
var wtop = 170;
	if (lang == 'de')
	{
		seite = 'http://www.game.bayermaterialscience.de/searchpic/window_searchpic.html';
	}else{
		seite = 'http://www.game.bayermaterialscience.com/searchpic/window_searchpic.html';
	}
              
wshelp = window.open (seite, 'discovery','width=691,height=566,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}

function get(lang) 
{ 

var wleft = 200;
var wtop = 170;
	if (lang == 'de')
	{
		seite = 'http://www.game.bayermaterialscience.de/get2/game_get2_de.html';
	}else{
		seite = 'http://www.game.bayermaterialscience.com/get2/game_get2_e.html';
	}
              
wshelp = window.open (seite, 'get','width=691,height=544,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}
function openpopup(page,param1,param2)
{
	var wleft = 150;
	var wtop = 100;
	wshelp = window.open (page, 'Popup','width=' + param1 + ',height=' + param2 + ',location=yes,menubar=yes,status=yes,toolbar=yes,resizable=yes,scrollbars=auto,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
	wshelp.focus();
}

function halloween(lang) 
{ 

var wleft =200;
var wtop = 170;
if (lang == 'de')
	{
		seite = 'b_halloween_de';
      }else if (lang == '1'){

		seite = 'http://www.game.bayermaterialscience.de/halloween/';
     }else if (lang == '2'){

		seite = 'http://www.game.bayermaterialscience.com/halloween/';

       }else{
		seite = 'b_halloween_en';
	}
     
wshelp = window.open (seite, 'halloween','width=690,height=544,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}

function weltreise(lang) 
{ 
var wleft =200;
var wtop = 170;
if (lang == 'de')
	{
		seite = 'b_weltreise_de';
        }else if (lang == '1'){

		seite = 'http://www.weltreise.bayermaterialscience.de/game_2005_de.html';
	}else if (lang == '2'){

		seite = 'http://www.worldtour.bayermaterialscience.com/game_2005_e.html';

	}else{
		seite = 'b_weltreise_en';
	}
wshelp = window.open (seite, 'eastern','width=690,height=544,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}

function brandmatch(lang) 
{ 

var wleft =200;
var wtop = 170;
if (lang == 'de')
	{
		seite = 'b_brandmatch_de';
        }else if (lang == '1'){

		seite = 'http://www.game.bayermaterialscience.de/brandmatch/window_brandmatch.html';
     }else if (lang == '2'){

		seite = 'http://www.game.bayermaterialscience.com/brandmatch/window_brandmatch_eng.html';

       }else{
		seite = 'b_brandmatch_en';
	}
     
wshelp = window.open (seite, 'brandmatch','width=690,height=472,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}

function wm_game(lang) 
{ 

var wleft =200;
var wtop = 170;
if (lang == 'de')
	{
		seite = 'b_wmgame_de';
}else if (lang == '1'){

		seite = 'http://tor.bayerbms.de/wm_2006_de.html';
}else if (lang == '2'){

		seite = 'http://tor.bayerbms.com/wm_2006_e.html';

}else{
		seite = 'b_wmgame_en';
}
     
wshelp = window.open (seite, 'wmgame','width=800,height=600,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}
/************** Für Flash-PopUp auf Homepage **********************/

function openUmfrage(pfad) {
        newfenster = window.open(pfad, 'neuesfenster', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=832,height=698');
  newfenster.focus();
}

function brandsearch(lang) 
{ 

var wleft =200;
var wtop = 170;
if (lang == 'de'){
		seite = 'b_brandsearch_de';
     }else if (lang == '1'){
		seite = 'http://www.game.bayermaterialscience.de/brandsearch/window_brandsearch.html';
     }else if (lang == '2'){
		seite = 'http://www.game.bayermaterialscience.com/brandsearch/window_brandsearch_eng.html';
     }else{
		seite = 'b_brandsearch_en';
}
     
wshelp = window.open (seite, 'brandsearch','width=690,height=472,location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=no,left=' + wleft +',top='+ wtop+'screenY=' + wtop + ',screenX=' +wleft);
wshelp.focus();
}
