var my_sid = "";
var my_catid = "";

var sh_query = "";

var my_loca = "root";
var my_shoploc = "";
var my_navipos = -1;

var of_catid = "";

var al_gotomain = "";
var al_gotomenu = "";
var al_gototitle = "";
var al_gotolabel = "";

var po_loca = "";

var t,s;

var base_href;
  base_href = location.href;
  p = base_href.lastIndexOf("/");
  if(p<0) p = base_href.IndexOf("://");
  base_href = (p<0) ? "http://www.kalbacher.ch/" : base_href.substr(0,p+1);
	// alert("href test: "+base_href);

function CartIsImportant() {
	if (top.mainframe.site.menu)  {
		if (top.mainframe.site.menu.document.title.indexOf("ShopCart")>=0)  {
			return (top.cart_nof>0);
		} else {
    	return false;
		}
	} else {
		return false;
	}
}
function HomepageIsShown() {
	return (top.mainframe.site.document.title=="Fine Wines - Home");
}
function chkMenuHasScroller() {
	if (top.mainframe.site.menu)  {
		return ((top.mainframe.site.menu.document.title=="Fine Wines - Wine Stories") || (top.mainframe.site.menu.document.title=="Fine Wines - VIP-Statements"));
	} else {
  	return false;
	}
}

function setLoca(loca) {
	po_loca = loca;
}
function getLoca() {
	return po_loca;
}
function getLocaCat() {
	return po_loca.substr(0,4);
}

function fgoto_nu(fmain,fmenu,ftitle,flabel,arg) {
	top.al_gotomain = fmain;
	top.al_gotomenu = fmenu;
	top.al_gototitle = ftitle;
	top.al_gotolabel = flabel;
	if (arg=="scroll=true")  {
		top.mainframe.site.location.href = top.docroot+"de/load-fr-scroll.html";
	} else {
		top.mainframe.site.location.href = top.docroot+"de/load-fr.html";
	}
}

function fgotoX(fmain,fmenu) {
	top.al_gotomain = fmain;
	top.al_gotomenu = fmenu;
	top.mainframe.site.location.href = top.docroot+"de/load-fr.html";
}

function appPlatform() {
	if ((navigator.appVersion.indexOf("Mac")>=0) || (navigator.userAgent.indexOf("Mac")>=0)) {
		return "mac";
	} else {
  	return "pc";
	}
}


