/*
 * Allgemeine Funktionen
 *
 * info@l-vogel.de
 * erstellt: 2005-05-11
 * geaendert: 2007-08-08
 *
 */

 
 
 
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 linkTo_UnCryptMailto( s )
    {
        location.href=UnCryptMailto( s );
    } 
 
 
 
 
  
/*--------------------------------------------------
  POPUP-FENSTER
  --------------------------------------------------*/

/**
 * Fenster absolut positionieren
 *
 *
 */
 
 
function getPosition () {
		self.moveTo(100, 100);
}

/**
 * Fenster n den Vordergrund
 *
 *
 */
function getFocus() {
	window.focus();
	//window.moveTo(60, 100);
}

/**
 * Pop-Up - fixe Groesse
 *
 *
 */
function popUp(link, w, h) {
    var w  = w;
	var h = h;

 	if (link!=null) {
	    window.open(link, "id","resizable=no,scrollbars=no,locationbar=no,menuebar=no,status=no,height="+h+",width="+w+", top="+((screen.height/2)-(h/1))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
	} else {
    	// DEBUG
		alert("Link oder Fensternahme fehlt");
	}
}

/**
 * Popup-Fenster Kalender
 *
 *
 */
function confirmBox(link, name) {
    var w  = 240;
    var h = 140;
    //alert("top="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+"");
    if (link!=null && name!=null) {
        window.open(link, name,"resizable=no,scrollbars=yes,locationbar=no,menuebar=no,status=no,height="+h+",width="+w+", top="+((screen.height/2)-(h/1))+", screenY="+((screen.height/2)-(h/1.5))+", left="+((screen.width/2)-(+w/2))+",screenX="+((screen.width/2)-(+w/2)));
        //window.open(link, name,"resizable=no,scrollbars=yes,locationbar=no,menuebar=no,status=no, height="+height+", width="+width+",left="((screen.width/2-(width/2))",top="((screen.height/2)-(height/1.5)));
    } else {
        // DEBUG
        alert("Link oder Fensternahme fehlt");
    }
}
