		var isDOM;
		try {
			if (document.compatMode=='CSS1Compat') {isDOM=true;} else {isDOM=false;}
			}
		catch (e)
			{
			isDOM=false;
			}

function CheckSession() {
    try {
        if (GetCookie('ASP.NET_SessionId') != null) {
            document.getElementById('nocookies').style.display = 'none';
        }
        else {
            document.getElementById('nocookies').style.display = '';
        }
    }
    catch (e) { }	    
}
function toggle_visibility (what) {
	var obj = document.getElementById (what);
	try	{
		if (obj.style.display=='') {obj.style.display='none';} else {obj.style.display='';}
	}
	catch (e) {}
}

function document_onmousemove() {
	X=event.clientX;
	Y=event.clientY;
}
	function getposleft(elm) {
		var left = 0;
		try {
//			if (window.navigator.userAgent.toLowerCase().indexOf("safari") > -1 && elm.tagName.toLowerCase()=='tr' && elm.childNodes[0]) {
//				//Safari MÜLL fix
//				elm = elm.childNodes[0];				
//			}
			left = elm.offsetLeft;
			while((elm = elm.offsetParent) != null) {
				left += elm.offsetLeft;
			}
		}
        catch (e) {
            
            left = 0;}
		return left;
	}

	function getpostop(elm) {
		var top = 0;
		try {
//			if (window.navigator.userAgent.toLowerCase().indexOf("safari") > -1 && elm.tagName.toLowerCase()=='tr' && elm.childNodes[0]) {
//				//Safari MÜLL fix
//				elm = elm.childNodes[0];				
//			}
			top = elm.offsetTop;
			while((elm = elm.offsetParent) != null) {
				top += elm.offsetTop;
			}
		}
		catch (e) {top = 0;}
		return top;
	}
	
	function getposleft_rel(elm) {
		var left = 0;
		try {
//			if (window.navigator.userAgent.toLowerCase().indexOf("safari") > -1 && elm.tagName.toLowerCase()=='tr' && elm.childNodes[0]) {
//				//Safari MÜLL fix
//				elm = elm.childNodes[0];				
//			}
			left = elm.offsetLeft;
			while((elm = elm.offsetParent) != null && elm.style.position!='absolute' && elm.style.overflow=='') {
				left += elm.offsetLeft;
			}
		}
		catch (e) {left = 0;}
		return left;
	}

	function getpostop_rel(elm) {
		var top = 0;
		try {            
//			if (window.navigator.userAgent.toLowerCase().indexOf("safari") > -1 && elm.tagName.toLowerCase()=='tr' && elm.childNodes[0]) {
//				//Safari MÜLL fix
//				elm = elm.childNodes[0];				
//			}
			top = elm.offsetTop;
			while((elm = elm.offsetParent) != null && elm.style.position!='absolute' && elm.style.overflow=='') {
				top += elm.offsetTop;
			}
		}
		catch (e) {top = 0;}
		return top;
	}
  function GetCookie (name)
  {
    var arg = name + "=";
    var alen = arg.length;    
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen)
    {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
        return getCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0) break;
    }
    return null;
  }
   function getCookieVal (offset)
      {
      var endstr = document.cookie.indexOf (";", offset);
      if (endstr == -1)
	 endstr = document.cookie.length;
      return unescape(document.cookie.substring(offset, endstr));
      }
	var mytree = function (name) {
		this.id = name;
		this.expand = function (nr) {
			var obj  = document.getElementById(this.id+'_'+nr);
			var exp = document.getElementById('exp_' + this.id +nr);
			var deexp = document.getElementById('col_' + this.id +nr);
			try {
				if (obj.style.display=='') {
					obj.style.display='none';
					deexp.style.display='none';
					exp.style.display='';						
				}
				else {
					obj.style.display='';
					exp.style.display='none';
					deexp.style.display='';						
				}
			}
			catch (e) {}
		}
		this.hideall = function () {
			var i;
			var x = new String();
			colObj = document.getElementsByTagName ("SPAN");
			for (i=0;i<colObj.length;i++) {
				if (colObj[i].id.indexOf (this.id+'_')>-1) colObj[i].style.display='none';
				if (colObj[i].id.indexOf ('exp_'+this.id)>-1) colObj[i].style.display='';						
			}
			colObj = document.getElementsByTagName ("DIV");
			for (i=0;i<colObj.length;i++) {
				if (colObj[i].id.indexOf (this.id+'_')>-1) colObj[i].style.display='none';
				if (colObj[i].id.indexOf ('exp_'+this.id)>-1) colObj[i].style.display='';
            }
            colObj = document.getElementsByTagName("LI");
            for (i = 0; i < colObj.length; i++) {
                if (colObj[i].id.indexOf(this.id + '_') > -1) colObj[i].style.display = 'none';
                if (colObj[i].id.indexOf('exp_' + this.id) > -1) colObj[i].style.display = '';
            }
            colObj = document.getElementsByTagName("UL");
            for (i = 0; i < colObj.length; i++) {
                if (colObj[i].id.indexOf(this.id + '_') > -1) colObj[i].style.display = 'none';
                if (colObj[i].id.indexOf('exp_' + this.id) > -1) colObj[i].style.display = '';
            }			
		}
	}
	var mydd = function (name,mode,placement,keepvis,dd) {
		this.id = name;
		this.open = new Array;
		this.openleft = new Array;
		this.opentop = new Array;
		this.callerid = new Array;
		this.opencount = 0;
		this.positionmode = mode; //absolute,''	 ...
		this.placement = placement; //center,left  ...
		this.defaultdropdir = dd;
		this.keepvis = keepvis;
		this.displacement = 0;		
		this.x = 0;
		this.y = 0;
		this.oldtype = '';
		
		this.dropdown = function (evt,caller,nr,direction,type) {		    
			var re = /px/g;
			var obj = document.getElementById(this.id+'_'+nr);
			//var tester = document.getElementById('testdiv');
			
			if (type) {
				if (this.oldtype != type) {this.hideall();this.opencount=0;this.open[0]='';this.callerid[0]='';}
			}
			this.callerid[this.opencount]=caller.id;
			
			if (this.opencount>0) {
				if (this.open[this.opencount-1]!=this.id+'_'+nr) {this.hide(evt);}
			}
			for (i=0;i<this.opencount;i++) {
				if (this.open[i]==this.id+'_'+nr) {
					return (0);
				}
			}
			this.open[this.opencount] = this.id+'_'+nr;			
			var addX = new Number (0);
			var addY = new Number (0);
			var sleft = new Number(0);
			var stop = new Number(0);
			var width = new Number(0);
			
			if (isDOM) {
				width = caller.offsetWidth;
			} else {
				if (window.navigator.userAgent.toLowerCase().indexOf("safari") > -1 && caller.tagName.toLowerCase()=='tr' && caller.childNodes[0]) {
					width  = caller.offsetParent.offsetWidth;				
				} else {
					width = caller.offsetWidth;
				}
			}
			
			if (this.opencount>0) {
				addX = Number (this.openleft[this.opencount-1]);
				addY = Number (this.opentop[this.opencount-1]);
			}
			this.opencount+=1;
			
			//tester.innerHTML = 'Opencount=' + this.opencount + ' SLeft =' + getposleft_rel(caller) + ' STop=' +getpostop_rel(caller) + ' addx=' + addX;
			try {
				if (obj.style.display=='none' ) {
				
					sleft = getposleft_rel (caller);
					stop  = getpostop_rel (caller);
					
					obj.style.position = this.positionmode;
					
					switch (direction) {
						case 'down':
							stop = stop + caller.offsetHeight;
							break;						
						case 'right':
							sleft += width-1;
							stop+=1;
							break;	
						case 'left':
							obj.style.display = '';
							sleft = sleft - width+1;
							stop+=1;
							obj.style.display='none';
							break;
						case 'top':				
							obj.style.display = '';			
							stop-=obj.offsetHeight+1;
							obj.style.display='none';
							break;						
						}
					if (this.placement == 'left') {
						obj.style.left = sleft + addX + 'px';
						obj.style.top = stop + addY + 'px';
					}
					else {
						obj.style.display = '';
						var nleft = ((sleft+addX)+width/2) - obj.offsetWidth/2;
						obj.style.left = nleft + 'px';
						if (nleft<=0) obj.style.left='0px';
						obj.style.top = stop+addY + 'px';
					}
					obj.style.position = this.positionmode;
					obj.style.display = '';
					
					//tester.innerHTML += tester.innerHTML + ' obj hat pos: left=' + obj.style.left.replace (re,'') + ' top=' + obj.style.top.replace (re,'');
					this.openleft[this.opencount-1] = obj.style.left.replace (re,'');
					this.opentop [this.opencount-1] = obj.style.top.replace (re,'');
				}
				else {				
				}
			}
			catch (e) {}
		}
		
		this.hideopen = function (evt) {
			var i;
			var keep;
			var donthide=0;
			for (i=0;i<this.opencount;i++) {
				try {
				    donthide+=this.hittest (evt,document.getElementById(this.open[i]));
				    donthide+=this.hittest (evt,document.getElementById(this.callerid[i]));
					}
				catch (e)
					{
					}
			}		
			
			if (donthide==0 || this.opencount>1) {
				for (i=0;i<this.opencount;i++) {
					try {
						document.getElementById(this.open[i]).style.display='none';
						this.open[i]='';
						this.callerid[i]='';
						}
					catch (e)
						{
						}
				}						
				this.opencount=0;
			}
		}		

		this.sethide = function () {
		//window.setTimeout (this.id + ".dohide()", 100);
		}
		
		this.hide = function (evt) {			
			var i;
			var j = 0;
			var hit;
			var hits = new Array;
			var donthide=0;
    		for (i=0;i<this.opencount;i++) {
    		    hit = this.hittest (evt,document.getElementById(this.open[i]));
    		    hit += this.hittest (evt,document.getElementById(this.callerid[i]));
    		    donthide+=hit;
				if (hit!=false) {
					hits[i]=true										
				}
				else {
					hits[i]=false
				}
			}
			cstart = this.opencount-1;
			for (i=cstart;i>=0;i--) {
				if (hits[i] == false) {
					try {
						document.getElementById(this.open[i]).style.display='none';
					} catch (e) {}
					this.open[i] = '';
					this.callerid[i] = '';
					this.opencount-=1
				}
				else {
					break;
				}
			}
		}
				
		this.hittest = function (evt,caller) {
			try {
				sleft	= getposleft (caller)+1;
				stop	= getpostop (caller)+1;
				
				if (isDOM) {
					height	= caller.offsetHeight+2;
					width	= caller.offsetWidth+2;
					mx		= evt.clientX+document.documentElement.scrollLeft;
					my		= evt.clientY+document.documentElement.scrollTop;
				} else {
					if (window.navigator.userAgent.toLowerCase().indexOf("safari") > -1 && caller.tagName.toLowerCase()=='tr' && caller.childNodes[0]) {
						width   = caller.offsetParent.offsetWidth+2;
						height	= caller.offsetParent.offsetHeight+2;				
					} else {
						height	= caller.offsetHeight+2;
						width	= caller.offsetWidth+2;
					}
				
					if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
						mx		= evt.clientX+document.body.scrollLeft;
						my		= evt.clientY+document.body.scrollTop;
        			}
					else {
						mx		= evt.clientX;
						my		= evt.clientY;
					}								
				}
				
				if (mx > (sleft) && mx < (sleft+width) && my > (stop) && my< (stop+height)) {
					return (true);
				}
				else {
					return (false);
				}	
			}
			catch (e) {
				return (false);
			}		
		}
		
		this.hideall = function () {
			var i;
			var x = new String();
//			colObj = document.all;
			colObj = document.getElementsByTagName ("SPAN");
			for (i=0;i<colObj.length;i++) {
				if (colObj[i].id.indexOf (this.id+'_')>-1) {colObj[i].style.display='none';}
				if (colObj[i].id.indexOf ('exp_'+this.id)>-1) {colObj[i].style.display='';}
			}
			colObj = document.getElementsByTagName ("DIV");
			for (i=0;i<colObj.length;i++) {
				if (colObj[i].id.indexOf (this.id+'_')>-1) {colObj[i].style.display='none';}
				if (colObj[i].id.indexOf ('exp_'+this.id)>-1) {colObj[i].style.display='';}
			}
			if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {
				this.displacement=0;
				}
			else {
				this.displacement=-20;
				}
		}
		this.opendefault = function () {
			if (this.keepvis!='') {
				nr = this.keepvis;
				obj = document.getElementById('mnu_' + this.id + nr);			
				this.dropdown (null,obj,nr,this.defaultdropdir,'default');
			}
		}
		this.checkmouse = function (str,e) {			
		}
	}

	function ShowGlossary (evt,id,AddX,AddY) {
		var x;
		var y;
		obj = document.getElementById(id);
		x = evt.clientX;
		y = evt.clientY;
		x += AddX;
		y += AddY;
		
		obj.style.position = 'absolute';
		obj.style.left = x+'px';
		obj.style.top  = y+'px';
		obj.style.display  = '';
	}

	function ShowGlossaryREL (evt,parent,id,AddX,AddY) {
		var x;
		var y;
		obj = document.getElementById(id);
		x = evt.clientX;
		y = evt.clientY;
		x += AddX;
		y += AddY;
		
		x -= getposleft_rel(parent);
		y -= getpostop_rel(parent);
		
		obj.style.position = 'absolute';
		obj.style.left = x+'px';
		obj.style.top  = y+'px';
		obj.style.display  = '';
	}
	function HideGlossary (id) {
		var x;
		var y;
		obj = document.getElementById(id);
		obj.style.display  = 'none';
	}

function changeurl (obj) 
	{
	try 
		{
		url = obj.value;
		document.location.href=url;
		}
	catch (e)
		{
		}
	}	
	
	function ExpanderPanel_Toggle( targetID, buttonID, imageUrl, collapsedImageUrl ) {
	  var id=targetID.replace('t','');
	  if ( document.getElementById ) {
		  var target = document.getElementById( targetID );
		  if ( target != null ) {
			  
			  target.style.display = ( target.style.display != "none" ) ? "none" : "";
			  
			  a = getGroupAry();
			  b = new Array();
			  
			  count=0;
			  found = false;			  
			  for(i=0;i<a.length;i++){
			  
			    if(a[i] == id) {
			        found=true;
					if (target.style.display == "none") { 
						b[count]=a[i];					
						count++;
					}
				}
				else {
					b[count]=a[i];					
					count++;
				}
			  }
  			  if (found==false) b[count]=id;
			  d = new Date();
			  d.setFullYear(d.getFullYear()+1);			
			  setForumCookie("hidegroups", setGroupAry(b), d);
		  }

		  if ( collapsedImageUrl != "" ) {
			  var imageButton = document.getElementById( buttonID );
			  if ( imageButton != null ) {
				  imageButton.src = ( target.style.display != "none" ) ? collapsedImageUrl : imageUrl;
			  }
		  }

		  return false;
	  }
	  return true;
}
function getGroupAry() {
  var x = getForumCookie("hidegroups");
    
  if(x != null && x.length > 0 && x !='undefined'){
    var a = x.split(':');
    return a;
  }
  return new Array();
}
function setGroupAry(a) {
  var o = "";
  for (i=0;i<a.length;i++){
    if(i>0) o += ":";
    o += a[i];
  }
  return o;
}
function RestoreView(imageUrl, collapsedImageUrl) {
  var a = new Array();
  a = getGroupAry();
  for(i=0;i<a.length;i++){
    obj = document.getElementById("t"+ a[i]);
    btn = document.getElementById("b"+ a[i]);
    if(obj !=null && obj != "undefined"){
      obj.style.display = "none";
      btn.src = imageUrl;
    }
  }
}
function setForumCookie(sName, sValue, date) {
  if (sValue=='undefined' || sValue==null) sValue='';
  document.cookie = sName + "=" + escape(sValue) + "; expires=" + date.toGMTString();
}
function getForumCookie(sName) {
  var aCookie = document.cookie.split(";");
  for (var i=0; i < aCookie.length; i++)
  {
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }
  return null;
}

function deleteForumCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" + 
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}
function fixForumDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

function imageRotator(inModuleId, inContent, inWatchTime, inFadeSpeed) {

    this.content = inContent;
    this.watchTime = inWatchTime;
    this.fadeSpeed = inFadeSpeed;
    this.moduleId = inModuleId;

    this.imageCount = 0;
    this.imgLoadedCount = 0;
    this.idList = new Array(); //id list of faded images
    this.curFadedImage = 0;
    this.opacity = 100;

    this.fadeInterval;
    this.checkInterval;

    this.maxWidth = 250;
    this.maxHeight = 200;

    this.hAlign = "center";
    this.vAlign = "middle";


    //get parent size and alignment

    var parentElement = document.getElementById(this.moduleId).parentNode;


    if (parentElement.style.width != "") {
        this.maxWidth = parentElement.style.width;
        this.maxWidth = this.maxWidth.replace(/px/, '');
    }

    if (parentElement.style.height != "") {
        this.maxHeight = parentElement.style.height;
        this.maxHeight = this.maxHeight.replace(/px/, '');
    }

    if (parentElement.style.textAlign != "")
        this.hAlign = parentElement.style.textAlign;

    if (parentElement.style.verticalAlign != "")
        this.vAlign = parentElement.style.verticalAlign;


    moduleDiv = document.getElementById(this.moduleId);

    moduleDiv.style.width = this.maxWidth;
    moduleDiv.style.height = this.maxHeight;



    this.fadeImage = function(index) {
        var fadedDiv = document.getElementById(this.moduleId + "_div_" + index);
        fadedDiv.style.MozOpacity = this.opacity / 100;
        fadedDiv.style.opacity = this.opacity / 100;
        fadedDiv.style.filter = 'Alpha(opacity=' + this.opacity + ', finishopacity=0, style=0)';
        this.opacity -= 2;

        if (this.opacity <= 0) {
            this.opacity = 100;
            fadedDiv.style.display = "none";
            window.clearInterval(this.fadeInterval);

            if (this.curFadedImage >= this.imageCount - 1) {
                this.resetImages(this.idList);
                this.curFadedImage = 0;
            }


            var thisObject = this;

            window.setTimeout(function() { thisObject.rotateImages() }, this.watchTime);
        }
    }


    this.createImages = function() {
        var list = new Array();
        var tmpList = new Array();

        tmpList = this.content.split(';');
        //delete elements without image src
        for (i = 0; i < tmpList.length; i++) {
            var aHlp = tmpList[i].split(',');
            if (aHlp[0] != "")
                list.push(tmpList[i]);
        }
        this.imageCount = list.length;

        if (this.imageCount == 0)
            return;

        var imageResult = '';
        var repeatLastImage = '';

        //create image position

        for (i = 0; i < this.imageCount; i++) {
            var imageInfo = list[i].split(','); //(0)=image id, (1)=image link, (2)=link target
            var imageId = 0;
            if (this.imageCount > 1)
                imageId = list.length - i;
            else
                imageId = 0;

            imageResult += this.createImage(imageId, imageInfo[0], imageInfo[1], imageInfo[2]);

            this.idList.push(imageId);

            if (repeatLastImage == '')
                repeatLastImage = this.createImage(0, imageInfo[0], imageInfo[1], imageInfo[2]);

        }
        //repeat last image for looping (last image = first image)

        if (this.imageCount > 1) {
            imageResult += repeatLastImage;
            this.idList.push(0);
            this.imageCount++;

        }
        //render images in div !!!
        document.getElementById(this.moduleId).innerHTML = imageResult;

        //set first image id to be faded
        this.curFadedImage = 0;

        this.addOnLoadFunction();

    }
    this.createImage = function(imageId, imageSrc, imageLink, linkTarget) {
        var dsp = 'none';
        var result = '';

        if (imageId == 0)
            dsp = 'block';

        if (linkTarget == '')
            linkTarget = '_self';

        if (imageLink == '')
            result = '<div id="' + this.moduleId + '_div_' + imageId + '" style="margin:0px; padding:0px; text-align:' + this.hAlign + '; background-color:#FFFFFF; width:' + this.maxWidth + 'px; height:' + this.maxHeight + 'px; filter:alpha(opacity=100); display:' + dsp + '; position:absolute; z-index:' + imageId + '"><div id="' + this.moduleId + '_hSpacer_' + imageId + '" style="margin:0px; padding:0px;"></div><img hspace="0" vspace="0" id="' + this.moduleId + '_image_' + imageId + '" alt="" src="dynimage.aspx?id=' + imageSrc + '&maxx=' + this.maxWidth + '&maxy=' + this.maxHeight + '" border="0" /></div>';
        else
            result = '<div id="' + this.moduleId + '_div_' + imageId + '" style="margin:0px; padding:0px; text-align:' + this.hAlign + '; background-color:#FFFFFF; width:' + this.maxWidth + 'px; height:' + this.maxHeight + 'px; filter:alpha(opacity=100); display:' + dsp + '; position:absolute; z-index:' + imageId + '"><div id="' + this.moduleId + '_hSpacer_' + imageId + '" style="margin:0px; padding:0px; border:1px solid #FF0000;"></div><a href="' + imageLink + '" target="' + linkTarget + '"><img hspace="0" vspace="0" id="' + this.moduleId + '_image_' + imageId + '" alt="" src="dynimage.aspx?id=' + imageSrc + '&maxx=' + this.maxWidth + '&maxy=' + this.maxHeight + '" border="0" /></a></div>';

        return result;

    }
    this.addOnLoadFunction = function() {
        for (i = 0; i < this.imageCount; i++) {
            var imageObj = document.getElementById(this.moduleId + '_image_' + i);

            imageObj.onLoad = this.imageLoaded();
        }

        var thisObject = this;
        this.checkInterval = window.setInterval(function() { thisObject.checkImageStatus() }, 200);

    }
    this.imageLoaded = function() {
        this.imgLoadedCount++;
    }
    this.showAllImages = function() {
        for (i = 0; i < this.imageCount; i++) {

            document.getElementById(this.moduleId + '_div_' + i).style.display = 'block';

            //set spacer height for vertical alignment

            if (this.vAlign == 'middle') {
                var sHeight = (this.maxHeight - document.getElementById(this.moduleId + '_image_' + i).height) / 2;
                sHeight = Math.round(sHeight);

                if (sHeight > 12) {
                    document.getElementById(this.moduleId + '_hSpacer_' + i).style.height = sHeight + "px";
                    document.getElementById(this.moduleId + '_hSpacer_' + i).style.minHeight = sHeight + "px";
                    document.getElementById(this.moduleId + '_hSpacer_' + i).style.lineHeight = sHeight + "px";

                }
            }


        }
    }
    this.checkImageStatus = function() {

        if (this.imgLoadedCount >= this.imageCount) {
            window.clearInterval(this.checkInterval);
            this.showAllImages();

            //start rotating

            var thisObject = this;
            window.setTimeout(function() { thisObject.rotateImages() }, this.watchTime);
        }
    }
    this.resetImages = function(idList) {
        for (i = 0; i < idList.length; i++) {
            hlpId = this.moduleId + '_div_' + idList[i];

            document.getElementById(hlpId).style.display = 'block';

            if (document.getElementById(hlpId).style.MozOpacity)
                document.getElementById(hlpId).style.MozOpacity = 100;

            if (document.getElementById(hlpId).style.filter)
                document.getElementById(hlpId).style.filter = 'Alpha(opacity=100, finishopacity=0, style=0)';

            if (document.getElementById(hlpId).style.opacity)
                document.getElementById(hlpId).style.opacity = 100;
        }
    }
    this.rotateImages = function() {
        if (this.imageCount > 1) {
            var index = this.idList[this.curFadedImage];

            var thisObject = this;
            this.fadeInterval = window.setInterval(function() { thisObject.fadeImage(index) }, this.fadeSpeed);

            this.curFadedImage++;
        }
    }
    this.createImages();
}

