/**
Vertigo Tip by www.vertigo-project.com
Requires jQuery
if (document.getElementById('JSnext') != null) {
*/


	document.onkeydown = TasteGedrueckt;


function TasteGedrueckt (Ereignis) {
	var error = "";
	if (document.getElementById('JSnext') == null){
		var error = "true";
	} 
	
	if(document.getElementById('u_EMail') != null){
		if(document.getElementById('u_EMail').value != ""){	
		 var error = "true";
		}
	}
	
	if(document.getElementById('JSadmin') != null) {
		if(document.adminForm.saveAdmin.checked == true ) {
			var error = "true";
		}
	}
	
	
	if(error == ""){
		  if (!Ereignis)
			Ereignis = window.event;
		  if (Ereignis.which) {
			Tastencode = Ereignis.which;
		  } else if (Ereignis.keyCode) {
			Tastencode = Ereignis.keyCode;
		  }
		  
		  
		  if(Tastencode == 17){
			window.location = document.getElementById('JSprev').value; 
		  }
		  
		  if(Tastencode == 18){
			window.location = document.getElementById('JSnext').value; 
		  }
		  
	}
	
}















this.vtip = function() {    
    this.xOffset =-11; // x distance from mouse
    this.yOffset = 31; // y distance from mouse       
    
    $(".vtip").unbind().hover(    
        function(e) {
			var mytitle=this.title;
			
		
			
			var mytitle = mytitle.replace(" >> ", "<br/>");
			var mytitle = mytitle.replace("#img", "<img");
			var mytitle = mytitle.replace("/#", "/>");
			var mytitle = mytitle.replace("(b)", "<b>");
			var mytitle = mytitle.replace("(/b)", "</b>");
			
			
			
				
				

			
           
			
            this.t = mytitle;
            this.title = ''; 
	if(mytitle!="" && mytitle!="(b)(/b)" && mytitle!="<b></b>" && mytitle!=" "){
            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);
            
            $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );
                        
            $('p#vtip #vtipArrow').attr("src", 'http://www.mios-design.de/images/vtip_arrow.png');
            $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("fast");
         
	}   // ---------end if not empty
        },
        function() {
			var mytitle=this.t;
			var mytitle = mytitle.replace("#img", "<img");
			var mytitle = mytitle.replace("/#", "/>");
			
		

			
            this.title = mytitle;
            $("p#vtip").fadeOut("slow").remove();
        }
    ).mousemove(
        function(e) {
            this.top = (e.pageY + yOffset);
            this.left = (e.pageX + xOffset);
                         
            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");
        }
    );            
    
};

jQuery(document).ready(function($){vtip();}) 














function UnCryptMailto( s )
    {
        var n = 0;
        var r = "";
        for( var i = 0; i < s.length; i++)
        {
            n = s.charCodeAt( i );
            if( n >= 8364 )
            {
                n = 128;
            }
            r += String.fromCharCode( n - 1 );
        }
        return r;
    }

    function mailto( s )
    {
        location.href=UnCryptMailto( s );
    }
