
/*
 * Funktion zum nachladen von CSS Dateien
 */
function loadcssfile(sUrl, sFilename)
{
	if(sFilename != 'undefined' && sFilename != 0 && sFilename != null)
	{
		sFile = sUrl + sFilename + '.css';
		if($('styleswitcher') == null)
		{
//			var oObj = new Element('link', {
//					'id': 'styleswitcher', 'rel': 'stylesheet',
//					'type': 'text/css', 'href': sFile});
			var oObj = document.createElement('link');
			oObj.setAttribute('id', 'styleswitcher');
			oObj.setAttribute('rel', 'stylesheet');
			oObj.setAttribute('type', 'text/css');
			oObj.setAttribute('href', sFile);

			document.getElementsByTagName('head')[0].appendChild(oObj);
		}
		else
		{
			$('styleswitcher').href = sFile;
		} // if
	} // if
} // function

/**
 * Methode um einen Bookmark setzen zu koennen.
 */
function bookmark()
{
	var url   = eval(self.location);
	var title = document.title;
	var msg   = 'Das Lesezeichen konnte nicht erstellt werden.\n\nBitte benutzen Sie ' +
				'die Funktion ihres Browsers um ' + url + ' zu speichern.';
	try
	{
		if (window.sidebar) // Mozilla Firefox Bookmark
		{
			return window.sidebar.addPanel(title, url, "");
		}
		else if(window.external) // IE Favorite
		{
			return window.external.AddFavorite(url, title);
		}
		else
		{
			alert(msg);
		} //if
	}
	catch(err)
	{
		alert(msg);
	}
} //function


var myLightWindow = null;

function getLightWindow( vScsUrl, iWidth, iHeight )
{
	/**
	href			// The hyperlink for the window
	title 			// Title of window
	author 			// Author of window
	caption 		// The Caption for the window
	rel 			// Set the rel tag
	top 			// Top position of the window
	left 			// Left position of the window
	type 			// The type of the window you want to change it too
	showImages 		// How many images to show
	height 			// The height of the window
	width 			// The width of the window
	loadingAnimation 	// Make the Loading Cover skip the animation
	iframeEmbed 		// Emebed the Media into an iframe instead of a div
	form
	*/

	try
	{
		myLightWindow.activateWindow({
	        href: vScsUrl,
	        width:iWidth,
	        height:iHeight,
	        type: 'external',
	        iframeEmbed:true,
	        loadingAnimation:false});
	}
	catch (e){}
}

function initLinghtWindow()
{
	myLightWindow = new lightwindow();
}
