
function makeNew(init)
	{
 	if (init==true)
     	{
        document.pageWidth=window.innerWidth;
        document.pageHeight=window.innerHeight;
        window.onresize=makeNew;
     	}
  	else if (window.innerWidth != document.pageWidth || window.innerHeight != document.pageHeight) self.location.reload();
	}

	if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion)==4)) makeNew(true);

function openWindow(URL,x,y) {
	
	var newWin;
	
	if (navigator.userAgent.indexOf('MSIE') != -1) {
		n=x;
		m=y;
	}
	else {
		n = parseInt(x)-10;
		m = parseInt(y)-30;
	}
		
	props = 'scrollbars=no,toolbar=0,location=0,directories=0,status=0,width=' + n + ',height=' + m + ',menubar=0,resizable=1';
	newWin = window.open(URL,'pernice',props);
	newWin.resizeTo(n,m);
	newWin.focus();
		
}

//#tested with #
//# PC:
//# IE 5.5
//# NC 4.7
//# Mac:
//# IE 5

//declare variables used in the html-page
var version;
var moviewidth;
var movieheight;
var moviename;
var noflashcontent;
var play;
var loop;
var menu;
var quality;
var transparent;
var color;

//flash detection variables
var MM_flash2 = false;
var MM_flash3 = false;
var MM_flash4 = false;
var MM_flash5 = false;
var MM_flash6 = false;
var MM_flash6 = false;
var MM_flash7 = false;
var MM_flash8 = false;
var MM_flash9 = false;
var MM_flash10 = false;
var MM_Flashcounter = 10;
var installedFlash = 0;
var hasRightVersion = false;
var jscript = 1.0;

var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;

jscript = 1.1;

if(isIE && isWin){
document.write('<SC'+'RIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('MM_flash2 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
document.write('MM_flash3 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
document.write('MM_flash4 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
document.write('MM_flash5 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
document.write('MM_flash6 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
document.write('MM_flash7 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
document.write('MM_flash8 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8"))) \n');
document.write('MM_flash9 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9"))) \n');
document.write('MM_flash10 = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.10"))) \n');
document.write('</SC'+'RIPT\> \n');
}

//function detectFlash, called from the html-page
function detectFlash(mustbeFlash){
		
	if (navigator.plugins){
		if (navigator.plugins["Shockwave Flash 2.0"]
		|| navigator.plugins["Shockwave Flash"]){

		var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
		var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
		var teile = flashDescription.split(".");
		//alert(teile[0]);
		var jetzt = teile[0].replace(/Shockwave Flash /g, "");
		//alert(jetzt);
		if(jetzt <= 9)
			{
			var flashDetect = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			}
		else
			{
			var flashDetect = jetzt;
			}

		MM_flash2 = flashDetect == 2;
		MM_flash3 = flashDetect == 3;
		MM_flash4 = flashDetect == 4;
		MM_flash5 = flashDetect == 5;
		MM_flash6 = flashDetect == 6;
		MM_flash7 = flashDetect == 7;
		MM_flash8 = flashDetect == 8;
		MM_flash9 = flashDetect == 9;
		MM_flash10 = flashDetect == 10;
		}
	}

	for (var i = 2; i <= MM_Flashcounter; i++) {
		if (eval("MM_flash" + i) == true) installedFlash = i;
	}

	if(navigator.userAgent.indexOf("WebTV") != -1) installedFlash = 2;
	if (installedFlash >= mustbeFlash) {
		hasRightVersion = true;
		}	
	}

// writing the embeding-code
function writeFlashembedCode() {
	var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
		+ 'width="' + moviewidth + '" height="' + movieheight + ' "'
		+ 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">\n'
		+ '<param name="movie" value="' + moviename +'">\n'
		+ '<param name="wmode" value="'+ transparent + '">\n'
		+ '<param name="play" value="'+ play + '">\n'
		+ '<param name="loop" value="'+ loop + '">\n'
		+ '<param name="bgcolor" value="' + color + '">\n'
		+ '<param name="quality" value="'+ quality + '">\n'
		+ '<param name="menu" value="'+ menu + '">\n'
		+ '<embed src="' + moviename +'"'
		+ 'width="' + moviewidth + '" height="' + movieheight + '"'
		+ 'play="'+ play + '"'
		+ 'loop="'+ loop + '"'
		+ 'quality="'+ quality + '"'
		+ 'menu="'+ menu + '"'
		+ 'bgcolor="' + color + '"'
		+ 'type="application/x-shockwave-flash"'
		+ 'pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">\n'
		+ '</embed>\n'
		+ '</object>\n';
		document.write(oeTags);
}

// Browsertyp ermitteln (und in B_Type speichern)
var B_Type = new crossBrowserType();
function crossBrowserType() {
	this.IE = false;
	this.NS4 = false;
	this.NS6 = false;
	this.id = "";

	if (document.all) {this.IE = true; this.id = "IE";}
	else if (document.getElementById) {this.NS6 = true; this.id = "NS6";}
	else if (document.layers) {this.NS4 = true; this.id = "NS4";}
}

// Mausposition zurückgeben
var crossMouseX, crossMouseY;
if (B_Type.NS4) document.captureEvents(Event.MOUSEMOVE);

function crossMousePosition(e) {
	if (B_Type.IE) {
		crossMouseX=event.x + document.body.scrollLeft; 
		crossMouseY=event.y + document.body.scrollTop;
	}
	else {crossMouseX=e.pageX; crossMouseY=e.pageY;}
}


// browserspezifisches DHTML-Objekt anhand von ID zurückgeben
function crossGetObject(id) {
	var obj = null;
	if (B_Type.IE) obj=document.all[id];
	else if (B_Type.NS6) obj=document.getElementById(id);
	else if (B_Type.NS4) obj=document.layers[id];
	return obj;
}

// Text in DHTML-Objekt ausgeben
function crossWrite(obj, text) {
		
	if (B_Type.IE) obj.innerHTML = text;
	else if (B_Type.NS6) obj.innerHTML = text;
	else if (B_Type.NS4) {
		obj.document.open();
		obj.document.write(text);
		obj.document.close();
	}
}

// verfügbare Fensterbreite ermitteln
function crossInnerWindowWidth() {
	var val;
	if (B_Type.IE) val=document.body.clientWidth;
	else if (B_Type.NS6) val=window.innerWidth;
	else if (B_Type.NS4) val=window.innerWidth;
	return val;
}

// tatsächliche Fensterbreite ermitteln
function crossOuterWindowWidth() {
	var val;
	if (B_Type.IE) val=document.body.offsetWidth;
	else if (B_Type.NS6) val=window.outerWidth;
	else if (B_Type.NS4) val=window.outerWidth;
	return val;
}

// verfügbare Fensterhöhe ermitteln
function crossInnerWindowHeight() {
	var val;
	if (B_Type.IE) val=document.body.clientHeight;
	else if (B_Type.NS6) val=window.innerHeight;
	else if (B_Type.NS4) val=window.innerHeight;
	return val;
}

// Scroll-Position ermitteln, "y" = vertikal, "x" = horizontal
function crossGetScroll(achse) {
	var val;
	if (!achse || achse == "y") {  // vertikale Achse
		if (B_Type.IE) val=document.body.scrollTop;
		else if (B_Type.NS6) val=window.pageYOffset;
		else if (B_Type.NS4) val=window.pageYOffset;
	}
	else {  // horizontale Achse
		if (B_Type.IE) val=document.body.scrollLeft;
		else if (B_Type.NS6) val=window.pageXOffset;
		else if (B_Type.NS4) val=window.pageXOffset;
	}
	return val;
}

// Scroll-Position setzen
function crossSetScroll(x, y) {
	window.scrollTo(x, y);
}


// Objekt positionieren x/y
function crossMoveTo(obj, x, y) {
	if (B_Type.IE) {obj.style.pixelLeft=x; obj.style.pixelTop=y;}
	else if (B_Type.NS4) {obj.left=x; obj.top=y;}
	else if (B_Type.NS6) {obj.style.left=x+"px"; obj.style.top=y+"px";}
}

// Objekt-Position ermitteln
function crossGetPositionX(obj) {
	if (B_Type.IE) return obj.style.pixelLeft;
	else if (B_Type.NS4) return obj.left;
	else if (B_Type.NS6) return parseInt(obj.style.left);
}
function crossGetPositionY(obj) {
	if (B_Type.IE) return obj.style.pixelTop;
	else if (B_Type.NS4) return obj.top;
	else if (B_Type.NS6) return parseInt(obj.style.top);
}

// Objekt anzeigen
function crossShowObject(obj) {
	if (B_Type.IE || B_Type.NS6) {obj.style.visibility="visible";}
	else if (B_Type.NS4) {obj.visibility="show";}
}
// Objekt ausblenden
function crossHideObject(obj) {
	if (B_Type.IE || B_Type.NS6) {obj.style.visibility="hidden";}
	else if (B_Type.NS4) {obj.visibility="hide";}
}


// Hintergrund-Farbe setzen
function crossBackgroundColor(color, obj) {
	if (typeof obj == "undefined") {document.bgColor=color; return;}
	if (B_Type.IE || B_Type.NS6) {obj.style.backgroundColor=color;}
	else if (B_Type.NS4) {obj.document.bgColor=color;}
}

// Config:
var tooltipBack = "#ffffff";  // Hintergrundfarbe
var tooltipText = "#000000";  // Text und Randfarbe
var tooltipBreite = 150;        // tooltip-Breite (Vorgabewert)
var tooltipBorder = 0;      // Randstärke
var tooltipFont = "Arial";
var tooltipDir = 1;         // Ausrichtung; 0=rechts 1=links
var tooltipVDir = 1;        // Ausrichtung; 0=unten 1=oberhalb
var tooltipChangeVDir = 65;    // Schwellwert für Wechsel der V-Ausrichtung am unteren Rand
var tooltipSpace = 10;        // Abstand vom Cursor
var tooltipShow = false; 	  // Anzeige aktiv/inaktiv

var tooltip = null;        // das DIV-Objekt
var b_Breite;             // aktueller Speicher für tooltipbreite
var b_Dir, b_VDir;

// tooltip-Objekt (div) festlegen
function setTooltip(id, breite, bgcolor) {
		
	document.onmousemove = cursorMove;
	
	if (breite && breite>20) b_Breite = breite;
	if (bgcolor) tooltipBack = bgcolor;
	Tooltip = crossGetObject(id);
	if (Tooltip == null) {
		alert("keine Unterstützung für Tooltip-Infos");
		showTooltip = noTooltip; hideTooltip = noTooltip;
	}
	TooltipShow = false;
}
function noTooltip() {} // functionsaufrufe abfangen

// tooltip kreieren und anzeigen
function showTooltip(msg, dir, breite, bgcolor) {
	var b_Back;
	var relWidth, relHeight;

	if (Tooltip == null) return;
	if (breite && breite>20) b_Breite = breite;
	else b_Breite=tooltipBreite;
	if (bgcolor) b_Back=bgcolor;
	else b_Back=tooltipBack;
	msg = '<table width=150 border=0 cellpadding=0 cellspacing=0><tr><td><img src=\"/images/blase_01.gif\" width=10 height=11 alt=\"\"></td><td><img src=\"/images/blase_02.gif\" width=116 height=11 alt=\"\"></td><td><img src=\"/images/blase_03.gif\" width=24 height=11 alt=\"\"></td></tr><tr><td background=\"/images/blase_04.gif\"><img src=\"/images/blase_04.gif\" width=10 height=69 alt=\"\"></td><td style=\"color:#000066; font-size:11px; background-color:#FFF;\">' + msg + '</td><td background=\"/images/bg_right.gif\" valign=\"top\"><img src=\"/images/blase_06.gif\" width=24 height=69 alt=\"\"></td></tr><tr><td><img src=\"/images/blase_07.gif\" width=10 height=11 alt=\"\"></td><td><img src=\"/images/blase_08.gif\" width=116 height=11 alt=\"\"></td><td><img src=\"/images/blase_09.gif\" width=24 height=11 alt=\"\"></td></tr></table>';
	if (!dir) b_Dir = tooltipDir;
	else b_Dir = dir;
	relWidth = crossInnerWindowWidth() + crossGetScroll("x");
	relHeight = crossInnerWindowHeight() + crossGetScroll("y");
	if (crossMouseX + b_Breite + tooltipSpace > relWidth) 
		{b_Dir = 1;}
	else if (crossMouseX < b_Breite + tooltipSpace) b_Dir = 0;
	b_VDir = tooltipVDir;
	if (crossMouseY + tooltipChangeVDir > relHeight) b_VDir = 1;
	else if (crossMouseY - tooltipChangeVDir < 0) b_VDir = 0;
	crossWrite(Tooltip, msg);
	TooltipShow = true;
	crossShowObject(Tooltip);
}

function hideTooltip() {
	if (Tooltip == null) return;
	crossHideObject(Tooltip);
	TooltipShow=false;
	crossMoveTo(Tooltip, -200, 0);
}

// der Maus folgen
function cursorMove(e) {
	var posX, posY;
	
	crossMousePosition(e);

	if (TooltipShow) {
		
		if (b_Dir==0) {
			posX = crossMouseX + tooltipSpace; 
			if (b_VDir==0) {posY = crossMouseY + tooltipSpace;}
			else {posY = crossMouseY - tooltipChangeVDir;}
		}
		else {
			posX = crossMouseX-b_Breite-tooltipSpace;
			if (b_VDir==0) {posY = crossMouseY + tooltipSpace;}
			else {posY = crossMouseY - tooltipChangeVDir;}
		}
		crossMoveTo(Tooltip, posX, posY)
	}
}

/**
 * Crossbrowser DHTML Library
 * This file contains various functions that ease the handling of layers
 *
 * @author Christian Schwanke
 */

// ****************************************************************************
// HIGH-LEVEL FUNCTIONS *******************************************************
// ****************************************************************************

/**
 * Shows the layer specified by the layerId parameter
 * 
 * @param layerId the id of the layer
 */
function showLayer(layerId)
{
	setLayerVisibility(layerId, true);
}

/**
 * Hides the layer specified by the layerId parameter
 * 
 * @param layerId the id of the layer
 */
function hideLayer(layerId)
{
	setLayerVisibility(layerId, false);
}

/**
 * Toggles the layer's visibility
 * 
 * @param layerId the id of the layer
 */
function toggleLayer(layerId)
{
	setLayerVisibility(layerId, !getLayerVisibility(layerId));
}

/**
 * Moves the layer specified by the layerId parameter 
 * to the given coordinates. In order to move only in one direction,
 * either coordinate-parameter may be null.
 *
 * @param layerId The id of the layer to move
 * @param x The new x coordinate
 * @param y The new y coordinate
 */
function moveLayerTo(layerId, x, y)
{
	if (x != null)
	{
		setLayerLeft(layerId, x);
	}
	
	if (y != null)
	{
		setLayerTop(layerId, y);
	}
}

/**
 * Moves the layer specified by the layerId parameter 
 * relative to its current position.
 *
 * @param layerId The id of the layer to move
 * @param deltaX The amount to move in x direction
 * @param deltaY The amount to move in y direction
 */
function moveLayerBy(layerId, deltaX, deltaY)
{
	setLayerLeft(layerId, getLayerLeft(layerId) + deltaX);
	setLayerTop(layerId, getLayerTop(layerId) + deltaY);
}

/**
 * Places a layer on the position retrieved from the given anchor.
 * If the anchor's position does not match the required position, the offset
 * parameters can be used to correctly set the layer.
 * Finally the show parameter determines wether the layer should be set to 
 * visible after positioning.
 *
 * @param layerId The id of the layer to place/position
 * @param anchorName The name/id of the anchortag that is used to calculate the position
 * @param xOffset The offset in the x direction from the anchor's position
 * @param yOffset The offset in the y direction from the anchor's position 
 * @param show true if the layer should be immediatly displayed after positioning
 */
function placeLayer(layerId, anchorName, xOffset, yOffset, show)
{
	var x = getLeftPosition(anchorName);
	var y = getTopPosition(anchorName);
	if (xOffset)
	{
		x += xOffset;
	}
	
	if (yOffset)
	{
		y += yOffset;
	}
	
	setLayerLeft(layerId, x);
	setLayerTop(layerId, y);
	setLayerVisibility(layerId, show);
}


// ****************************************************************************
// CORE FUNCTION **************************************************************
// ****************************************************************************

/**
 * Displays an error stating that the provided layerId could not be resolved
 *
 * @param layerId The id of the layer that could not be resolved
 */
function throwLayerNotFound(layerId)
{
	alert("Layer '" + layerId + "' nicht gefunden.");
}

/**
 * Determines wether the layer with the given id is currently visible
 *
 * @param layerId The id of the layer
 * @return true if the layer is visible
 */
function getLayerVisibility(layerId)
{
	var obj = findLayer(layerId);	
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (document.all || document.getElementById)
	{
		state = (obj.style.visibility == "visible");
	}
	else if (document.layers)
	{
		state = (obj.visibility == "show");
	}

	return state;
}

/**
 * Sets the visibility of the layer with the given id
 *
 * @param layerId The id of the layer
 * @param state The new visibility state; true == visible
 */
function setLayerVisibility(layerId, state)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (state)
	{
		if (document.all || document.getElementById)
		{
			obj.style.visibility = "visible";
		}
		else if (document.layers)
		{
			obj.visibility = "show";
		}
	}
	else
	{
		
		if (document.all || document.getElementById)
		{
			obj.style.visibility = "hidden";
		}
		else if (document.layers)
		{
			obj.visibility = "hide";
		}
	}
}

/**
 * Retrieves the y position of the layer with the given id.
 * The returned value is the y position in pixel calculated from
 * the beginning of the page/document.
 *
 * @param layerId The id of the layer
 * @return The absolute y position of the layer
 */
 function getLayerTop(layerId)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (document.all)
	{
		return obj.style.pixelTop;
	}
	else if (document.getElementById)
	{
		return obj.style.top;
	}
	else if (document.layers)
	{
		return obj.top;
	}	
}

/**
 * Sets the y position of a layer. The value parameter must specify
 * the absolute position in pixel measured from the beginning of the page/document
 *
 * @param layerId The id of the layer
 * @param value The new absolute y position in pixel
 */
function setLayerTop(layerId, value)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (document.all)
	{
		obj.style.pixelTop = value;
	}
	else if (document.getElementById)
	{
		obj.style.top = value + "px";		
	}
	else if (document.layers)
	{
	 	obj.top = value;
	}
}	

/**
 * Retrieves the x position of the layer with the given id.
 * The returned value is the x position in pixel calculated from
 * the left of the page/document.
 *
 * @param layerId The id of the layer
 * @return The absolute x position of the layer
 */
function getLayerLeft(layerId)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}

	if (document.all)
	{
		return obj.style.pixelLeft;
	}
	else if (document.getElementById)
	{
		return obj.style.left;
	}
	else if (document.layers)
	{
		return obj.left;
	}		
}	
	

/**
 * Sets the x position of a layer. The value parameter must specify
 * the absolute position in pixel measured from the left of the page/document
 *
 * @param layerId The id of the layer
 * @param value The new x position in pixel
 */
function setLayerLeft(layerId, value)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
		
	if (document.all)
	{
		obj.style.pixelLeft = value;		
	}
	else if (document.getElementById)
	{
		obj.style.left = value + "px";			
	}
	else if (document.layers)
	{
		obj.left = value;		
	}
}		
	
/**
 * Retrieves the height of a layer
 *
 * @param layerId The id of the layer
 * @return The height of the layer in pixel
 */
function getLayerHeight(layerId)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (document.all || document.getElementById)
	{
		return obj.offsetHeight;
	}
	else if (document.layers)
	{
		return obj.clip.height;
	}
}

function setLayerHeight(layerId, height)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (document.all)
	{
		
		return obj.style.height = height + "px";
	}
	else if (document.getElementById)
	{

		return obj.style.height = height + "px";
	}
	else if (document.layers)
	{
		return obj.clip.height = height;
	}
}

/**
 * Retrieves the width of a layer
 *
 * @param layerId The id of the layer
 * @return The width of the layer in pixel
 */
function getLayerWidth( layerId )
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (document.all || document.getElementById)
	{
		return obj.offsetWidth;
	}
	else if (document.layers)
	{
		return obj.clip.width;
	}
}	
	
function setLayerWidth(layerId, width)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (document.all)
	{
		return obj.style.width = width + "px";
	}
	else if (document.getElementById)
	{
		return obj.style.width = width + "px";
	}
	else if (document.layers)
	{
		return obj.clip.width = width;
	}
}
/**
 * Retrieves a layer object by its id. This method is capable of finding nested layers as well
 * by recursivly looking through the different document levels.
 * If the layer is not found, null is returned. This method will not throw an error message since
 * a catching-mechanism is not available in all browsers.
 * It's up to the calling function to deal with a null value.
 *
 * @param layerId The id of the Layer to look for
 * @param parentObject The object to start from. This parameter is mainly used during recursion
 * 			and can be omitted most of the time. When looking for a layer in a document
 *			this parameter is not applicable
 * @return The layer object for the given id or null if the layer cannot be resolved
 */
function findLayer(layerId, parentObject)
{
	if (parentObject == null)
	{
		parentObject = document;
	}

	if (document.getElementById)
	{
		return (document.getElementById(layerId));
	}
	else if (document.all)
	{
		return (document.all[layerId]);
	}
	else if (document.layers)
	{
		if (parentObject.layers.length > 0)
		{
			for (var i=0; i<parentObject.layers.length; i++)
			{
				if (parentObject.layers[i].id == layerId)
				{
					return parentObject.layers[i];
				}
				
				var tempLayer = findLayer(layerId, parentObject.layers[i].document);
				if (tempLayer != null)
				{
					return tempLayer;
				}
			}
			return null;
		}
		return null;
	}
}

/**
 * Changes a layer's content
 * 
 * @param layerId The id of the layer to change
 * @param content The new content as String.
 */
function setContent(layerId, content)
{
	var obj = findLayer(layerId);
	if (obj == null)
	{
		throwLayerNotFound(layerId);
	}
	
	if (document.all || document.getElementById)
	{
		obj.innerHTML = content;
	}
	else if (document.layers)
	{
		obj.document.open();
		obj.document.clear();
		obj.document.write(content);
		obj.document.close();
	}
}

/**
 * Calculates the absolute y position of a named anchor tag. 
 * An anchor-Tag used with this method must provide both id and name attribute with identical values.
 * example: <a name="positionAnchor" id="positionAnchor">...</a>
 * This method is useful to dynamically retrieve an elements position in a page by adding an anchor-
 * tag to that element/block.
 *
 * @param anchorName The name/id of the anchor to look for
 * @return the absolute y position in pixel within the document
 */
function getTopPosition(anchorName)
{
	if (document.all)
	{			
		var anchorItem = document.all[anchorName];
		var summe = anchorItem.offsetTop;
		while ((anchorItem = anchorItem.offsetParent) != null)
		{
			summe += anchorItem.offsetTop;
		}
		return summe;
	}
	else if (document.getElementById)
	{
		var anchorItem = document.getElementById(anchorName);
		var summe = anchorItem.offsetTop;
		while ((anchorItem = anchorItem.offsetParent) != null)
		{
			summe += anchorItem.offsetTop;
		}
		return summe;
	}	
	else if (document.layers)
	{
		for (var i=0; i<document.anchors.length; i++) 
		{
			if (document.anchors[i].name == anchorName)
			{
				return document.anchors[i].y;
			}
		}
	}
	return 0;
}

/**
 * Calculates the absolute x position of a named anchor tag. 
 * An anchor-Tag used with this method must provide both id and name attribute with identical values.
 * example: <a name="positionAnchor" id="positionAnchor">...</a>
 * This method is useful to dynamically retrieve an elements position in a page by adding an anchor-
 * tag to that element/block.
 *
 * @param anchorName The name/id of the anchor to look for
 * @return the absolute x position in pixel within the document
 */
function getLeftPosition(anchorName)
{
	if (document.all)
	{
		var anchorItem = document.all[anchorName];
		var summe = anchorItem.offsetLeft;
		while ((anchorItem = anchorItem.offsetParent) != null)
		{
			summe += anchorItem.offsetLeft;
		}
		return summe;	
	}	
	else if (document.getElementById)
	{
		var anchorItem = document.getElementById(anchorName);
		var summe = anchorItem.offsetLeft;
		while ((anchorItem = anchorItem.offsetParent) != null)
		{
			summe += anchorItem.offsetLeft;
		}
		return summe;
	}		
	else if (document.layers)
	{
		for (var i=0; i<document.anchors.length; i++) 
		{
			if (document.anchors[i].name == anchorName)
			{
				return document.anchors[i].x;
			}
		}
		return 0;
	}
}	

function setValues(name,email)
	{
	document.getElementById('empfname').value = name;
	document.getElementById('empfemail').value = email;
	hideLayer('adressbook');
	}

function insertRecommentText(id) {
	
	document.getElementById(id+'_text').innerHTML = document.getElementById(id).value.replace(/[\n]{1}/g,"<br/> ");
}


