    	function posSkyscraper() {
	      sky = document.getElementById('skyscraper');
	      con = document.getElementById('globaldesign');
	      // sky = $('skyscraper');
	      // content = $('globaldesign');
	      if (sky != null && con != null) {  
	    	  sky.style.display = "none";
	    	  sky.style.position = "absolute";
	    	  sky.style.left = ((con.offsetLeft + con.offsetWidth +10)) + "px";
	    	  sky.style.top = (con.offsetTop + 87) + "px";
	    	  sky.style.display = "block";
	      }
      }
      
		function myMouseClick(evt) {
			if ( navigator.appName.indexOf("Microsoft") != -1 ) {
				if ( evt.button == 2 ) {
					alert("Rechtsklick hier nicht m�glich");
					return false;
				}
			}
			if ( navigator.appName.indexOf("Netscape") != -1 ) {
				if ( evt.which == 3 ) {
					alert("Rechtsklick hier nicht m�glich");
					return false;
				}
			}
			if ( navigator.appName.indexOf("Mozilla") != -1 ) {
				alert("Mozilla");
				if (evt.which == 3 ) {
					alert("Rechtsklick hier nicht m�glich");
					return false;
				}
			}
		}

   
      
      
		function changeImg(n) {
			if (n >= 0) {
				for (i = -1; i < n; i++) {
					j = i + 1;
					btn = 'vote' + j;
					document.getElementById(btn).className = 'on';
				}
			} else {
				for (i = -1; i < 10; i++) {										
					j = i + 1;
					btn = 'vote' + j;
					document.getElementById(btn).className = 'off';
				}
			}
			return true
		}	


	function showBox(id) {
		box  = document.getElementById(id);
		box2 = document.getElementById('jetztmitmachen');

		if (box != null) {		
			if (box.style.display == "block") {
				box.style.display = "none";
				if (box2 != null) { box2.style.display = "block";  }
			} else {
				box.style.display = "block";
				if (box2 != null) { box2.style.display = "none";  }
				if (id == "loginbox") {
					setFocus('username');
				}
			}
		}
	}
	
	function showBoxRelative(parent,box) {
		parent = document.getElementById(parent);
		box = document.getElementById(box);
		
		if (box != null && parent != null) {		
			if (box.style.display == "block") {
				box.style.display = "none";
			} else {
				box.style.display = "block";
				box.style.position = "absolute";
				box.style.left = ((parent.offsetLeft + parent.style.width) - box.style.width - 129) + "px";
				box.style.top = (parent.offsetTop + 30) + "px";
				
				if (box == "loginbox") {
					setFocus('username');
				}
			}
		}		
	}
	
	function alertUser(message) {
		if (message != "") {
			alert(message);
		}
	}

	if (!opener)
		self.name='aihonmain';

	function showtooltip(id) {
		ftooltip = document.getElementById(id);
		ftooltip.style.display = "block";
	}
	
	function hidetooltip() {
		ftooltip.style.display = "none";
	}	
	
	function setFocus(elem) {
		var obj_focus = document.getElementById(elem);
		if (obj_focus != null) {
			obj_focus.focus();
		}
	}
		
	function OpenWinSized(url,width,height) {
		zoomfenster=window.open(url,"zoom","width="+width+",height="+height+",scrollbars=0,top="+40+",left="+40);
	}
	
	function OpenWin(url) {
	  var  handle=window.open(url,"detail","width=540,height=900,scrollbars=1,top=0,left=0,resizable=1");
	}	
	
	function OpenWinSizedScrollable(url,width,height) {
		var win_status="no"; 
		var win_scroll="yes"; 
		var x = 40;
		var y = 40;
		var winparams='toolbar=no,location=no,directories=no,menubar=no,status='+win_status+','; 
		winparams+='scrollbars='+win_scroll+',resizable=no';
		if (navigator.appName.indexOf("Microsoft")>=0) { 
			winparams+=',left=' + x + ',top=' + y + ',width=' + width + ',height=' + height; 
		} else { 
			winparams+=',screenX=' + x + ',screenY=' + y + ',width=' + width + ',height=' + height; 
		} 
		var popup=window.open(url,"honpopup",winparams); 
		if (popup != null) {
			popup.focus(); 
		}
	}		
	
	function opensmiliewindow(x,y,sessionhash) {
		// um... opens smilie overflow window.
		window.open("/forum/misc.php?action=getsmilies&s="+sessionhash, "smilies", "toolbar=no,scrollbars=yes,resizable=yes,width="+x+",height="+y);
	}	
	
	/**
	* aktiviert das richtige element im menü und submenü direkt beim seitenaufbau. 
	* die prototype helper sind noch nicht geladen zu diesem zeitpunkt.
	*/
	function activeMenu(element, submenu_element) {
		if (element != "") {
		  var object = document.getElementById(element);
		  var sub_object = document.getElementById('sub_'+element);
			if (object != null) {
				if (object == "home") {
					object.className = 'ButtonActive einrueckHome';					
				} else {
					object.className = 'ButtonActive';					
				}
			}
		
			if (sub_object != null) {
				sub_object.style.display='block';
			}		  		  
	  }
	  
	  if (submenu_element != "") {
	  	var submenu_object = document.getElementById(submenu_element);
			if (submenu_object != null) {
				submenu_object.className = 'ButtonLink_Sub marker'
			}		  	
	 	}

	}
	
	function deactiveMenu(element, submenu_element) {
	  if (element != "") {
		  var object = document.getElementById(element);
		  var sub_object = document.getElementById('sub_'+element);
			if (object != null) {
				if (object == "home") {
					object.className = 'Button einrueckHome';					
				} else {
					object.className = 'Button';					
				}
			}
			if (sub_object != null) {
				sub_object.style.display='none';
			}					  
		}
	  if (submenu_element != "") {
	  	var submenu_object = document.getElementById(submenu_element);
			if (submenu_object != null) {
				submenu_object.className = 'ButtonLink_Sub'
			}	  	
	 	}
	}	
	
	function activeSubSubMenu(element) {
		if (element != "") {
			var object = document.getElementById('einstellung_'+element);
			if (object != null) {
				object.className = 'marker';
			}
		}
	}
	
	function Hovereffekt(Zahl,Element,farbe) {
		if (Element != null) {
			if(Zahl == 1) {
				Element.style.borderBottom = "1px solid " + farbe;
			} else {
				Element.style.borderBottom = "0px solid";				
			}
		}
	}
	
	function Hovereffekt2(Zahl,Element) {
		if(Zahl == 1) {
			Element.style.textDecoration = "underline";
		} else {
			Element.style.textDecoration = "none";				
		}
	}
	
	function Hovereffekt3(Zahl,Element,farbe) {
		var tmp_object = document.getElementById(Element); 
		if (tmp_object != null) {
			if (Zahl == 1) {
				tmp_object.style.borderBottom = "1px solid " + farbe;
			} else {
				tmp_object.style.borderBottom = "0px solid";				
			}
		}
	}		

	function GoTo(url) {
		window.location.href = url;
	}
	
	function activeHelpSubMenu(element) {
		var object = document.getElementById(element);
		if (object != null) {
			object.className = "marker";
		}
	}		
	
	function setDivHeight(boxid1,boxid2,minH) {
		var dynheight = document.getElementById(boxid2).offsetHeight;
		if (dynheight < minH) {
			document.getElementById(boxid1).style.height = minH + "px";
				document.getElementById(boxid2).style.height = minH + "px";
		} else {
			document.getElementById(boxid1).style.height = dynheight + "px";
		}	
	}	

	function md5login(f) {
		getUserInformation();
		document.safelogin['__password'].value = hex_sha256(f['__username'].value.toLowerCase() + f['__password'].value);
		document.safelogin['__username'].value = f['__username'].value;
		document.safelogin['usecookie'].value = (f['usecookie'].checked)?"yes":"";
		document.safelogin.submit();
		return false;
	}	
	
	function b64_dec(input) {
    var output = "";
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;
    var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    
    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
 
    while (i < input.length) {
 
      enc1 = _keyStr.indexOf(input.charAt(i++));
      enc2 = _keyStr.indexOf(input.charAt(i++));
      enc3 = _keyStr.indexOf(input.charAt(i++));
      enc4 = _keyStr.indexOf(input.charAt(i++));
 
      chr1 = (enc1 << 2) | (enc2 >> 4);
      chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
      chr3 = ((enc3 & 3) << 6) | enc4;
 
      output = output + String.fromCharCode(chr1);
 
      if (enc3 != 64) {
        output = output + String.fromCharCode(chr2);
      }
      if (enc4 != 64) {
        output = output + String.fromCharCode(chr3);
      }
 
    }
 
    output = _utf8_decode(output);
 
    return output;
 
  }
	
	function _utf8_decode(utftext) {
    var string = "";
    var i = 0;
    var c = c1 = c2 = 0;
 
    while ( i < utftext.length ) {
 
      c = utftext.charCodeAt(i);
 
      if (c < 128) {
        string += String.fromCharCode(c);
        i++;
      }
      else if((c > 191) && (c < 224)) {
        c2 = utftext.charCodeAt(i+1);
        string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
        i += 2;
      }
      else {
        c2 = utftext.charCodeAt(i+1);
        c3 = utftext.charCodeAt(i+2);
        string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
        i += 3;
      }
 
    }
 
    return string;
  }
	
	function getUserInformation() {
		var betriebssystem = navigator.platform;	
		var browsername = navigator.appName;
		var browsersptizname = navigator.appCodeName;
		var browserversion = navigator.appVersion;
		var browserinfos = navigator.userAgent;
		var browsersprache = navigator.language;
		var bildschirmx=screen.width;
		var bildschirmy=screen.height;
		var farbtiefe = screen.colorDepth;
		var farben = Math.pow(2,farbtiefe);
		var os = getOS();
		var cpu = navigator.cpuClass;
		var history = window.history;
		document.getElementById('info_js').value = 1;
		document.getElementById('info_bildschirmx').value = bildschirmx;
		document.getElementById('info_bildschirmy').value = bildschirmy;
		document.getElementById('info_betriebssystem').value = betriebssystem;
		document.getElementById('info_browsername').value = browsername;
		document.getElementById('info_browsersptizname').value = browsersptizname;
		document.getElementById('info_browserversion').value = browserversion;
		document.getElementById('info_browserinfos').value = browserinfos;
		document.getElementById('info_browsersprache').value = browsersprache;
		document.getElementById('info_farbtiefe').value = farbtiefe;
		document.getElementById('info_farben').value = farben;	
		document.getElementById('info_os1').value = os[0];
		document.getElementById('info_os2').value = os[1];	
		document.getElementById('info_cpu').value = cpu;	
	}	


	function getOS() {
		var os=new Array("unknown", "unknown");
		if (navigator.userAgent != null) {
			brs = navigator.userAgent.toLowerCase();
			if (brs.search(/windows\sce/) != -1) {
				os[0]="wince";
				try {
					os[1]=brs.match(/windows\sce\/(\d+(\.?\d)*)/)[1];
				} catch (e) { }
				return os;
			} else if ( (brs.search(/windows/) !=-1) || ((brs.search(/win9\d{1}/) !=-1))) {
				os[0]="win";
				if (brs.search(/nt\s5\.1/) != -1) {
						os[1]="xp";
				} else if (brs.search(/nt\s7\.0/) != -1) {
						os[1]="windows7";		
				} else if (brs.search(/nt\s6\.1/) != -1) {
						os[1]="windows7";							
				} else if (brs.search(/nt\s6\.0/) != -1) {
						os[1]="vista"; 
				} else if (brs.search(/nt\s5\.0/) != -1) {
						os[1]="2000";
				} else if ( (brs.search(/win98/) != -1) || (brs.search(/windows\s98/)!= -1 ) ) {
						os[1]="98";
				} else if (brs.search(/windows\sme/) != -1) {
						os[1]="me";
				} else if (brs.search(/nt\s5\.2/) != -1) {
						os[1]="win2k3";
				} else if ( (brs.search(/windows\s95/) != -1) || (brs.search(/win95/)!= -1 ) ) {
						os[1]="95";
				} else if ( (brs.search(/nt\s4\.0/) != -1) || (brs.search(/nt4\.0/) ) != -1) {
						os[1]="nt4";
				}
				return os;
			} else if (brs.search(/linux/) !=-1) {
				os[0]="linux";
				try {
					os[1] = brs.match(/linux\s?(\d+(\.?\d)*)/)[1];
				} catch (e) { }
				return os;
			} else if (brs.search(/mac\sos\sx/) !=-1) {
				os[0]="macosx";
				return os;
			} else if (brs.search(/freebsd/) !=-1) {
				os[0]="freebsd";
				try {
					os[1] = brs.match(/freebsd\s(\d(\.\d)*)*/)[1];
				} catch (e) { }
				return os;
			} else if (brs.search(/sunos/) !=-1) {
				os[0]="sunos";
				try {
					os[1]=brs.match(/sunos\s(\d(\.\d)*)*/)[1];
				} catch (e) { }
				return os;
			} else if (brs.search(/irix/) !=-1) {
				os[0]="irix";
				try {
	  			os[1]=brs.match(/irix\s(\d(\.\d)*)*/)[1];
				} catch (e) { }
				return os;
			} else if (brs.search(/openbsd/) !=-1) {
				os[0]="openbsd";
				try {
					os[1] = brs.match(/openbsd\s(\d(\.\d)*)*/)[1];
				} catch (e) { }
				return os;
			} else if ( (brs.search(/macintosh/) !=-1) || (brs.search(/mac\x5fpowerpc/) != -1) ) {
				os[0]="macclassic";
				return os;
			} else if (brs.search(/os\/2/) !=-1) {
				os[0]="os2";
				try {
					os[1]=brs.match(/warp\s((\d(\.\d)*)*)/)[1];
				} catch (e) { }
				return os;
			} else if (brs.search(/openvms/) !=-1) {
				os[0]="openvms";
				try {
					os[1]=brs.match(/openvms\sv((\d(\.\d)*)*)/)[1];
				} catch (e) { }
 				return os;
			} else if ( (brs.search(/amigaos/) !=-1) || (brs.search(/amiga/) != -1) ) {
				os[0]="amigaos";
				try {
					os[1]=brs.match(/amigaos\s?(\d(\.\d)*)*/)[1];
				} catch (e) { }
				return os;
			} else if (brs.search(/hurd/) !=-1) {
				os[0]="hurd";
				return os;
			} else if (brs.search(/hp\-ux/) != -1) {
				os[0]="hpux";
				try {
					os[1]=brs.match(/hp\-ux\sb\.[\/\s]?(\d+([\._]\d)*)/)[1];
				} catch (e) { }
				return os;
			} else if ( (brs.search(/unix/) !=-1) || (brs.search(/x11/) != -1 ) ) {
				os[0]="unix";
				return os;
			} else if (brs.search(/cygwin/) !=-1) {
				os[0]="cygwin";
				return os;
			} else if (brs.search(/java[\/\s]?(\d+([\._]\d)*)/) != -1) {
				os[0]="java";
				try {
					os[1]=brs.match(/java[\/\s]?(\d+([\._]\d)*)/)[1];
				} catch (e) { }
				return os;
			} else if (brs.search(/palmos/) != -1) {
				os[0]="palmos";
				return os;
			} else if (brs.search(/symbian\s?os\/(\d+([\._]\d)*)/) != -1) {
				os[0]="symbian";
				try {
					os[1]=brs.match(/symbian\s?os\/(\d+([\._]\d)*)/)[1];
				} catch (e) { }
				return os;
			} else {
				os[0]="unknown";
				return os;
			}
		} else {
			return os;
		}
	} 
