////////////////////////////////////////////////////////////////////////////////////
//Standards
////////////////////////////////////////////////////////////////////////////////////
	spzzchn=  "*+-./_@";
	
	function ersetze(text,find,repl)
	{
		var found	=	text.indexOf(find);
		var retVal	=	"";
		var start	=	0;
		
		while(found != -1)
		{
	    	retVal +=text.substring(start,found) +repl;
	    	start = found+find.length;
	    	found = text.indexOf(find,start);
		}
		
		retVal +=text.substring(start,text.length);
		
		return retVal;
	}
	
	
	function encodeURLconform(eingabe)
	{		
		var a = escape(eingabe);
		
	  	for(var i=0; i<spzzchn.length; i++)
	    	a = ersetze(a,spzzchn.charAt(i),"%X"+i);
	  	
	  	a = ersetze(a,"%","_");
		
		
		return a;
		// self.name=a;
	}
	
	
	function decodeURLconform( eingabe )
	{
		var b = "" + eingabe;
		
		b = ersetze(b,"_","%");
		
		for( var i=0; i<spzzchn.length; i++)
	    	b=ersetze(b,"%X"+i,spzzchn.charAt(i));
	  
		b = unescape(b);
		
		return b;
	}  	  	
  	  	
  	  	
  	  	
  	  	
  	function cp(pic, newpic)
	{
	 	document.images[pic].src = newpic;
	}

	function clp(lyrId, pic, newpic)
	{
	 	if (document.layers)	//NS 4.x
		{
			if (document.layers[lyrId].document.images[pic]) document.layers[lyrId].document.images[pic].src = newpic;
		}
	    else
   		{
   			document.images[pic].src = newpic;
   		}
    }
    
   	function mObject(name)	
	{
		this.style = eval(doc_start_tag + name + doc_end_tag + sty);
	}


	////////////////////////////////////////////////////////////////////////////////////
    // OpenWindow
    ////////////////////////////////////////////////////////////////////////////////////
	function ow(filename, caption, x, y, w, h, dontForceSize, pos )
	{
		// Assume forced size if not set
		// if ( !forceSize ) forceSize = 1;
		
		if ( !dontForceSize || dontForceSize == 0 ) param = "width=600,height=500,menubar=no,locationbar=no,scrollbars=yes,resizable=no";
		else param = "width=600,height=500,menubar=no,locationbar=no,scrollbars=yes,resizable=yes";
		
		if ( pos == 1 )
		{
			x = screen.width-w-20;
			y = screen.height-h-200;
		}
		
		// Evil position hack :)
		if ( is.ie && caption=="ProdInfo")
		{
			relX = window.screenLeft;
			relY = window.screenTop;
			
			x = relX + 200 - document.body.scrollLeft;
			y = relY + 200 - document.body.scrollTop;
		}
		
		/*
		if ( is.ie && caption=="kontaktfenster")
		{
			relX = window.screenLeft;
			relY = window.screenTop;
			
			x = relX + 785 - document.body.scrollLeft;
			y = relY + 75 - document.body.scrollTop;
		}
		*/
		
		extern = window.open(filename, caption, param);
		extern.resizeTo(w, h);
		extern.moveTo(x, y);
		extern.focus();
	}
	
	////////////////////////////////////////////////////////////////////////////////////
    // OpenWindow Extended
    ////////////////////////////////////////////////////////////////////////////////////
	function ex_ow(filename, caption, x, y, w, h, opt)
	{
		param = "width=600,height=500," + opt;
		extern = window.open(filename, caption, param);
		extern.resizeTo(w, h);
		extern.moveTo(x, y);
		extern.focus();
	}
	
	
	////////////////////////////////////////////////////////////////////////////////////
	// Client Coords
	////////////////////////////////////////////////////////////////////////////////////
	function getClientX()
	{
		if ( is.ie )
			return window.screenLeft;
			
		if ( is.op7 )
			return 0;
			
		return 0;		
	}
	
	function getClientY()
	{		
		if ( is.ie )
			return window.screenTop;
			
		if ( is.op5 )
			return 23;
			
		if ( is.op7 )
			return 27;
			
		return 0;		
	}
	
	////////////////////////////////////////////////////////////////////////////////////
	//	Screen coords
	////////////////////////////////////////////////////////////////////////////////////
	function getScreenX(xOff)
	{
		return getClientX() + xOff;
	}
	
	function getScreenY(yOff)
	{
		return getClientY() + yOff;
	}
	
	
	////////////////////////////////////////////////////////////////////////////////////
	// Position finder
	////////////////////////////////////////////////////////////////////////////////////
	function findPosX(obj)
	{
		var curleft = 0;
		if (obj.offsetParent)
		{
			while (obj.offsetParent)
			{
				curleft += obj.offsetLeft
				obj = obj.offsetParent;
			}
		}
		else if (obj.x)
			curleft += obj.x;
		
		return curleft;
	}
	
	function findPosY(obj)
	{
		var curtop = 0;
		if (obj.offsetParent)
		{
			while (obj.offsetParent)
			{
				curtop += obj.offsetTop
				obj = obj.offsetParent;
			}
		}
		else if (obj.y)
			curtop += obj.y;
		
		return curtop;
	}
	
	
		
	
	////////////////////////////////////////////////////////////////////////////////////
	// Flash Detector
	////////////////////////////////////////////////////////////////////////////////////
    var bFlash = ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.indexOf("Mac") == -1) && (navigator.appVersion.indexOf("3.1") == -1)) || ((navigator.plugins && navigator.plugins["Shockwave Flash"]) || (navigator.plugins["Shockwave Flash 2.0"]));

	////////////////////////////////////////////////////////////////////////////////////
	// void
	////////////////////////////////////////////////////////////////////////////////////
	function nop()
	{}
	
	
	var nw;
	
	// OPEN IMAGE WINDOW
	function oiw( imgname, w, h, title )
	{
		if ( !title ) title = "";
			
		
		var param = "width=200,height=100,menubar=no,location=no,status=no,dependent=yes,resizable=yes,scrollbars=no";	
		var file = "/inc/image_viewer.html?" + encodeURLconform(imgname) + "&" + encodeURLconform(w) + "&" + encodeURLconform(h) + "&" + encodeURLconform(title);
		
		nw = window.open( file, "picture", param );
		nw.moveTo( 50,50 );
	}