function select_item(rubrik, item, url)
{
	//alert("select_item("+rubrik+", "+item+", "+url+")");
	document.location.href = "menu.php?item=" + item + "&rubrik=" + rubrik;
}

function openWindow()
{
//	window.open("zeitschrift_aid/index.html", "window");
	window.open("http://www.aid-magazin.de", "window");
}

function openPDF()
{
	window.open("/pdf/Programmvorschau.pdf", "window", "width=600px,height=800px,left=0,top=0,resizable=yes");
}

function setHighlight(obj, rubrik, item, highlight)
{
	background_color = '#FFF0DB';
	text_color       = '#000000';
	font_weight      = 'normal';
	
	
	if (highlight)
	{
		switch (rubrik) 
		{
			case 0 : background_color = '#FF9F00'; break;
			case 1 : background_color = '#FF9F00'; break;
			case 2 : background_color = '#F26631'; break;
			case 3 : background_color = '#932634'; break;
			case 4 : background_color = '#3B508F'; break;
			case 5 : background_color = '#A0C3D9'; break;
			case 6 : background_color = '#B1B0B5'; break;
		}
		
		 if (item != 0) { text_color = '#FFFFFF'; }
		font_weight = 'bold';
	}
	else if (item == 0)
	{
		font_weight = 'bold';
	}

	obj.style.backgroundColor = background_color;
	obj.style.color           = text_color;
	obj.style.fontWeight      = font_weight;
}

function updateInfo(url)
{
//	alert("updateInfo("+url+")");

	var info = window.parent.info.document;

//	var url = info.location.href;
//    alert("info.location.href: " + info.location.href);
	var dokurl = info.location.href;
	var dokname = info.location.pathname;
	var dokparam = info.location.search;
	var reload = '';

	if (dokname == "/detail.php" && dokparam.indexOf("reloaded") > 0){
		neuparam = dokparam.replace(/&reloaded/, "");
		reload = dokname + neuparam;
//		alert ("Reload verhindert");
	} else {
		reload = url;
	}

	info.location.href=reload;

}

