function donothing() {} 

function gotosite(site) {            
	if (site != "") {                    
		self.location=site; 
	}
}

var pop = null;

function popdown() {
	if (pop && !pop.closed) pop.close();
}

function popup(obj,w,h) {
	var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
	if (!url) return true;
	w = (w) ? w += 20 : 700;  // 150px*150px is the default size
	h = (h) ? h += 25 : 700;
	var args = 'width='+w+',height='+h+',resizable,scrollbars=1';
	popdown();
	pop = window.open(url,'',args);
	return (pop) ? false : true;
}

function load() {
   if (GBrowserIsCompatible()) {
	  var map = new GMap2(document.getElementById("map"));
	  map.setCenter(new GLatLng(50.93820261700557,6.988763809204102), 15);
	  map.addControl(new GLargeMapControl());
	  map.addControl(new GMapTypeControl());
	  map.addControl(new GOverviewMapControl());

	  var tnTabs = [
		 new GInfoWindowTab("Adresse", "<strong>Kölner Eishockey Gesellschaft \"Die Haie\" mbH</strong><br /><br />Gummersbacher Straße 4<br />50679 Köln (Deutz)<br />Telefon: 0221 - 27 95 0<br />Telefax: 0221 - 27 95 50<br />e-Mail: <a href=\"mailto:info@haie.de\">info@haie.de</a>"),
		 new GInfoWindowTab("Anreise", "<form action='http://maps.google.de/maps' method='get' target='_blank' style='margin: 0; font: 11px Arial, sans-serif;'><input type='hidden' id='daddr' name='daddr' value='Gummersbacher Strasse 4, 50679 Köln (Deutz), Germany'/><strong>Routenplaner</strong>: Geben Sie bitte Ihre Start-Adresse ein<p style='margin-bottom: 2px;'></p><input type='text' id='saddr' name='saddr' value='Strasse Nr., PLZ Stadt' onfocus='this.value=\"\"' style='border: 1px solid #979797; background-color: #f0f0f0; padding-left: 3px; width: 160px; font: 11px Arial, sans-serif;'/>&#160;<input type='submit' name='go' value='Go!' style='border-width: 1px; font: 11px Arial, sans-serif;'/></form>")	
	  ];

	  var marker = new GMarker(map.getCenter());
	  GEvent.addListener(marker, "click", function() {
	  	marker.openInfoWindowTabsHtml(tnTabs);
	  });
	  
	  // Create our "tiny" marker icon
	var icon = new GIcon();
	icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
	icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon.iconSize = new GSize(12, 20);
	icon.shadowSize = new GSize(22, 20);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);
	var point = new GLatLng(50.93810260600557,6.983112809204102);
	
	map.addOverlay(marker);
	map.addOverlay(new GMarker(point, icon));
	marker.openInfoWindowTabsHtml(tnTabs);
   }
}

function load_arena() {
   if (GBrowserIsCompatible()) {
	  var map = new GMap2(document.getElementById("map"));
	  map.setCenter(new GLatLng(50.93850009408479,6.982927322387695), 15);
	  map.addControl(new GLargeMapControl());
	  map.addControl(new GMapTypeControl());
	  map.addControl(new GOverviewMapControl());

	  var tnTabs = [
		 new GInfoWindowTab("Adresse", "<strong>Kölnarena</strong><br /><br />Willy-Brandt-Platz 3<br />50679 Köln (Deutz)<br />Telefon: 0221 - 802 1<br />Telefax: 0221 - 802 2299"),
		 new GInfoWindowTab("Anreise", "<form action='http://maps.google.de/maps' method='get' target='_blank' style='margin: 0; font: 11px Arial, sans-serif;'><input type='hidden' id='daddr' name='daddr' value='Willy-Brandt-Platz 3, 50679 Köln (Deutz), Germany'/><strong>Routenplaner</strong>: Geben Sie bitte Ihre Start-Adresse ein<p style='margin-bottom: 2px;'></p><input type='text' id='saddr' name='saddr' value='Strasse Nr., PLZ Stadt' onfocus='this.value=\"\"' style='border: 1px solid #979797; background-color: #f0f0f0; padding-left: 3px; width: 160px; font: 11px Arial, sans-serif;'/>&#160;<input type='submit' name='go' value='Go!' style='border-width: 1px; font: 11px Arial, sans-serif;'/></form>")	
	  ];

	  var marker = new GMarker(map.getCenter());
	  GEvent.addListener(marker, "click", function() {
	  	marker.openInfoWindowTabsHtml(tnTabs);
	  });
	  
	  // Create our "tiny" marker icon
	var icon = new GIcon();
	icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
	icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon.iconSize = new GSize(12, 20);
	icon.shadowSize = new GSize(22, 20);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);
	var point = new GLatLng(50.93820261700557,6.988763809204102);
	
	map.addOverlay(marker);
	map.addOverlay(new GMarker(point, icon));
	marker.openInfoWindowTabsHtml(tnTabs);
   }
}
 

function ticketshop() {
	var tickets = window.open('http://www.koelnticket.de/index.php?mapid=full_service_ergebnisse&serviceid=276&mode=newsearch', 'TicketShop', 'width=650,height=650,resizable,scrollbars=yes');
	return (tickets) ? false : true;
}

function ticketshop_dauerkarte() {
	var tickets = window.open('http://www.koelnticket.de/index.php?mapid=full_service_tickets&serviceid=276&ev_id=654292', 'TicketShop', 'width=650,height=650,resizable,scrollbars=yes');
	return (tickets) ? false : true;
}

function ticketshop_roulette() {
	var tickets = window.open('http://www.koelnticket.de/index.php?mapid=full_service_tickets&serviceid=276&ev_id=733874', 'TicketShop', 'width=650,height=650,resizable,scrollbars=yes');
	return (tickets) ? false : true;
}

function showPreview(where, what) {
	document.getElementById(where).innerHTML = '<a href="thumbnail.php?size=474&image=image/shop/products/' + what + '" rel="lightbox"><img src="thumbnail.php?size=250&image=image/shop/products/' + what + '" border="0"></a><div><a href="thumbnail.php?size=474&image=image/shop/products/' + what + '" rel="lightbox"><img src="{imagePath}/icon.lupe.gif" border="0"/></a></div>';
}

function showHide(whichDiv)
{
	state = document.getElementById(whichDiv).style.display;
	if(state=='none') Effect.BlindDown(whichDiv);
	else Effect.BlindUp(whichDiv);
	/*if(whichDiv.substring(0,3) == 'tic')
	{
		for(i=1;i<9;i++)
		{
			if (i != 'tic' + whichDiv) {
				Effect.BlindUp(whichDiv + '' + i);
			}
		}
	}*/
}

function paymentSwitch(whichDiv)
{
	var layers = new Array('cheque_info', 'nachnahme_info', 'cc_card_form');
	var orig_price =  document.getElementById('totalCostE').value;
	
	if (whichDiv == 'nachnahme_info') {
		document.getElementById('dynamic_price').innerHTML = document.getElementById('totalCostEpure').value;
		Effect.BlindDown('dynamic_nachnahme_row');
	}
	else {
		Effect.BlindUp('dynamic_nachnahme_row');
		document.getElementById('dynamic_price').innerHTML = orig_price;
	}
	
	
	for (var loop = 0; loop <layers.length; loop++)
	{
		state = document.getElementById(layers[loop]).style.display;
		if(layers[loop]==whichDiv) Effect.BlindDown(whichDiv);
		else Effect.BlindUp(layers[loop] );
	}	
		
}

function goBig(what, state)
{
	if(state==1) document.getElementById(what).style.display ="";
	else document.getElementById(what).style.display ="none";
}	

function translate()
{
}

function checkLength(element) 
{
	if (document.getElementById(element).value.length > 2) {
		document.getElementById('shop_search_formular').submit();
	}
	else alert("Suchbegriff zu kurz. Bitte mindestens drei Buchstaben eingeben.")
}

function openCCWindow(formname) 
{
	var ccWin = window.open('about:blank', 'Window_Sparkasse', 'width=600,height=650,resizable,scrollbars=yes');
	return (ccWin) ? false : true; 
}

function redirectToSparkasse()
{
	var ccWin = window.open('/index.php?type=cart&cartAction=ccRedirect', 'Window_Sparkasse', 'width=600,height=650,resizable,scrollbars=yes');
	/*window.location.href  = "https://testsystem.sparkassen-internetkasse.de/vbv/mpi_legacy";*/
	
}