// Email-Verschlüsselung 

function email(name, domain,tld, link) {
 var link = "<a href='mailto:"+name+"@"+domain+"."+tld+"'>"+link+"</a>";
 document.write(link);
}

// Rechte Maustaste deaktivieren
function clickIE() {
	if (document.all) {
		return false;
	}
}
function clickNS(e) {
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which == 2||e.which == 3) {
			return false;
		}
	}
}

if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown = clickNS;
}
else{
	document.onmouseup = clickNS;
	document.oncontextmenu = clickIE;
}

document.oncontextmenu = new Function("return false")
function Disable(e) {
return false;
}
function Enable() {
 	return true;
}
if (window.sidebar) {
	document.onclick = Enable;
document.onmousedown = Disable;
}
document.onselectstart = new Function ("return false")

function selecturl(category){
targetlink=category.options[category.selectedIndex].value;
if (targetlink !=""){
document.location = targetlink;
}
}

function ZweiFrames(URI1,F1,URI2,F2) {
  Frame1=eval("parent."+F1);
  Frame2=eval("parent."+F2);
  Frame1.location.href = URI1;
  Frame2.location.href = URI2;
}
function ZweiFramesBack(F1,F2) {
  Frame1=eval("parent."+F1);
  Frame2=eval("parent."+F2);
  Frame1.history.back();
  if (!window.opera) window.setTimeout("Frame2.history.back()",10);
}
function ZweiFramesForward(F1,F2) {
  Frame1=eval("parent."+F1);
  Frame2=eval("parent."+F2);
  Frame1.history.forward();
  if (!window.opera) window.setTimeout("Frame2.history.forward()",10);
}

function tooltip(){}

tooltip.id="tooltip";
tooltip.offsetx = 10;
tooltip.offsety = 10;
tooltip.x = 30;
tooltip.y = -10;
tooltip.snow = 100;
tooltip.tooltipElement=null;
tooltip.title_saved='';
tooltip.saveonmouseover=null;
tooltip.ie4 = (document.all)? true:false;	
tooltip.ie5 = false;
if(tooltip.ie4) tooltip.ie5 = (navigator.userAgent.indexOf('MSIE 5')>0 || navigator.userAgent.indexOf('MSIE 6')>0);
tooltip.dom2 = ((document.getElementById) && !(tooltip.ie4||tooltip.ie5))? true:false; 

tooltip.show = function (htmlelement) {

   if ( this.ie4 || this.dom2 ) {
      text=htmlelement.getAttribute("title");
      this.title_saved=text;
      htmlelement.setAttribute("title","");
   }
	if(this.dom2){
		this.tooltipElement = document.getElementById(this.id);
      this.saveonmouseover=document.onmousemove;
		document.onmousemove = this.mouseMove;
	}else if ( this.ie4 ) {
      this.tooltipElement = document.all[this.id].style;
      this.saveonmouseover=document.onmousemove;
      document.onmousemove = this.mouseMove;
	}

   if ( this.ie4 || this.dom2 ) {
      if(this.ie4) document.all[this.id].innerHTML = text;
      else if(this.dom2) document.getElementById(this.id).innerHTML=text;

      this.moveTo(this.x + this.offsetx , this.y + this.offsety);

      if(this.ie4) this.tooltipElement.visibility = "visible";
      else if(this.dom2) this.tooltipElement.style.visibility ="visible";
   }
   return false;
}

tooltip.hide = function (htmlelement) {
	if ( this.ie4 || this.dom2 ) {
      htmlelement.setAttribute("title",this.title_saved);
      this.title_saved="";

		if(this.ie4) this.tooltipElement.visibility = "hidden";
      else if(this.dom2) this.tooltipElement.style.visibility = "hidden";

      document.onmousemove=this.saveonmouseover;
	}
}

tooltip.mouseMove = function (e) {

   if(tooltip.ie4 || tooltip.dom2){

      if(tooltip.dom2){
         tooltip.x = e.pageX;
         tooltip.y = e.pageY;
      }else{
         if(tooltip.ie4) { tooltip.x = event.x; tooltip.y = event.y; }
         if(tooltip.ie5) { tooltip.x = event.x + document.body.scrollLeft;
               tooltip.y = event.y + document.body.scrollTop; }
      }
      tooltip.moveTo( tooltip.x +tooltip.offsetx , tooltip.y + tooltip.offsety);
   }
}

tooltip.moveTo = function (xL,yL) {
	if(this.dom2){
		this.tooltipElement.style.left = xL +"px";
      this.tooltipElement.style.top = yL +"px";
	}else if(this.ie4){
      this.tooltipElement.left = xL;
      this.tooltipElement.top = yL;
   }
}

function selecturl(category){
targetlink=category.options[category.selectedIndex].value;
if (targetlink !=""){
document.location = targetlink;
}
}
