navHover = function() {
	var lis = $("nav").getElementsBySelector("LI");
	for (var i=0; i<lis.length; i++) {	
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), ""); // geht nicht in firefox
		}
	}
}

// && window.location.pathname.indexOf('admin') == -1
if (Prototype.Browser.IE){ window.attachEvent("onload", navHover); }


var timer
function navOver(name,other){
	$(name).style.display = 'block';
	$(other).style.display = 'none';
}

function navOut(name){
	timer = setTimeout('navOutAll()',2000);
}

function navOutAll(){
	$('nav_live').style.display = 'none';
	$('nav_shop').style.display = 'none';
	clearTimeout(timer);
}


navHover = function() {
	var lis = $("nav").getElementsBySelector("LI");
	for (var i=0; i<lis.length; i++) {	
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), ""); // geht nicht in firefox
		}
	}
}

if (Prototype.Browser.IE){
	window.attachEvent("onload", navHover);
}









function sucheOver(typ){
		$("buttonSuche").src = "/images/" + typ + "/pfeil_gelb.gif";
		$("formSuche").style.backgroundColor = "#FFE54D";
}

function sucheOut(typ){
		$("buttonSuche").src = "/images/" + typ + "/pfeil_rot.gif";
		$("formSuche").style.backgroundColor = "#ffffff";
}

function sucheBlur(){
		var sterm = $("formSuche").value;
		if(sterm == ""){
				sterm = "Artist/Titel";
		}
		$("formSuche").value = sterm;
}

function sucheHeaderBlur(){
		var sterm = $("formHeaderSuche").value;
		if(sterm == ""){
				sterm = "Artist/Titel";
		}
		$("formHeaderSuche").value = sterm;
}

function AmazonPlayer(url){
	breite = screen.width;
	hoehe = screen.height;
	links = (breite - 640)/2;
	oben = (hoehe - 520)/2;
	
	player = window.open(url, "Amazon Player", 'width=640,height=520,left=' + links + ',top=' + oben);
	player.focus();
}

var timer;

function hide_div(id){
	$(id).style.display = "none";
}

function hide_div_by_time(id){
	timer = setTimeout("hide_div('" + id + "')",1000);
}

function hide_all(){
	$('bigger_size_cd').style.display = "none";
	$('bigger_size_dvd').style.display = "none";
	$('bigger_size_poster').style.display = "none";
	$('bigger_size_merch').style.display = "none";
}
function stop_timer(){
	clearTimeout(timer);
}

function bigger_size(url, width, height, title, link, id, product_id){
	href1 = '<div class="cl"><a href="' + link + '" title="' + title + '" onmouseover="stop_timer()" onmouseout="hide_div_by_time(\'' + id + '\')">';
	href2 = '</a></div>';
	text = '<div class="cl"><div class="sublineklein" style=width:100px;">' + title + '</div></div>'
	img = '<img src="' + url + '" width="' + width + '" height="' + height + '" border="0" alt="' + title +'" title="' + title + '" style="margin-right: 10px">';
	
	inhalt = href1 + img + href2 + text + "<br/><a href=\"javascript:hide_div('" + id + "')\"><span class=\"anmerkung\">schlie&szlig;en</span></a>";
	
	t = Math.round(height) + 20;
	l = Math.round(width / 2) - 30;
	$(product_id).makePositioned();
	$(id).style.top = $(product_id).offsetTop - t + 'px';
	$(id).style.left = $(product_id).offsetLeft - l + 'px';
	$(id).style.width = (width * 1) + 110 + 'px';
	$(id).innerHTML = inhalt;
	$(id).style.display = "block";
	stop_timer();
}
/*
function bigger_size(url, width, height, title, link, id, product_id){
	
	href1 = '<a href="' + link + '" title="' + title + '" onmouseover="stop_timer()" onmouseout="hide_div_by_time(\'' + id + '\')">';
	href2 = '</a>';
	img = '<img src="' + url + '" width="' + width + '" height="' + height + '" border="0" alt="' + title +'">';
	
	inhalt = href1 + img + href2 + "<br/><a href=\"javascript:hide_div('" + id + "')\"><span class=\"anmerkung\">schliessen</span></a>";
	
	t = Math.round(height) + 40;
	l = Math.round(width / 2);
	$(product_id).makePositioned();
	$(id).style.top = $(product_id).offsetTop - t + 'px';
	$(id).style.left = $(product_id).offsetLeft - l + 'px';
	$(id).innerHTML = inhalt;
	$(id).style.display = "block";
	stop_timer();
}
*/
