window.onload=function(){
Nifty("div#submenu","bottom transparent");
Nifty("div#warenkorb h1","top transparent");
Nifty("div#warenkorb div","bottom transparent");
Nifty("div#infobox","top");
}

function openURL(URL,TARGET){
	
	if(TARGET == ""){
		window.location.href = URL; 
	}else{
		var FENSTER = window.open(URL, "new Window", "");
	}	
}


function swapImg(ID,SRC){
	obj = document.getElementById(ID);
	if(obj){
		obj.src = SRC;
	}
}


function checkSearchForm(mySTR){
	obj = document.getElementById("words");
	if((obj && obj.value == "") || (obj && obj.value == mySTR)){
		obj.value = "*";
	}
}

function showProductImg(id, opener) {
	var elems = $$('.imgholder');
	elems.each(function(elem){
		elem.style.display = "none";
	});
	
	var openers = $$('.imgopener a');
	openers.each(function(opener){
		opener.className = "";
		opener.setAttribute("title", opener.rel, true);
	});
	
	var imgelement = document.getElementById(id); 
	imgelement.style.display = 'block';
	
	opener.className = "active";
	opener.removeAttribute("title");
	
	return false;
}


function printPage(URL){
	FENSTER = window.open(URL, "Druckansicht", "menubar=yes,status=no,resizable=yes,scrollbars=yes,width=600,height=600");
	return false;
}

function makeZoom(URL, WIDTH, HEIGHT){
WIDTH = WIDTH + 20;
HEIGHT = HEIGHT + 20;
if(screen.width <= WIDTH){
	WIDTH = screen.width - 100;
}

if(screen.height <= HEIGHT){
	HEIGHT = screen.height - 100;
}
	
	FENSTER = window.open(URL, "Bildzoom", "menubar=no,status=no,resizable=yes,scrollbars=yes,width="+ WIDTH +",height=" + HEIGHT);
}

