<!--
	// -------------------------------------------
	// Positionierungs-Scripts
	var yPosTop = 0;
	var xPosLeft = 0;
	var yPos2 = 0;
	var yPos2n = 0;
	var xPos2 = 0;
	var xPos2n = 0;
	var winwidth=0;
	var winheight=0;
	var offsetfromcursorX=12 //Customize x offset of tooltip
	var offsetfromcursorY=10 //Customize y offset of tooltip

	var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
	//var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).
	var offsetdivfrompointerY=7

	document.write('<div id="flytext" style="z-index: 9; padding:1px; position:absolute; visibility:hidden; background-color:#FFFFFF; border:1px solid #EEEEEE"></div>')

	var ie=document.all
	var ns6=document.getElementById && !document.all
	var enabletip=false

	if (ie||ns6) {
		var tipobj=document.all? document.all["flytext"] : document.getElementById? document.getElementById("flytext") : ""
	}

	//var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""

	function ietruebody(){
		return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}

	function ddrivetip(thetext, thecolor, thewidth ){
		if (ns6||ie){
			tipobj = div_ref("flytext")
			if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
			if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
			tipobj.innerHTML='&nbsp;' + thetext + '&nbsp;'
			enabletip=true
			return false
		}
	}

	function positiontip(e){
		yPosTop  = ietruebody().scrollTop;
		xPosLeft = ietruebody().scrollLeft;

		if (enabletip){
			tipobj=document.all? document.all["flytext"] : document.getElementById? document.getElementById("flytext") : ""
			var nondefaultpos=false
			var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
			var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
			//Find out how close the mouse is to the corner of the window
			winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
			winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

			var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
			var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

			var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

			//if the horizontal distance isn't enough to accomodate the width of the context menu
			if (rightedge<tipobj.offsetWidth){
				//move the horizontal position of the menu to the left by it's width
				tipobj.style.left=curX-tipobj.offsetWidth+"px"
				nondefaultpos=true
				xPos2=curX-tipobj.offsetWidth+"px"
				xPos2n=curX-tipobj.offsetWidth
			}
			else if (curX<leftedge)
				tipobj.style.left="5px"
			else{
				//position the horizontal position of the menu where the mouse is positioned
				tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
				xPos2=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
				xPos2n=curX+offsetfromcursorX-offsetdivfrompointerX
//				pointerobj.style.left=curX+offsetfromcursorX+"px"
			}

			//same concept with the vertical position
			if (bottomedge<tipobj.offsetHeight){
				tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
				nondefaultpos=true
				yPos2 = curY-tipobj.offsetHeight-offsetfromcursorY+"px"
				yPos2n = curY-tipobj.offsetHeight-offsetfromcursorY
			}
			else{
				tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
				yPos2 = curY+offsetfromcursorY+offsetdivfrompointerY+"px"
				yPos2n = curY+offsetfromcursorY+offsetdivfrompointerY
//				pointerobj.style.top=curY+offsetfromcursorY+"px"
			}
			tipobj.style.visibility="visible"
//			if (!nondefaultpos)
//				pointerobj.style.visibility="visible"
//			else
//				pointerobj.style.visibility="hidden"
		}
	}

	function hideddrivetip(){
		if (ns6||ie){
			tipobj = div_ref("flytext")
			enabletip=false
			tipobj.style.visibility="hidden"
//			pointerobj.style.visibility="hidden"
			tipobj.style.left="-1000px"
			tipobj.style.backgroundColor='#FFFFFF'
			tipobj.style.width=''
		}
	}
	document.onmousemove=positiontip
	// Ende Positionierungs-Scripts
	// -------------------------------------------

	

	// -------------------------------------------
	// AJAX Warenkorb
	var yPos = 0;
	var xPos = 0;

	var aBck_color_soft = '';
	var aBck_color_dark = '';
	var aBck_color_heavy = '';

	var aID = 0;
	var aAnz = 0;
	var aIdm = '';
	var aIdsm = 0;
	var aSearch_op = 0;
	var aPattern1 = 0;
	var aShowindex = 0;

	// Funktion zur Referenzierung von Div-Layern
	function div_ref (id) {
		if      (document.layers)         return document.layers[id];         // NC 4
		else if (document.all)            return document.all[id];            // IE 4
		else if (document.getElementById) return document.getElementById(id); // DOM
		else                              return null;        
	}
	// Funktion zur Referenzierung von Div-Layern mit Zugriff auf CSS-Eigenschaften
	function div_ref_style (id) {
		if      (document.layers)         return document.layers[id];              
		else if (document.all)            return document.all[id].style;           
		else if (document.getElementById) return document.getElementById(id).style;
		else                              return null;        
	}

	function gowk(id, csoft, cdark, cheavy) {
		cusobj=document.all? document.all["wkinfo"] : document.getElementById? document.getElementById("wkinfo") : ""

		aID = id;
		var anz_name = 'anz_' + id
		var anzobj=document.all? document.all[anz_name] : document.getElementById? document.getElementById(anz_name) : ""
		aAnz = anzobj? anzobj.value : 1
		// aAnz = document.getElementById('anz_' + id).value;

		yPos = yPos2;

		// Vorbereiten, vor Verarbeitung
		div_ref_style("wkinfo").visibility = "hidden";
		document.getElementById('wkinfo').innerHTML = '<br>&nbsp;&nbsp;<font color="#777777">Speichere - bitte warten...</font><br><br>';
		docWidth=document.body.offsetWidth;
		div_ref_style("wkinfo").left = ((((winwidth-430))/2) + xPosLeft) + (document.documentElement? "px" : "")
		div_ref_style("wkinfo").top  = ((((winheight-cusobj.offsetHeight))/2) + yPosTop) + (document.documentElement? "px" : "")
		div_ref_style("wkinfo").visibility = "visible";

		// Command 'Warenkorb' einblenden
		wkobj=document.all? document.all["sm_wk"] : document.getElementById? document.getElementById("sm_wk") : ""
		var wk_statment = '<a style="cursor: pointer" onMouseover="ddrivetip(\'Warenkorb öffnen\',\'#' + csoft +'\')" onMouseout="hideddrivetip()"' +
						' onclick="hideddrivetip();gowk2(\'' + csoft + '\',\'' + cdark + '\',\'' + cheavy + '\',\'0\')">Warenkorb</a>'
		wkobj.innerHTML = wk_statment

		// Verarbeitung starten
		//var p1 = new Array(aID, aAnz, aBck_color_soft, aBck_color_dark, aBck_color_heavy);
		agent.call('','towk','callback', aID, aAnz, csoft, cdark, cheavy);
	}

	function gowk2(csoft, cdark, cheavy, id_art_del) {
		//var p1 = new Array(csoft, cdark, cheavy, id_art_del);
		agent.call('','towk2','callback2', csoft, cdark, cheavy, id_art_del);
	}

	function orderaddress(csoft, cdark, cheavy) {
		//var p1 = new Array(csoft, cdark, cheavy);
		agent.call('','orderaddress','callback', csoft, cdark, cheavy);
	}

	function eventform2(csoft, cdark, cheavy, event_id) {
		//var p1 = new Array(csoft, cdark, cheavy, event_id);
		agent.call('','eventform','eventform_callback', csoft, cdark, cheavy, event_id);
	}

	function eventform_callback(myvalue) {
		cusobj=document.all? document.all["wkinfo"] : document.getElementById? document.getElementById("wkinfo") : ""

		cusobj.innerHTML = decodeURIComponent(myvalue)

		docWidth=document.body.offsetWidth;
		div_ref_style("wkinfo").left = ((((winwidth-430))/2) + xPosLeft) + (document.documentElement? "px" : "")
		div_ref_style("wkinfo").top  = ((((winheight-cusobj.offsetHeight))/2) + yPosTop) + (document.documentElement? "px" : "")
		div_ref_style("wkinfo").visibility = "visible";
	}

	function eventform_submit(csoft, cdark, cheavy) {
		// Sanduhr für 'Command-Div'
		var obj1=document.all? document.all["div_event_post"] : document.getElementById? document.getElementById("div_event_post") : ""
		obj1.style.cursor='wait'

		var obj=document.all? document.all["eventform"] : document.getElementById? document.getElementById("eventform") : ""

		agent.call('','eventform_submit','eventform_submit_callback', csoft, cdark, cheavy, 
            encodeURIComponent(obj.elements["event_id"].value),
            encodeURIComponent(obj.elements["email"].value),
            encodeURIComponent(obj.elements["teilnehmer"].value),
            encodeURIComponent(obj.elements["anrede"].value),
            encodeURIComponent(obj.elements["name"].value),
            encodeURIComponent(obj.elements["adresse"].value),
            encodeURIComponent(obj.elements["plzOrt"].value),
            encodeURIComponent(obj.elements["telefon"].value),
            encodeURIComponent(obj.elements["anfrage"].value)
        );
	}

	function eventform_submit_callback(rcarray) {
		if (rcarray[1] == 'false')
			div_ref_style("wkinfo").visibility = "visible";
		if (rcarray[1] == 'true')
			div_ref_style("wkinfo").visibility = "hidden";

		obj=document.all? document.all["sendorder"] : document.getElementById? document.getElementById("sendorder") : ""
		obj.innerHTML = decodeURIComponent(rcarray[0])

		docWidth=document.body.offsetWidth;
		div_ref_style("sendorder").left = ((((winwidth-330))/2) + xPosLeft) + (document.documentElement? "px" : "")
		div_ref_style("sendorder").top  = ((((winheight-obj.offsetHeight))/2) + yPosTop) + (document.documentElement? "px" : "")
		div_ref_style("sendorder").visibility = "visible";

		// Sanduhr weg für Command-Div
		var obj1=document.all? document.all["div_event_post"] : document.getElementById? document.getElementById("div_event_post") : ""
		obj1.style.cursor='pointer'
	}

	function clickanz(csoft, cdark, cheavy, iidwkart, indec) {
		agent.call('','clickanz','clickanz_back', csoft, cdark, cheavy, iidwkart, indec);
	}

	function disableDiv() {
		div_ref_style("wkinfo").visibility = "hidden";
	}

	function disableDiv2(divname) {
		div_ref_style(divname).visibility = "hidden";
	}

	function callback2(anarray) {
		str    = anarray[0]
		anz    = anarray[1]
		csoft  = anarray[2]
		cdark  = anarray[3]
		cheavy = anarray[4]

		wkobj=document.all? document.all["sm_wk"] : document.getElementById? document.getElementById("sm_wk") : ""

		if (anz > 0) {
			// Command 'Warenkorb' ein-/ausblenden
			var wk_statment = '<a style="cursor: pointer" onMouseover="ddrivetip(\'Warenkorb öffnen\',\'#' + csoft +'\')" onMouseout="hideddrivetip()"' +
							' onclick="hideddrivetip();gowk2(\'' + csoft + '\',\'' + cdark + '\',\'' + cheavy + '\',\'0\')">Warenkorb</a>'
			wkobj.innerHTML = wk_statment
		} else {
			wkobj.innerHTML = ''
		}

		callback(str)
	}

	function callback(str) {
		cusobj=document.all? document.all["wkinfo"] : document.getElementById? document.getElementById("wkinfo") : ""

		cusobj.innerHTML = decodeURIComponent(str)

		docWidth=document.body.offsetWidth;
		div_ref_style("wkinfo").left = ((((winwidth-430))/2) + xPosLeft) + (document.documentElement? "px" : "")
		div_ref_style("wkinfo").top  = ((((winheight-cusobj.offsetHeight))/2) + yPosTop) + (document.documentElement? "px" : "")
		div_ref_style("wkinfo").visibility = "visible";
	}

	function sendorder(csoft, cdark, cheavy) {
		// Sanduhr für ganzes Submit-Div
		var obj1=document.all? document.all["div_order_post"] : document.getElementById? document.getElementById("div_order_post") : ""
		obj1.style.cursor='wait'

		obj=document.all? document.all["orderform"] : document.getElementById? document.getElementById("orderform") : ""

		agent.call('','sendorder','sendorder_back', csoft, cdark, cheavy, 
                encodeURIComponent(obj.elements["email"].value), 
                encodeURIComponent(obj.elements["anrede"].value), 
                encodeURIComponent(obj.elements["name"].value),
                encodeURIComponent(obj.elements["adresse"].value),
                encodeURIComponent(obj.elements["plzOrt"].value),
                encodeURIComponent(obj.elements["telefon"].value),
                encodeURIComponent(obj.elements["anfrage"].value)
        );
	}

	function sendorder_back(rcarray)
	{
		if (rcarray[1] == 'false')
			div_ref_style("wkinfo").visibility = "visible";
		if (rcarray[1] == 'true')
			div_ref_style("wkinfo").visibility = "hidden";

		obj=document.all? document.all["sendorder"] : document.getElementById? document.getElementById("sendorder") : ""

		obj.innerHTML = decodeURIComponent(rcarray[0])

		docWidth=document.body.offsetWidth;
		div_ref_style("sendorder").left = ((((winwidth-330))/2) + xPosLeft) + (document.documentElement? "px" : "")
		div_ref_style("sendorder").top  = ((((winheight-obj.offsetHeight))/2) + yPosTop) + (document.documentElement? "px" : "")
		div_ref_style("sendorder").visibility = "visible";

		// Menu-Item Warenkorb removen
		if (rcarray[1] == 'true') {
			wkobj=document.all? document.all["sm_wk"] : document.getElementById? document.getElementById("sm_wk") : ""
			wkobj.innerHTML = ''
		}

		// Sanduhr für ganzes Submit-Div
		var obj1=document.all? document.all["div_order_post"] : document.getElementById? document.getElementById("div_order_post") : ""
		obj1.style.cursor='pointer'
	}

	function clickanz_back(rcarray) {
		var iid        = rcarray[0]
		var postot	   = rcarray[1]
		var newanz     = rcarray[2]
		var totalshtml = rcarray[3]
		var divname_anz    = 'anz_' + iid
		var divname_postot = 'postot_' + iid

		obj=document.all? document.all[divname_anz] : document.getElementById? document.getElementById(divname_anz) : ""
		obj.innerHTML = newanz;

		if (postot != -1) {
			obj=document.all? document.all[divname_postot] : document.getElementById? document.getElementById(divname_postot) : ""
			obj.innerHTML = postot;
		}

		obj=document.all? document.all["wktotdiv"] : document.getElementById? document.getElementById("wktotdiv") : ""
		obj.innerHTML = decodeURIComponent(totalshtml);
	}

	// Ende AJAX Warenkorb
	// -------------------------------------------

//-->
