function ShowHighLights()
{
	createLayer("Layer1");
	createLayer("Layer2");
	if (typeof(eb1) == "undefined") return;
	if (eb1 != "") $("e"+eb1.toString()).className = "act";
	if (eb2 != "") $("e"+eb2.toString()).className = "act";
	if (eb3 != "") $("e"+eb3.toString()).className = "act";
	if (eb4 != "") $("e"+eb4.toString()).className = "act";

	// Detailansicht
	if ($("description_title") != null) addEvent($("description_title"), "click", function(){ viewTab('description'); } );
	if ($("accessory_title") != null) addEvent($("accessory_title"), "click", function(){ viewTab('accessory'); } );
	if ($("catarticles_title") != null) addEvent($("catarticles_title"), "click", function(){ viewTab('catarticles'); } );
	if ($("bewertungen_title") != null) addEvent($("bewertungen_title"), "click", function(){ viewTab('bewertungen'); } );

	if ($("wbTab") != null || $("gkTab") != null) setWBScroll();

	checkSearchParam();
	LoadSearchhelp();

	allowSelection(false);
	
	getDoBildImgs("");
}

function allowSelection(wd)
{
	if(typeof(wd) == "undefined") wd = false;
	if (wd)
	{
		removeEvent(document, "selectstart", cancelEvent );
		removeEvent(document, "dragstart", cancelEvent );
	}
	else
	{
		addEvent(document, "selectstart", cancelEvent );
		addEvent(document, "dragstart", cancelEvent );
	}
}

function checkSearchParam()
{
	var sstr = getParam("suchbegriff");
	if (sstr != null)
	{
		sstr = str_replace(sstr, String.fromCharCode(153), "™","gi");
		sstr = str_replace(sstr, String.fromCharCode(8482), "™","gi");
		sstr = str_replace(sstr, String.fromCharCode(128), "€","gi");
		sstr = str_replace(sstr, String.fromCharCode(8364), "€","gi");
		sstr = str_replace(sstr, "[\+]", " ","gi");
		document.search.suchbegriff.value = sstr;
	}
	else
	{
		document.search.suchbegriff.value = "Produktsuche";
		document.search.suchbegriff.style.color = "#666";
	}
	addEvent(document.search, "submit", function(e) { if (document.search.suchbegriff.value == "Produktsuche" || document.search.suchbegriff.value == "") { alert("Bitte geben Sie Suchbegriff ein!");document.search.suchbegriff.focus(); cancelEvent (e); } } );
	addEvent(document.search.suchbegriff, "focus", function() { if (document.search.suchbegriff.value == "Produktsuche") { document.search.suchbegriff.value = "";} document.search.suchbegriff.style.color = "#000";} );
	addEvent(document.search.suchbegriff, "blur", function() { if (document.search.suchbegriff.value == "") { document.search.suchbegriff.value = "Produktsuche"; document.search.suchbegriff.style.color = "#666";} } );
}

var ac = false, accounter = 0;
function loadAC()
{
	if (accounter > 10) return;
	if (typeof(listAdvice_Class) == "undefined")
	{
		window.setTimeout("loadAC()",100);
		accounter++;
		return;
	}
	
	if (!ac)
	{
		ac = new listAdvice_Class();
		ac.init({
			adv_emnts : "document.search.suchbegriff",
			keytokey : {"document.search.suchbegriff":"suchbegriff"},
			elmb_url : {"document.search.suchbegriff":"/js/list_keywords.php?langid=1&bgnstr={STRING}&t={TIME}"},
			listWidth : 212
		});
		if (!ac.loaded) ac.onLoad();
	}
}
function LoadSearchhelp()
{
	if (!document.search) return;
	if (!document.search.suchbegriff) return;
	if (!loadScript("/js/dCatalogue.js")) return;
	window.setTimeout("loadAC()",100);
}

//addEvent(window, "load", ShowHighLights);