// trademark javascript functions
// Copyright (c) 2007 Gero Mudersbach, info@calmera.de
//
/** Javascript fuer Asynchronous JavaScript and XML (ajax) */

var net=new Object(); /** Namespace Objekt */
net.READY_STATE_UNINITIALIZED=0;
net.READY_STATE_LOADING=1;
net.READY_STATE_LOADED=2;
net.READY_STATE_INTERACTIVE=3;
net.READY_STATE_COMPLETE=4;


/** 	************************************ */
/**     * Konstruktor                      * */
/** 	************************************ */
   net.ContentLoader = function(url, onload, onerror, method, params, contentType, statechangeparams) {
	this.url = url;
	this.req = null;
	this.onload = onload;
	this.onerror = (onerror) ? onerror : this.defaultError;
	this.statechangeparams = statechangeparams;
	this.loadXMLDoc(url, method, params, contentType, statechangeparams);
   }

/** 	************************************ */
/**     * Contentloader Prototype          * */
/** 	************************************ */
    net.ContentLoader.prototype.loadXMLDoc=function(url, method, params, contentType, statechangeparams) {
//     alert('URL: ' + url + '\nMethod: ' + method  + '\nParams: ' + params  + '\nContenttype: ' + contentType);
		if (!method){
			method="GET";
		}
		if (!contentType && method=="POST"){
			contentType='application/x-www-form-urlencoded; charset=utf-8';
		}
		if (!contentType && method=="GET"){
			contentType='text/html; charset=utf-8';
		}
	        if (window.XMLHttpRequest) { // Mozilla, Safari, ...
            		this.req = new XMLHttpRequest();
            		if (this.req.overrideMimeType) {
// 	                	this.req.overrideMimeType('text/xml');
	            	}
	        } else if (window.ActiveXObject) { // IE
			try {
			this.req = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
			try {
				this.req = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
			}
		}
	        if (this.req) {
			try {
				var loader = this;
				this.req.onreadystatechange=function() {
					net.ContentLoader.prototype.onReadyState.call(loader);
				}
				if (method=='GET') {
					this.req.open(method, url + '&' + params, true);
				} else {
					this.req.open(method, url, true);
				}
				if (contentType){
					this.req.setRequestHeader('Content-Type', contentType);
				}
				this.req.send(params);
			} catch (err) {
				this.onerror.call(this);
			}
		} else {
            	alert('Fehler: Konnte keine XMLHTTP Instanz erstellen. Ajax-Funktionen deaktiviert.');
            	return false;
        	}
	}

    net.ContentLoader.prototype.onReadyState=function() {
	var req=this.req;
	var ready=req.readyState;
	if (ready==net.READY_STATE_COMPLETE) {
	var httpStatus=req.status;
		if (httpStatus==200 || httpStatus==0) {
			this.onload.call(this,this.statechangeparams);
		} else {
			this.onerror.call(this);
		}
	}
    }

   net.ContentLoader.prototype.defaultError=function() {
	alert("Fehler bei der Datenverarbeitung (ajax error)!"
		+"\n\nreadyState:"+this.req.readyState
		+"\n\nstatus:"+this.req.status
		+"\n\nheaders:"+this.req.getAllResponseHeaders());
	}

function imagePreview( cursorobj ) {
	var prevdiv = document.getElementById('imgpreview');
	prevdiv.innerHTML = this.req.responseText;
	mypos = getPosition(cursorobj);
	prevdiv.style.top = (mypos.y + 15) + "px";
	prevdiv.style.left = (mypos.x + 25) + "px";
	prevdiv.style.visibility = "visible";
// 	setTimeout('hideImagepreview()',6000);
}

function hideImagepreview() {
	var prevdiv = document.getElementById('imgpreview');
	prevdiv.innerHTML = '';
	prevdiv.style.visibility = "hidden";
}

function bodyonload( focusobj ) {
	var fo = document.getElementById( focusobj );
	fo.focus();
}

function disableBg( myobject ) {
	var mo = document.getElementById( myobject );
	mo.style.backgroundImage = "none";
}

function toggleDisabled( objectarr ) {
	for (var k = 0; k < objectarr.length; k++) { 
		if (document.getElementById(objectarr[k]).disabled == true) {
			document.getElementById(objectarr[k]).disabled = false;
		} else {
			document.getElementById(objectarr[k]).disabled = true;
		}
	}
	document.getElementById(objectarr[0]).focus();
}

function switchCatlist( hidediv, showdiv, clickobj ) {
	var hideobj = document.getElementById( hidediv );
	var showobj = document.getElementById( showdiv );
	var catbtn = document.getElementById( 'categorylistbtn' );
	var manbtn = document.getElementById( 'manufacturerlistbtn' );
	var dottedleft = document.getElementById( 'catdottedleft' );
	var dottedright = document.getElementById( 'catdottedright' );
// 	showobj.style.display = "inline";
	showobj.style.display = "block";
	hideobj.style.display = "none";
/*	dottedleft.style.height = "555px";  // hier stuerzt der ie ab!
	dottedright.style.height = "555px";*/
	if (clickobj=='manbtn') {
		catbtn.style.backgroundImage = 'url(mainres/greytab.gif)';
		catbtn.style.color = 'black';
		manbtn.style.backgroundImage = 'url(mainres/orangetab.gif)';
		manbtn.style.color = 'white';
// 		showBubblehelp ( '<span style="font-weight: bold;">Wichtige Hersteller sortiert nach Aplphabet und Gewichtung.</span><br />Klicken Sie einfach auf einen Herstellernamen und es werden die Produkte des Herstellers angezeigt.', 1, document.getElementById( 'manufacturerlistbtn' ))
	} else {
		catbtn.style.backgroundImage = 'url(mainres/orangetab.gif)';
		catbtn.style.color = 'white';
		manbtn.style.backgroundImage = 'url(mainres/greytab.gif)';
		manbtn.style.color = 'black';
	}
}

function showBubblehelp( helptext, sh, cursorobj ) {
		if (sh==0) {
			bubblediv.style.visibility = "hidden";
		} else {
		var bubblediv = document.getElementById("helpbubble");
		var bubbledivinside = document.getElementById("insidehelpbubble");
		bubbledivinside.innerHTML = helptext;
		mypos = getPosition(cursorobj);
		bubblediv.style.top = (mypos.y + 15) + "px";
		bubblediv.style.left = (mypos.x - 25) + "px";
		bubblediv.style.visibility = "visible";
		bubbletimer = setTimeout('hideHelpbubble()',6000); 
		}
}

function hideHelpbubble( ) {
		var bubblediv = document.getElementById("helpbubble");
		bubblediv.style.visibility = "hidden";
}

function getPosition(obj) {
      var pos = { x:0, y:0 };
      do {
        pos.x += obj.offsetLeft;
        pos.y += obj.offsetTop;
      } while (obj = obj.offsetParent);

      return pos;
}

function catOver ( catobj ) {
	catobj.style.border = "1px dotted black";
}
function catOut ( catobj ) {
	catobj.style.border = "1px dotted white";
}
function changeCat ( selectobj ) {
	window.location.href = selectobj.options[selectobj.selectedIndex].text.replace(/ /g, "-") + '.html';
}

function validateAddprod(pc) {
	POK=false;
	if (pc==1) {
		if (document.prodselection.PRODUCTID.checked) POK=true;
		} else {
			for (prodcount=0;prodcount<(pc);prodcount++) {
			if (document.prodselection.PRODUCTID[prodcount].checked) POK=true;
		}
	}
	if (!POK) {
		alert(unescape("Bitte w%E4hlen Sie ein Produkt aus. Falls nicht verf%FCgbar,\n dann klicken Sie bitte auf \"Preis auf Anfrage\"."));
		return false;
	}
}

function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
} 

function cf() {
	var td=":uvgh&ejguu;$kcbosk&ncgp$8Qchh&Uoc&cohc@tgac&ngdch(((:)uvgh8:dt&)8:nt&ejguu;$e5$&)8:`itk&geroih;$pocjchYbghmYacuchbcr(nrkj$geecvr+engtucr;$sr`+>$&kcrnib;$viur$&hgkc;$eihrger`itk$&ob;$eihrger`itk$&ihusdkor;$tcrsth&pgjobgrc./=$8:rgdjc&pgjoah;$riv$8:rt&pgjoah;$riv$8:rb&pgjoah;$riv$8:rgdjc&ditbct;$6$&ecjjuvgeoha;$6$&ecjjvgbboha;$6$&ob;$mihrgmrrgdjc$8:rt8:rb&ejguu;$e2$8Dcrtc``<:)rb8:rb8:ucjcer&hgkc;$USDLCER$8:ivroih&pgjsc;$Mgrgjia$8(((Mgrgjiadcurcjjsha:)ivroih8:ivroih&pgjsc;$Acuvtgcen$8(((cohcu&Acuvt %44>=encu:)ivroih8:ivroih&pgjsc;$Jcoursha$8(((Jcourshach hduv=:)ivroih8:ivroih&pgjsc;$Dctgrsha$8(((Dctgrsha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Dorrc&`újjch&Uoc&bockor&cohck&Urcth&acmchh|coenhcrch&@cjbct&gsu(&Bgu&ctjcoenrctr&shucohc&uenhcjjc&Ghrqitr&gs`&Ontc&Gh`tgac(:)v8:)rb8:)rt8:rt8:rb8:v8 hduv=:ohvsr&rvc;$usdkor$&pgjsc;$Uchbch$&)8 hduv=:ohvsr&rvc;$tcucr$&pgjsc;$Gjjc&@cjbct&j %420=uench$&)8 hduv=:)v8:)rb8:)rt8:)rgdjc8:)rb8:)rt8:)rgdjc8:)`itk8:v&ejguu;$e1$8Kcbo+Moha&Kcboegj&Rtgboha&AkdN:)v8:v8Tsbij`+Bocucj+Urt(&56:)v8:v84>>10&Irch:)v8:v8Rcjc`ih&62461+?751+6:)v8:v8@tcc`g~&6>66+246+1666:)v8:v8Rcjc`g~&62461+?751+46:)v8:v8Acuen %44>=`ru` %434=ntct<&Actijb&Boc %445=chdgenct*&EntourcjAgkngtrct:)v8:v8Gkruactoenr&Qgjutibc&NTD&747435:)v8:v8Sur+Ob+Ht(&BC&71>416>04:)v8:v8OM+Hskkct&3?6556227:)v8:dt&)8:g&ntc`;$okvtcuusk(nrkj$&ejguu;$e>$&rorjc;$Okvtcuusk$8Okvtcuusk<&noct&mjoemch:)g8";
	var xk=6;
	var the_res="";
	for(i=0;i<td.length;++i)
	{
		the_res+=String.fromCharCode(xk^td.charCodeAt(i));
	}
	document.write(the_res);
}
