function open_fifa(){
		open_html('company/service/fifa.html');
	}
function open_employment(){
		open_html('company/service/employment.php');
	}
function open_resto(){
		open_html('company/service/resto.html');
}
function open_imprint(){
	open_wnd('../html/law/copyright.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}
function open_pp(){
	open_wnd('../html/law/privacy.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}

function open_help(){
	open_wnd('../html/law/help.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}
function open_sms_cancel(){
	open_wnd('../html/law/sms.html','pop',350,300,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}

function open_corp(){
	open_html('company/ueber_uns/start.html');
}
	function open_quality(){
		open_html('company/qualitaet/start.html');
	}

function open_restaurants(){
	open_html('restaurants/start.html');
}
	function open_mcfinder(){
		open_wnd('http://customer.map24.com/mcdonalds2/mcdonalds.php','pop',750,470);
	}
	function open_rest_inside(){
		open_wnd('/html/restaurants/storetour/index.html','pop',800,520);
	}
	function open_storetour(){
		open_wnd('/html/restaurants/storetour/index.html','pop',800,520);
	}
function open_products(){
	open_html('products/frame.html');
}
function open_lounge(){
	open_html('https://db.mcdonalds.de');
}
function open_press(){
	open_html('press/releases/start.html');
}
function open_contact(){
	open_html('company/service/start.html');

}
function open_quality(){
	open_html('company/qualitaet/start.html');
}

function open_html(loadfor){
	var breite=780;
	var hoehe=560;
	LeftPosition=(screen.width)?(screen.width-breite)/2:100;
	TopPosition=(screen.height)?(screen.height-hoehe-80)/2:100;
	winProperties='status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=no,top='+TopPosition+',left='+LeftPosition;
	//open_wnd('/html/index_frame.php?html='+loadfor,'html',breite,hoehe,winProperties);
	open_wnd('../html/index_frame.html?'+loadfor,'html',breite,hoehe,winProperties);
}

//------------------------------------------------------------------------------------//

function OS_Check(){
  var userPlat = "unknown";
  var navInfo = navigator.appVersion;
  if (navInfo.indexOf("Win") != -1)
    userPlat = "Win";
  else if(navInfo.indexOf("Macintosh") != -1)
    userPlat = "PPC";
  else if(navInfo.indexOf("Mac_PowerPC") != -1)
    userPlat = "PPC";
  else if(navInfo.indexOf("68K") != -1)
    userPlat = "68K";
  return userPlat;
}

//------------------------------------------------------------------------------------//

var wnd = null;
var gUserOS = OS_Check();

function open_wnd(url,winName,breite,hoehe,props){
//<script language="Javascript" src="functions.js"></script>
//javascript:open_wnd('url.html','fenster',100,100,'resizable=yes')

if (!winName){winName = "openwnd";}

if (props==''){winProperties="status=no,menubar=no,resizable=no,directories=no,locationbar=no";}
else winProperties=props;


if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 &&  gUserOS == "PPC"){
	breite=breite-20;
	hoehe=hoehe-20;
}

winProperties+=",width=" + breite + ",height=" + hoehe;


if(wnd){
	if(wnd.closed)
		wnd  = null
	else
		wnd.close();
}
wnd=window.open(url, winName, winProperties);
wnd.focus();
}

//------------------------------------------------------------------------------------//

function ValidateForm(form) {
var have_to = "Folgende Felder muessen noch ausgefuellt werden:\n\n";
var errors = "";
var msg = "";
	for (var i=0;i < pairs.length;i++) {
	   for (var msg in pairs[i])
		if (eval("form."+msg+".value")==""){
			errors += " - " + pairs[i][msg] + "\n";
			if (i == 0){eval("form."+msg+".focus()");}
		}
	}
	if (errors){
		alert(have_to + errors);
		return;
	}
	form.submit();
}
