<!--
		// Cookie funktionen merkliste
		
		function WertHolen(name){
			   var i=0;  //Suchposition im Cookie
			   var suche = name+"=";
			   while (i<document.cookie.length)	{
			      if (document.cookie.substring(i, i+suche.length)==suche)	{
			         var ende = document.cookie.indexOf(";", i+suche.length);
			         ende = (ende>-1) ? ende : document.cookie.length;
			         var cook = document.cookie.substring(i+suche.length, ende);
			         return unescape(cook);
			      }
			      i++;
			   }
			   return null;
			}
		
		// neu	
		function CookieSetzen(name,packliste) {
		 var Verfallszeit = 1000*60*60*24*365;
		 var jetzt = new Date();
		 var Auszeit = new Date(jetzt.getTime() + Verfallszeit);
		 document.cookie = name + "=" + packliste + "; expires=" + Auszeit.toGMTString() + "; path=/;";
		}
		// gesamt loschen
		function CookieLoeschen(name){
			var cook = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT" + "; path=/;";
			document.cookie = cook;
			location.reload();
		}
		
		// fuer Packages
		// ein Pack loeschen
		function editPack(removeId,ctype) {
		   var packliste = WertHolen(ctype);
		   var packliste2 = "";
		   var packids = packliste.split(",");
		   for (var i=0; i<packids.length; i++)	{
				if (packids[i] != removeId)	{
					packliste2 += packids[i] + ',';
				}
			}
			packliste2 = packliste2.substring(0, packliste2.length-1);
			CookieSetzen(ctype, packliste2);
			location.reload();
		}
		//hinzufuegen
		function addPack(addId,ctype) {
		   var packliste = WertHolen(ctype);
		   if (packliste)
		   	packliste = packliste + ',' + addId;
		   else 
		    packliste = addId;
		   CookieSetzen(ctype, packliste);
		   location.reload();
		}
		
		// Merkliste Liste speichern
		function savePack() {
		   var packliste = '';
		   for (var i=0; i<document.packform.packid.length; i++)	{
				if (document.packform.packid[i].checked==true)	{
					packliste += document.packform.packid[i].value + ','
				}
			}
			packliste = packliste.substring(0, packliste.length-1);
			CookieSetzen('kwt-package', packliste);
		}
		//Merkliste Gastro speichern
		function saveGastro() {
			   var gastroliste = '';
			   for (var i=0; i<document.gastroform.gastroid.length; i++)	{
					if (document.gastroform.gastroid[i].checked==true)	{
						gastroliste += document.gastroform.gastroid[i].value + ','
					}
				}
				gastroliste = gastroliste.substring(0, gastroliste.length-1);
				CookieSetzen('kwt-gastro', gastroliste)
			}

		// Alles auswaehlen Listenansicht
		function checkall(el, name)	{
		     var c = el.checked;
		     var box = el.form.elements[name];
		     if(!box) return;
		     for(var i = 0; i < box.length; i++) box[i].checked = c;
		}
		
		// Nach dem speichern.......
		function savealert()	{
			window.location.reload();
		}
		
		// Select Box Listenansicht
		function gosort(box) {
			destination = box.options[box.selectedIndex].value;
			if (destination) location.href = destination;
		}
		
		// Anfrage Fenster
		function showanfrage(PACKID)	{
	  window.open('package-anfrage.php?packId='+PACKID,'Anfrage Package','width=800,height=768,scrollbars=yes,resizable=yes,status');
	}
	

	// TOOLTIPP 
		ToolT = null;
		document.onmouseover = updateToolT;

		function updateToolT(e) {
			if ((document.all))	{
					if (document.compatMode=='CSS1Compat') {
						scL =  document.documentElement.scrollLeft;
						scT =  document.documentElement.scrollLeft;
					}
					if (document.body) {
						scL =  document.body.scrollLeft;
						scT =  document.body.scrollTop;
					}
			} 

		//alert( 'ie x'+document.documentElement.scrollTop +'-'+document.body.scrollTop );

			x = (document.all) ? window.event.x + scL + 00: e.pageX;
			y = (document.all) ? window.event.y +scT: e.pageY;
			
			if (window.innerWidth!=window.undefined) cW =  window.innerWidth;
			if (document.compatMode=='CSS1Compat') cW =  document.documentElement.clientWidth;
			if (document.body) cW =  document.body.clientWidth;
			
			if (x < cW/2)	{
				AA = -10;
			}	else	{
				AA = 180;
			}
			if (ToolT != null) {
				ToolT.style.left = (x + 20 - AA) + "px";
				ToolT.style.top 	= (y + 20) + "px";
			}
		}
		
		function showToolT(id) {
			ToolT = document.getElementById(id);
			ToolT.style.display = "block"
		}
		
		function hideToolT() {
			ToolT.style.display = "none";
		}
		//-->
		




