/////////////////////////////////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////AJAX////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////////////////////////////
 
 /**
  * depricated
  */
 var http_request = false;

    function prepareRequest() {

        http_request = false;

        if (window.XMLHttpRequest) { // Mozilla, Safari,...
            http_request = new XMLHttpRequest();
            if (http_request.overrideMimeType) {
                http_request.overrideMimeType('text/xml');
                // zu dieser Zeile siehe weiter unten
            }
        } else if (window.ActiveXObject) { // IE
            try {
                http_request = new ActiveXObject("Msxml2.XMLHTTP");
            } catch (e) {
                try {
                    http_request = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (e) {}
            }
        }

        if (!http_request) {
            alert('Ende :( Kann keine XMLHTTP-Instanz erzeugen');
            return false;
        }
   }
 
 function sendRequest(func, method, requestUrl){
         prepareRequest();
         http_request.onreadystatechange=func;
         http_request.open(method, requestUrl, true);
         http_request.send(null);
 }  
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////Image Cache///////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////    
    
//Array zum Cachen von Grafiken
var imageCache=new Array();

//schreibt ein Bild in den Image Cache
function setImageCache(cacheId, cacheSrc){
    imageCache[cacheId]=new Image();
    imageCache[cacheId].src=cacheSrc;
}

function changeImgSrc(imgId, cacheId){
   if(imageCache[cacheId]) document.getElementById(imgId).src=imageCache[cacheId].src;
}

var dataImageCache=new Array();
function createDataImageCacheClass(dataClass){
	  dataImageCache[dataClass]=new Array();

}

function setDataImageCacheSrc(dataClass, dataId, dataValue){
	 dataImageCache[dataClass][dataId]=new Image();
     dataImageCache[dataClass][dataId].src=dataValue;
}

function getDataImageCache(dataClass, dataId){
	 return dataImageCache[dataClass][dataId];
}

function getDataImageCacheArray(dataClass){
	 return dataImageCache[dataClass];
}

function getDataImageCacheArrayLength(dataClass){
	// alert(dataImageCache);
	 var a=dataImageCache[dataClass];
	 alert(dataImageCache[dataClass].join('a'));
	 return a.length;
}

function changeDataImgSrc(imgId, dataClass, dataId){
	//alert(dataImageCache[dataClass][dataId].src);
	 document.getElementById(imgId).src=dataImageCache[dataClass][dataId].src;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////URL Cache///////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////

//URL Cache
var urlCache=new Array();

function setUrlCache(cacheId, cacheUrl){
    urlCache[cacheId]=cacheUrl;
}

function getUrlCache(cacheId){
    return urlCache[cacheId];
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////Field Cache///////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////

//URL Cache
var fieldCache=new Array();

function setFieldCache(cacheId, cacheField){
    fieldCache[cacheId]=cacheField;
}

function getFieldCache(cacheId){
    return fieldCache[cacheId];
}

/**
* JavaScript DataCache for transfer custom data from html(php) to javascript
* @author Philipp Knoeller
*/
var dataCache=new Object();

/**
* @deprecated not needed anymore
*/
function createDataCacheClass(dataClass){
	  dataCache[dataClass]=new Object();
}

/**
* Puts a key/value pair to a dataClass of the DataCache
* If the dataClass does not exist, it will be created
* @author Philipp Knoeller
*/
function setDataCache(dataClass, dataId, dataValue){
	 if(!dataCache[dataClass]) dataCache[dataClass]=new Object();
	 dataCache[dataClass][dataId]=dataValue;
}

/**
* Gets a value of an entry of the class dataClass from the DataCache
* @author Philipp Knoeller
* @return mixed the value
*/
function getDataCache(dataClass, dataId){
	 return dataCache[dataClass][dataId];
}

/**
* Gets the content of a whole dataClass as an array
* @return array content of the dataClass
*/
function getDataCacheArray(dataClass){
	 return dataCache[dataClass];
}


var Funktor={
         FFLogo:{
	         href:'',
	         
	         blessLogo:function(logoId, href){
	              gE(logoId).removeAttribute("href"); 
	              gE(logoId).onmousedown=Funktor.FFLogo.logoMouseDown; 
	              gE(logoId).onmouseover=function(){ document.body.style.cursor='pointer'; };
	              gE(logoId).onmouseout=function() { document.body.style.cursor='default'; };
	              Funktor.FFLogo.href=href;
	              
	         },
	         
	         logoMouseDown:function(e){ 
	              var sac=FFUniBrowser.getShiftAltCtrl(e); 
	              
	              if(sac.ctrl) window.open("/ff"); else window.location=Funktor.FFLogo.href;
	         } 
         
         }
}


/**
 ******************************************************************
 *              Philipp Knoeller Software Entwicklung              *
 *                        Framework Funktor                       *
 *                           Version 0.9b                         *
 *                                                                * 
 *                  http://pksoftware.de/funktor                  *
 *                                                                *
 ******************************************************************
 * 
 * $Id: FFSliderWindows.js,v 1.1 2008/06/14 20:40:51 pknoeller Exp $
 * 
 * Module for managing Slider-Windows
 * 
 * @author Philipp Knoeller
 * @copyright Copyright &copy; 2006, Philipp Knoeller
 * @link http://pksoftware.de/funktor
 * @version 1.0.0.2
 * @package funktor_ffmain
 * @subpackage js
 */
 
var FF_SLIDER_MAX_DIRECTION=1000;

/**
* Array for all slider window objects
**/
var ffSliderWindows=new Array();

/**
* Data holder for a slider window
*/
function SliderWindow(sliderId){
	this.sliderId=sliderId;
	
	this.width=null;
	this.height=null;
	
	this.side=null;
	this.timer=null;
	this.direction=0;
	this.waitTime=0;
	this.step=0;
	
	this.init=function(side, xy, slideStep, waitTime){
	     if(!side) side='top';
	     if(!xy) xy=0;
	     if(!slideStep) slideStep=4;
	     if(!waitTime) waitTime=1000;
	     
	     this.side=side;
	     this.direction=0;
         this.waitTime=waitTime;
	     
	     var sliderStyle=document.getElementById(this.sliderId).style;
	     var pageDim=getVisiblePageSize(); 
	     var scrollY=FFUniBrowser.getScrollY();	    
	     var scrollX=FFUniBrowser.getScrollX();
	     this.height=getComputedHeight(this.sliderId);
	     this.width=getComputedWidth(this.sliderId);
	            
	     
	     if(this.side=='top'){
	         sliderStyle.top=(scrollY-this.height-40)+'px';
	         this.step=slideStep;
	         if(xy) sliderStyle.left=xy+'px';
         }
         else if(this.side=='bottom'){
            sliderStyle.top=(pageDim.height+scrollY+40)+'px';
            this.step=-slideStep;
            if(xy) sliderStyle.left=xy+'px';
         }
         else if(this.side=='left'){
            sliderStyle.left=(scrollX-this.width-40)+'px';
            this.step=slideStep;
            if(xy) sliderStyle.top=xy+'px';
         }
         else if(this.side=='right'){
            sliderStyle.left=(pageDim.width+scrollX+40)+'px';
            this.step=-slideStep;
            if(xy) sliderStyle.top=xy+'px';
         }
         
         
         
	}
	
	this.isHorOrVert=function(){
	     return this.side=='left' || this.side=='right';
	}
	
	this.closeWindow=function(){
		 this.direction=this.waitTime;
	}
	
	this.getOpenLimit=function(newLeftTop){
	    var scrollY=FFUniBrowser.getScrollY();
	    var scrollX=FFUniBrowser.getScrollX();
	     var pageDim=getVisiblePageSize();
	    if(this.side=='top'){
	          return newLeftTop>scrollY ? scrollY : null;
	    }      
	    else if(this.side=='bottom'){
	          var limit=pageDim.height+scrollY-this.height;
	          return newLeftTop<limit ? limit : null;
	    }
	    else if(this.side=='left'){
	          return newLeftTop>scrollX ? scrollX : null;
	    }      
	    else if(this.side=='right'){
	          var limit=pageDim.width+scrollX-this.width;
	          return newLeftTop<limit ? limit : null;
	    }      
	 }    
	 
	 this.getCloseLimit=function(newLeftTop){
	      var scrollY=FFUniBrowser.getScrollY();
	      var scrollX=FFUniBrowser.getScrollX();
	     var pageDim=getVisiblePageSize();
	      if(this.side=='top'){ 
	          var limit=-(this.height+20);
	          return newLeftTop< limit ? limit : null;
	      }
	      else if(this.side=='bottom'){
	           var limit=pageDim.height+scrollY+20;
	           return newLeftTop>limit ? limit : null;
	      }
	      else if(this.side=='left'){ 
	          var limit=-(this.width+20);
	          return newLeftTop< limit ? limit : null;
	      }
	      else if(this.side=='right'){
	           var limit=pageDim.width+scrollX+20;
	           return newLeftTop>limit ? limit : null;
	      }
	          
	 }   
	 
	 this.openStep=function(){
	             var sliderStyle=document.getElementById(this.sliderId).style;
      	         var isHor=this.isHorOrVert();
      	         var oldLeftTop=getPxValue(isHor ? sliderStyle.left : sliderStyle.top);
      	         var newLeftTop=oldLeftTop+parseInt(this.step);
      	         var limit=this.getOpenLimit(newLeftTop);
      	         if(null != limit){
		         	   if(isHor)
		         	   sliderStyle.left=limit + 'px';
		         	   else
		         	   sliderStyle.top=limit + 'px';
		     	       
		     	       this.direction++;
		     	 }
		         else if(this.direction==0){
	                  if(isHor)
		         	   sliderStyle.left=newLeftTop + 'px';
		         	   else
		         	   sliderStyle.top=newLeftTop + 'px';	   
		         }
      }	
      
      this.closeStep=function(){
                 var sliderStyle=document.getElementById(this.sliderId).style;
	              var isHor=this.isHorOrVert();
	              var oldLeftTop=getPxValue(isHor ? sliderStyle.left : sliderStyle.top);
	             this.direction=this.waitTime;
		         var newLeftTop=oldLeftTop-parseInt(this.step);
	     	     var limit=this.getCloseLimit(newLeftTop);
	     	     if(null!=limit){ 
		                window.clearInterval(this.timer);
		                gE(this.sliderId).style.display='none';
		         }
		         else{
		         	   if(isHor)
		         	   sliderStyle.left=newLeftTop + 'px';
		         	   else
		         	   sliderStyle.top=newLeftTop + 'px';	      
		         }
      }	      
      
      this.slideStep=function(){
               if(this.direction<this.waitTime)
      	         this.openStep();
	           else  
	             this.closeStep();
	  }          
}



/**
* Registers/Shows a slider window
*/
function registerSliderWindow(sliderWindowId, intervalSeconds, slideStep, waitTime, xy, side){

	     gE(sliderWindowId).style.display='';
	     
	     if(!ffSliderWindows[sliderWindowId]){
	            ffSliderWindows[sliderWindowId]=new SliderWindow(sliderWindowId);
	     }
	     
	     
	     var sliderWindow=ffSliderWindows[sliderWindowId];
	     
	     sliderWindow.init(side, xy, slideStep, waitTime==0 ? Math.max(30, sliderWindow.height/4) : waitTime);
         if(intervalSeconds) sliderWindow.timer=window.setInterval("sliderWindowTimer('"+sliderWindowId+"')", intervalSeconds*1000);
         
}

/**
* Variable for universal slider timer
**/
var sliderWindowsTimer;

/**
* Starts the universal slider timer. It is responsible for all slider windows who do not have own timers.
**/
function startSliderTimer(intervalSeconds){
	  sliderWindowsTimer=window.setInterval("showSliderWindows()", intervalSeconds*1000)
}

/**
* Stops the universal slider timer
**/
function stopSliderTimer(){
	  window.clearInterval(sliderWindowsTimer);
}

/**
* Timer function for universal slider timer
**/
function showSliderWindows(){
	//alert(ffSliderWindows['instant_messaging']);
	  for(var wId in ffSliderWindows){
	  	     if(!ffSliderWindows[wId].timer) sliderWindowTimer(wId);
	  }
	
}

/**
* Timer function for a slider window
*/
function sliderWindowTimer(sliderWindowId){
	     if(!ffSliderWindows[sliderWindowId]) return;
	     ffSliderWindows[sliderWindowId].slideStep();
}

/**
* Makes a slider to close itself
*/
function closeSlideWindow(sliderWindowId){
	   if(!ffSliderWindows[sliderWindowId]) return;
	   ffSliderWindows[sliderWindowId].closeWindow();
}/**
 ******************************************************************
 *              Philipp Knöller Software Entwicklung              *
 *                        Framework Funktor                       *
 *                           Version 0.9b                         *
 *                                                                * 
 *                  http://pksoftware.de/funktor                  *
 *                                                                *
 ******************************************************************
 * 
 * FUtils.js
 * 
 * @author Philipp Knöller
 * @copyright Copyright &copy; 2006, Philipp Knöller
 * @link http://pksoftware.de/funktor
 * @version 1.0.0.1
 */

/**
 * PHP equivalent function for formating numbers
 * @author Philipp Knoeller
 */
function number_format (number, decimals, dec_point, thousands_sep){
	  var exponent = "";
	  var numberstr = number.toString ();
	  var eindex = numberstr.indexOf ("e");
	  if (eindex > -1){
	    exponent = numberstr.substring (eindex);
	    number = parseFloat (numberstr.substring (0, eindex));
	  }
	  
	  if (decimals != null){
	    var temp = Math.pow (10, decimals);
	    number = Math.round (number * temp) / temp;
	  }
	  var sign = number < 0 ? "-" : "";
	  var integer = (number > 0 ? 
	      Math.floor (number) : Math.abs (Math.ceil (number))).toString ();
	  
	  var fractional = number.toString ().substring (integer.length + sign.length);
	  dec_point = dec_point != null ? dec_point : ".";
	  fractional = decimals != null && decimals > 0 || fractional.length > 1 ? 
	               (dec_point + fractional.substring (1)) : "";
	  if (decimals != null && decimals > 0){
	       for (i = fractional.length - 1, z = decimals; i < z; ++i)
	          fractional += "0";
	  }
	  
	  thousands_sep = (thousands_sep != dec_point || fractional.length == 0) ? 
	                  thousands_sep : null;
	  if (thousands_sep != null && thousands_sep != ""){
		   for (i = integer.length - 3; i > 0; i -= 3)
	           integer = integer.substring (0 , i) + thousands_sep + integer.substring (i);
	  }
	  
	  return sign + integer + fractional + exponent;
}

/**
 * replaces a substring with another
 */
function replaceIt(string, suchen, ersetzen) {
    var ausgabe = "" + string;
    while (ausgabe.indexOf(suchen)>-1) {
         pos= ausgabe.indexOf(suchen);
         ausgabe = "" + (ausgabe.substring(0, pos) + ersetzen + 
         ausgabe.substring((pos + suchen.length), ausgabe.length));
    }
    return ausgabe;
}

/**
* cut off the px 
*/
function getPxValue(rawPx){
    if(rawPx==null){ return 0;}
    var tempX=rawPx.split('px');
    if(tempX.length==1){
         return tempX[0]=='px'?0:tempX[0];
    }
    else{
         return parseInt(tempX[0]);
    }
}

/**
 * Short form for document.getElementById
 */
function gE(elementId) { return document.getElementById(elementId); }

/**
 * Short form for document.getElementsByTagName
 */
function gT(tagName) { return document.getElementsByTagName(tagName); }


function findeFlash (flash) {
    if (document.all) {
      if (document.all[flash]) {
        return document.all[flash];
      }
      if (window.opera) {
        var movie = eval(window.document + flash);
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if(document.layers) {
      if(document.embeds) {
        var movie = document.embeds[flash];
        if (movie.SetVariable) {
          return movie;
        }
      }
      return;
    }
    if (!document.getElementById) {
      return;
    }
    var movie = document.getElementById(flash);
    if (movie.SetVariable) {
      return movie;
    }
    var movies = movie.getElementsByTagName('embed');
    if (!movies || !movies.length) {
      return;
    }
    movie = movies[0];
    if (movie.SetVariable) {
      return movie;
    }
    return;
  }/**
 ******************************************************************
 *              Philipp Knoeller Software Entwicklung             *
 *                        Framework Funktor                       *
 *                           Version 1.0                          *
 *                                                                * 
 *                  http://pksoftware.de/funktor                  *
 *                                                                * 
 *                       ALL RIGHTS RESERVED                      *
 *                                                                *
 ******************************************************************
 * 
 * $Id: FBrowser.js,v 1.1 2008/06/14 20:40:42 pknoeller Exp $
 * 
 * @author Philipp Knoeller
 * @copyright Copyright &copy; 2006, Philipp Knoeller
 * @link http://pksoftware.de/funktor
 * @version 1.0.0.2
 * @package funktor_ffmain
 * @subpackage js
 */

/**
 * Is Internet Explorer?
 */
function isIE(){ return !window.opera && navigator.userAgent.indexOf("MSIE") !=-1;}

isNS4 = (document.layers) ? 1 : 0;
isIE4 = (document.all) ? 1 : 0;
isW3C = (document.getElementById && !document.all) ? 1 : 0;

/**
 * function for retrieving the browser's calculated CSS property values
 */
function getCalculatedProperty(objName, property) {

    // ***** W3C Compatible DOM (NN6, Mozilla 16, etc.) *****

    if (isW3C) {
        docObj = document.getElementById(objName);
		
        if (property == "visibility") {
	        cssp = docObj.style.visibility;
	        return (cssp == "") ? "inherit" : cssp;
	    }

	    if (property == "clip") {
	        cssp = docObj.style.clip;

	        if (cssp == "") {
		       cssStr = "rect(0px "; 
		       cssStr += getCalculatedProperty(objName, "width") + " ";
		       cssStr += getCalculatedProperty(objName, "height") + " ";
		       cssStr += "0px)";
		       return cssStr;
	        }
	        return cssp;
	    }

	    if (property == "zIndex") {
	       cssp = docObj.style.zIndex;
	       return (cssp == "") ? "inherit" : cssp;
	    }

	    cssp = document.defaultView.getComputedStyle(docObj, "").getPropertyValue(property);

	    return (cssp == "") ? "unknown" : cssp;
    }

    // ***** Netscape Navigator 4+ DOM *****

    if (isNS4) {
	    docObj = document.layers[objName];

	    if (property == "visibility") {
	          cssp = docObj.visibility;
	          return (cssp == "hide") ? "hidden" : (cssp == "show") ? "visible" : "inherit";
	    }

	    if (property == "clip") {
	          cssStr = "rect(" + docObj.clip.top + "px ";
	          cssStr += docObj.clip.right + "px ";
	          cssStr += docObj.clip.bottom + "px ";
	          cssStr += docObj.clip.left + "px)";
	          return cssStr;
	    }

	    if ((property == "width") || (property == "height")) {
	         return eval("docObj.clip." + property) + "px";
	    }

	    if (property == "top") property = "pageY";
	    if (property == "left") property = "pageX";

	    cssp = eval("docObj." + property);

	    if (property != "zIndex") cssp += "px";

	    return cssp;
    }

    // ***** Internet Explorer 4+ DOM *****

    if (isIE4) {
	     if (property == "width") return eval(objName + ".offsetWidth") + "px";

	     if (property == "height") return eval(objName + ".offsetHeight") + "px";

	     if (property == "clip") {
	          cssp = eval(objName + ".style.clip");

	          if (cssp == "") {
		           cssStr = "rect(0px ";
		           cssStr += getCalculatedProperty(objName, "width") + " ";
		           cssStr += getCalculatedProperty(objName, "height") + " ";
		           cssStr += "0px)";
		           return cssStr;
	          }
	          return cssp;
	     }

	     if (property == "top") return eval(objName + ".offsetTop") + 'px';

	     if (property == "left") return eval(objName + ".offsetLeft") + 'px';

        // Else, use 'currentStyle' to find the rest

	     return eval(objName + ".currentStyle." + property);
    }
}

/**
 * ermittelt die aktuelle Breite eines Elements (Laufzeit)
 * @author Philipp Knöller
 */
function getComputedWidth(elementId){
	  var el=document.getElementById(elementId);
      
      return isIE() ? el.offsetWidth : getPxValue(document.defaultView.getComputedStyle(el, null).getPropertyValue("width"));
}

/**
 * ermittelt die aktuelle Hoehe eines Elements (Laufzeit)
 * @author Philipp Knöller
 */
function getComputedHeight(elementId){
	  var el=document.getElementById(elementId);
      
      return isIE() ? el.offsetHeight : getPxValue(document.defaultView.getComputedStyle(el, null).getPropertyValue("height"));
}

/**
 * ermittelt die aktuelle X-Position eines Elements (Laufzeit)
 * @author Philipp Knöller
 */
function getComputedLeft(elementId){
	    var el=document.getElementById(elementId);
      
        return isIE() ? el.offsetLeft : getPxValue(document.defaultView.getComputedStyle(el, null).getPropertyValue("left"));
}

/**
 * ermittelt die aktuelle X-Position eines Elements (Laufzeit)
 * @author Philipp Knöller
 */
function getComputedTop(elementId){
	    var el=document.getElementById(elementId);
      
        return isIE() ? el.offsetTop : getPxValue(document.defaultView.getComputedStyle(el, null).getPropertyValue("top"));
}

function getCurrentStyle(elementId, attr){
	    var el=document.getElementById(elementId);
      
        return getPxValue(isIE() ? el.currentStyle[attr] : document.defaultView.getComputedStyle(el, null).getPropertyValue(attr));
}        

///////////////////////////////////////////
/////Window and Page Dimensions////////////
///////////////////////////////////////////

/**
 * returns the dimensions of the browser window
 */
function getWindowDimensions(){
   var x,y;

   if (self.innerHeight){ // all except Explorer
	   x = self.innerWidth;
	   y = self.innerHeight;
   }
   else if (document.documentElement && document.documentElement.clientHeight){ // Explorer 6 Strict Mode
	   x = document.documentElement.clientWidth;
	   y = document.documentElement.clientHeight;
   }
   else if (document.body){  // other Explorers
	   x = document.body.clientWidth;
	   y = document.body.clientHeight;
   }
   var dimensions=new Array(x,y);
   return dimensions;
}

/**
 * returns the dimensions of the visible page in the browser
 */
function getPageDimensions(){
   var x,y;
   var test1 = document.body.scrollHeight;
   var test2 = document.body.offsetHeight
   if (test1>test2) { // all but Explorer Mac
	     x = document.body.scrollWidth;
	     y = document.body.scrollHeight;
   }
   else{ // Explorer Mac; would also work in Explorer 6 Strict, Mozilla and Safari
	     x = document.body.offsetWidth;
	     y = document.body.offsetHeight;
   }
   var dimensions=new Array(x,y);
   return dimensions;
}

/**
* Returns the size of the viewport(visible area) of the browser
**/
function getVisiblePageSize(){
       var dim=new Object();
       //dim.width=document.body.scrollWidth ? document.body.scrollWidth :document.body.offsetWidth;
       //dim.height=document.body.scrollHeight ? document.body.scrollHeight : document.body.offsetHeight;
       
		if (self.innerHeight) // all except Explorer
		{
			dim.width = self.innerWidth;
			dim.height = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientHeight)
			// Explorer 6 Strict Mode
		{
			dim.width = document.documentElement.clientWidth;
			dim.height = document.documentElement.clientHeight;
		}
		else if (document.body) // other Explorers
		{
			dim.width = document.body.clientWidth;
			dim.height = document.body.clientHeight;
		}
       return dim;
}
       
///////////////////////////////////////////
/////////////Text Selection////////////////
///////////////////////////////////////////
 
var selStart=true;
var dissel=true;

document.onselectstart=selectStart;
if (window.sidebar){
    document.onmousedown=disableselect;
    document.onclick=reEnable;
}

function selectStart(e){
    return selStart;
}

function disableselect(e){
    return dissel;
}

function reEnable(){
    return true;
}

/**
 * enables/disables text selection
 */
function setTextSelectEnabled(tEnabled){
    selStart=tEnabled;
    dissel=tEnabled;
} 

/**
 * enables/disables text selection for special element
 */ 
function disableSelection(element) {
    element.onselectstart = function() {
        return false;
    };
    element.unselectable = "on";
    element.style.MozUserSelect = "none";
    element.style.cursor = "default";
} 

///////////////////////////////////////////
/////////////Event Handling////////////////
///////////////////////////////////////////

/**
 * adds an event handler
 */
function addEventHandler(obj, evType, fn, useCapture) {
    if (obj.addEventListener) {
       obj.addEventListener(evType, fn, useCapture);
       return true;
    } 
    else if (obj.attachEvent) {
       var r = obj.attachEvent('on'+evType,fn);
       return r;
    } 
    else {
       obj['on'+evType] = fn;
    }
}



var FFUniBrowser={
    /**
    * Mouse positions
    */
    mouseX:0,
    mouseY:0,
    
    /**
    * Gets the mouseX coordinate from the event
    */
	_mouseX:function(evt) {
	    if (!evt){
	          evt = window.event; 
	    }      
	    if (evt.pageX){
	          return evt.pageX; 
	    }
	    else if (evt.clientX){
	          return evt.clientX + 
	                 (document.documentElement.scrollLeft ?  
	                  document.documentElement.scrollLeft : 
	                  document.body.scrollLeft); 
	    }
	    else{ return 0;}
	}, 

	/**
	* Gets the mouseY coordinate from the event
	*/
	_mouseY:function(evt) {
	    if (!evt){
	          evt = window.event; 
	    }      
	    
	    if (evt.pageY){
	          return evt.pageY; 
	    }
	    else if (evt.clientY){ 
	          return evt.clientY + FFUniBrowser.getScrollY(); 
	    }
	    else{ return 0; }
	}, 
	
	refreshMouseCoordinates:function(evt){
	    FFUniBrowser.mouseX=FFUniBrowser._mouseX(evt);
         FFUniBrowser.mouseY=FFUniBrowser._mouseY(evt); 
	},
	
	//Scroll Wert erfassen
	getScrollY:function(){
	    return (document.documentElement.scrollTop ? 
	                  document.documentElement.scrollTop : 
	                  document.body.scrollTop);
	},
	
	setScrollY:function(newTop){
	   if(document.documentElement.scrollTop) 
	                  document.documentElement.scrollTop=newTop; 
	   else document.body.scrollTop=newTop;
	   return true;
	},
	
	//Scroll Wert erfassen
	getScrollX:function(){
	    return (document.documentElement.scrollLeft ? 
	                  document.documentElement.scrollLeft : 
	                  document.body.scrollLeft);
	},
	
    /**
    * determines the absolute position of a non absolute object
    * @author Philipp Knoeller
    * @return Object with left and top attributes
    */
    getCurrentLocation:function(obj){
         var pos = {left:0, top:0};
	     if(typeof obj.offsetLeft != 'undefined'){
		     while (obj){
		          pos.left += obj.offsetLeft;
		          pos.top += obj.offsetTop;
		          obj = obj.offsetParent;
		     }
	    }
		else{
			   pos.left = obj.left ;
			   pos.top = obj.top ;
		}
		return pos;
    },
    
    getCurrentDimension:function(obj){
	     var dim={width:0, height:0};
         dim.height=isIE() ? obj.offsetHeight : getPxValue(document.defaultView.getComputedStyle(obj, null).getPropertyValue("height"));
         dim.width=isIE() ? obj.offsetWidth : getPxValue(document.defaultView.getComputedStyle(obj, null).getPropertyValue("width"));
         return dim; 
    },
    
    getShiftAltCtrl:function(e) {
		 var returnObj=new Object();
		 returnObj.ctrl=0;
		 returnObj.alt=0;
		 returnObj.shift=0;
		
		 if (parseInt(navigator.appVersion)>3) {
		      var evt = navigator.appName=="Netscape" ? e:event;
		
			  if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)==4) {
				   // NETSCAPE 4 CODE
				   var mString =(e.modifiers+32).toString(2).substring(3,6);
				   returnObj.shift=(mString.charAt(0)=="1");
				   returnObj.ctrl =(mString.charAt(1)=="1");
				   returnObj.alt  =(mString.charAt(2)=="1");
				   self.status="modifiers="+e.modifiers+" ("+mString+")";
			  }
			  else {
				   // NEWER BROWSERS [CROSS-PLATFORM]
				   returnObj.shift=evt.shiftKey;
				   returnObj.alt  =evt.altKey;
				   returnObj.ctrl =evt.ctrlKey;
				   self.status=""
				    +  "shiftKey="+returnObj.shift 
				    +", altKey="  +returnObj.alt 
				    +", ctrlKey=" +returnObj.ctrl 
			  }
		
		 }
		 return returnObj;
     }
};	
