/**
* JavaScript
*
* @author	Sebastian Müller <sebastian produktivbuero de>
* @date		04/07/2007
*/


/** ************************************************************************
* Öffnet ein Popupfenster
*
* @param	$url  Zieladresse
* @param	$width  Fensterbreite
* @param	$height  Fensterhöhe
* @return	-
* @author	Sebastian Müller <sebastian produktivbuero de>
* @date		07/02/2007
***************************************************************************/

function windowOpen (width, height, url) {
	windowProps = "width=" + width + ", height=" + height + ", dependant=no, scrollbars=yes, menubar=no, status=no";
	myWindow = window.open(url,"window",windowProps);
};


/** ************************************************************************
* Entschlüsselt E-Mails
*
* @param	$s  verschlüsselte E-Mail-Adresse
* @return	E-Mail-Adresse
* @author	http://jumk.de
* @date		
***************************************************************************/

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;
};


/** ************************************************************************
* Ruft den Link zur E-Mail-Adresse auf
*
* @param	$s  verschlüsselte E-Mail-Adresse
* @return	-
* @author	http://jumk.de
* @date		
***************************************************************************/

function linkTo_UnCryptMailto (s) {
  location.href= UnCryptMailto(s);
};

