/*<![CDATA[*/
/**
 * functions.js - Bibliothek mit uebergreifenden JavaScript Funktionen
 *
 * Copyright (c) 2008    die.interaktiven GmbH & Co. KG
 *                       Agentur für digitale Medien
 *                       Eisenmarkt 1
 *                       35578 Wetzlar
 *                       Germany
 *
 *                       Fon: +49 (0)64 41 / 39 86 19 - 0
 *                       Fax: +49 (0)64 41 / 39 86 19 - 9
 *                       Web: www.die-interaktiven.de
 *
 * Alle Rechte vorbehalten. Unberechtigte Kopie und Weiter-
 * verwendung nicht gestattet.
 *
 */

function setStatus(sText)
{
	try
	{
		if(!sText) sText = '';
		window.status = sText;
		return true;
	}
	catch(e)
	{
		void(0);
	}
}

function showPopup(sUrl, sName, iBreite, iHoehe, sFeatures, iPosx, iPosy)
{
	try
	{
		var oWin = window.open(sUrl, sName,"width=" + iBreite + ",height=" + iHoehe + "," + sFeatures + "");
		
		if(oWin)
		{
			if(!iPosx)
			{
				x = (screen.width-iBreite)/2;
			}
			else
			{
				x = iPosx;
			}
			
			if(!iPosy)
			{
				y=(screen.height-iHoehe)/2;
			}
			else
			{
				y = iPosy;
			}
			
			oWin.moveTo(x,y);
			
			oWin.focus();
		}
	}
	catch(e)
	{
		void(0);
	}
}

function printPage()
{
	window.print();
}

function trim( sString )
{
	return (sString || "").replace( /^\s+|\s+$/g, "" );
}

function checkEmail( sEmail )
{
	var res = false;
	reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+'(\\@)([a-zA-Z0-9\\-\\.]+)'+'(\\.)([a-zA-Z]{2,4})$');
	return (reg.test(sEmail));
}

/*]]>*/
