// MAIN NAV

var loc = self.location.href;

function swapover(n) {
	if (document.images)
	{
		if (document.images['image_'+n] != null)
		{
			document.images['image_'+n].src = eval("c_" + n + ".src");
		}
	}
}
function swapout(n) 
{
	if (loc.indexOf("/"+n+"/") ==-1)
	{
		if (document.images){document.images['image_'+n].src = eval("b_" + n + ".src");}
	}
} 

var hash=escape(self.location.pathname);
/*if (hash)
{
	var testeradframe = hash.indexOf('adframe');
	if (testeradframe==-1)
	{	
		var testerhtm = hash.indexOf('.htm');
		if (testerhtm == -1)
		{
			hash+='index.html';
		}
		var temp='/cgi-bin/adframe'+hash;
		top.location=temp 
	}
} */

function encodeAdframeUrl(url,adframesessionid)
{
	if ((adframesessionid != '') && (adframesessionid.indexOf("<") == -1) )
	{
		if (url.indexOf('?') > -1)
		{
			url += "&";
		}
		else
		{	
			url += "?" ;
		} 
		url = '/cgi-bin/adframe/'+url+'id='+adframesessionid;
	}
	return url;
}

if (document.images)
{
b_news = new Image(); b_news.src = "/img/mainnav_news_off.gif";
c_news = new Image(); c_news.src = "/img/mainnav_news_on.gif";

b_saison = new Image(); b_saison.src = "/img/mainnav_saison_off.gif";
c_saison = new Image(); c_saison.src = "/img/mainnav_saison_on.gif";

b_tickets = new Image(); b_tickets.src = "/img/mainnav_tickets_off.gif";
c_tickets = new Image(); c_tickets.src = "/img/mainnav_tickets_on.gif";

b_freezers = new Image(); b_freezers.src = "/img/mainnav_freezers_off.gif";
c_freezers = new Image(); c_freezers.src = "/img/mainnav_freezers_on.gif";

b_specials = new Image(); b_specials.src = "/img/mainnav_specials_off.gif";
c_specials = new Image(); c_specials.src = "/img/mainnav_specials_on.gif";

b_community = new Image(); b_community.src = "/img/mainnav_community_off.gif";
c_community = new Image(); c_community.src = "/img/mainnav_community_on.gif";

b_sponsoren = new Image(); b_sponsoren.src = "/img/mainnav_sponsoren_off.gif";
c_sponsoren = new Image(); c_sponsoren.src = "/img/mainnav_sponsoren_on.gif";
}

// MAIN NAV SUB
      function noErrors() {
        return true;
      }
      window.onerror = noErrors;

      function checkBrowser() {
        this.ver = navigator.appVersion;
        this.dom = document.getElementById?1:0;
        this.ie5 = (this.ver.indexOf("MSIE 5") > -1 && this.dom)?1:0;
        this.ie4 = (document.all && !this.dom)?1:0;
        this.ns5 = (this.dom && parseInt(this.ver) >= 5)?1:0;
        this.ns4 = (document.layers && !this.dom)?1:0;
        this.bw = (this.ie5 || this.ie4 || this.ns4 || this.ns5);
        return this;
      }

      bw = new checkBrowser();

      function show(div,nest) {
        obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
        obj.visibility='visible';
      }

      function hide(div,nest) {
        obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;
        obj.visibility='hidden';
      }

      function showHideSubMenu(ID) {
        if (ID == 1) {show('SubMenu01')} else {hide('SubMenu01')};
		if (ID == 2) {show('SubMenu02')} else {hide('SubMenu02')};
		if (ID == 3) {show('SubMenu03')} else {hide('SubMenu03')};
		if (ID == 4) {show('SubMenu04')} else {hide('SubMenu04')};
		if (ID == 5) {show('SubMenu05')} else {hide('SubMenu05')};
		if (ID == 6) {show('SubMenu06')} else {hide('SubMenu06')};
		if (ID == 7) {show('SubMenu07')} else {hide('SubMenu07')};
      }
	  
// ZOOM GALLERY

function zoomNewsGallery(mcmsId,mcmsExtId)
	{
		zoomwindow=window.open('/cgi-bin/adframe/news/zoom_window.html?id=<!-- #id# -->&ADFRAME_MCMS_ID='+mcmsId+'&ADFRAME_MCMS_EXT_ID='+mcmsExtId,'zoom','width=200,height=200,resizable=no,toolbar=0,status=1,menubar=0,scrollbars=no')
		zoomwindow.focus();
	}
	
function genericOpenNoScroll(name,url,width,height)
{
	var genmesg = open(url,name,"toolbar=0,status=1,menubar=0,resizable=0,scrollbars=0,width="+width+",height="+height); 
}

function genericOpen(name,url,width,height)
{
	var genmesg = open(url,name,"toolbar=0,status=1,menubar=0,resizable=1,scrollbars=1,width="+width+",height="+height); 
}


//function openTicketCorner(datum,heim,gast)
//{
//	ticketwindow=window.open('http://www.ticketcorner.com/eventstore/co539/searchresult?searchtext=Hamburg%20Freezers&language=de&inpSortierung=ticketcatalog_date','tickets','width=770,height=600,resizable=yes,toolbar=1,status=1,menubar=0,scrollbars=yes')
//	ticketwindow.focus();
//}

function openTicketCorner(datum,heim,gast)
{
	ticketwindow=window.open('https://www.eventimsports.de/shop/104','tickets','width=970,height=800,resizable=yes,toolbar=1,status=1,menubar=1,scrollbars=yes')
	//ticketwindow=window.open('http://www.kartenhaus.de/index.cfm?Action=Show_List&log=1&Section=Search&ItemName=Hamburg+Freezers&Support=Ticket&ShowTop=700&NoReview=Yes&NoKeyWord=Yes&getartistonly=1','tickets','width=1024,height=800,resizable=yes,toolbar=1,status=1,menubar=0,scrollbars=yes')
	ticketwindow.focus();
}
