function open_teaser(){
	open_wnd('/Static/shared/popup/teaser.htm','pop',600,401,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=no');
}

function open_imprint(){
	open_wnd('/Static/html/servis/copyright.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}
function open_pp(){
	open_wnd('/Static/html/servis/zasebnost.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}

function open_help(){
	open_wnd('/Static/html/servis/pomoc.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}
function open_sms_cancel(){
	open_wnd('/Static/html/servis/sms.html','pop',350,300,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}

function open_gsm(){
	open_wnd('/Static/html/servis/gsm.html','pop',400,500,'status=no,menubar=no,resizable=no,directories=no,locationbar=no,scrollbars=yes');
}

function open_job() {
	open_html('/Static/html/zaposlovanje/start.html');
}
function open_corp(){
	open_html('/Static/html/podjetje/predstavitev/start.html');
}
function open_quality(){
	open_html('/Static/html/podjetje/kakovost/start.html');
}
function open_restaurants(){
	open_html('/html/restavracije/restavracije.html');
}
function open_products(){
	open_html('/Static/html/izdelki/frame.html');
}
function open_contact(){
	open_html('/Static/html/kontakti/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('/Static/html/index_frame.html?'+loadfor,'html',breite,hoehe,winProperties);
}
function open_ekartica(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(loadfor,'ekartica',breite,hoehe,winProperties);
}
function open_epredogled(dooseba, domail, odoseba, odmail, sporocilo, karticaid){
	loadwhere='/ekartice_preview.html?a=predogled&k='+karticaid
	loadwhere+='&s='+escape(sporocilo)
	loadwhere+='&i='+escape(dooseba)
	loadwhere+='&e='+escape(domail)
	loadwhere+='&m='+escape(odoseba)
	loadwhere+='&j='+escape(odmail)
	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(loadwhere,'ekartica',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();
}
var loadwhere=''

wnd=window.open(loadwhere+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();
}
function LogAccess(myImg, myReason, myArguments) {
//	var loadwhere='dostop.asp';
//	if (location.pathname.indexOf('/worlds/')>0 || location.pathname.indexOf('/html/')>0) loadwhere='../'+loadwhere;
//	myImg.src='dostop.asp?l='+location.host+location.pathname+'&r='+myReason+'&a='+myArguments;
}