var menu_top_offset=142;
var menu_offset=24;
var add_offset=6;
aktiv_array = new Array();
//
// Array zur Speicherung des aktiven drop_downs
function aktiv_dropdowns(n){
	if (!aktiv_array){
		aktiv_array = new Array(n);
		for (i=0;i<n;i++){
			aktiv_array[i] = 0;
		}
	}
}
function dropdown(i,ns,n){
	
	aktiv_dropdowns(n);
	aktiv_array[i] = 1;
	for (j=1;j <= ns; j++){
		document.getElementById(String(10*j+i)).style.top=String(menu_top_offset+j*menu_offset+add_offset)+"px";
		document.getElementById(String(10*j+i)).style.clip="rect(0px, 200px, 40px, 0px)";
	}
}
function dragup(i,ns){
	aktiv_array[i] = 0;
	for (j=1;j <= ns; j++){
		var ID_string = String(10*j+i);
		setTimeout('set_menu_top_offset(' + ID_string + ',' + i + ')',100);
	}
}
function set_menu_top_offset(ID_string, i){
	if (aktiv_array[i] == 0){
		document.getElementById(ID_string).style.top=String(menu_top_offset)+"px";
		document.getElementById(ID_string).style.clip="rect(0px, 100px, 20px, 0px)";
	}
}
function korb_voll_0() {
	// bei gefuelltem warenkorb anderes Bild anzeigen
	// link
	if (parent.basket){
		document.getElementById("wk_ico").src="pics/warenkorb_voll.gif";
		document.getElementById("wk_ico2").src="pics/warenkorb_voll.gif";
	}
}
function korb_voll_1() {
	// bei gefuelltem warenkorb anderes Bild anzeigen
	// aktiv
	if (parent.basket){
		document.getElementById("wk2_ico").src="pics/warenkorb2_voll.gif";
		document.getElementById("wk2_ico2").src="pics/warenkorb2_voll.gif";
	}
}
//
function loadpic(pic_file, w, h, pic_id) {
	document.getElementById(pic_id).src=pic_file;
	document.getElementById(pic_id).width = w;
	document.getElementById(pic_id).height = h;
}
function bild(name, w, h){
         this.bild = name;
         this.w  = w;
         this.h = h;
         this.s ='width='+(w+20)+' height='+(h+30);
}
