function bigPic(url,width,height) {
  eval("var f=window.open('/bigPic.asp?s=" + url + "','_blank','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + width + ",height=" + height + "');f.focus();");
}

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('dokumenti/privacy_policy.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}

function open_pp2(){
	open_wnd('html/dokumenti/privacy_policy.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}


function open_help(){
	open_wnd('dokumenti/help.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}
function open_sms(){
	open_wnd('dokumenti/sms.html','pop',450,460,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}

function open_ecard( sId ){
  open_wnd('/html/zabava/e-cards/preload_preview.asp'+ sId +'','pop',750,470);
}

function open_corp(){
	open_html('info/povijest/start.html');
}

function open_obrazac(){
	open_html('info/zaposlite_se/turing.asp');
}

function open_banner(){
	open_html('restorani/mctrazilica.html');
}

	function open_quality(){
		open_html('info/kvaliteta_hrane/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('contact/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.asp?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();
}