/*************
SOS Komfortpaket Flash 
*************/
function openBrWindow(theURL) {
  popUp = window.open(theURL,"popup","width=750,height=500");
  popUp.focus();
}
function openBigBrWindow(theURL) {
  popUp = window.open(theURL,"popup","width=750,height=600");
  popUp.focus();
}
function openInMainWindow(theURL) {
  popUp = window.open(theURL,"main");
  popUp.focus();
}

/*************
 Video-Portal
*************/

if(typeof(_eCMS_CurrentUrl) != 'undefined'
&& _eCMS_CurrentUrl.toLowerCase().indexOf('hms_bewerberportal') >= 0
&& location.href.toLowerCase().indexOf('www.hamburg') >= 0
&& _eCMS_CurrentUrl.toLowerCase().indexOf('formulare') < 0)
  location.href="http://www.hms-wir-sind-zukunft.de" + location.pathname + location.search;




function vote_onChange(objSelect, strGuid, isLoggedIn, anonymous)
{
  var value = objSelect.value;

  if(isLoggedIn || anonymous){

    var oIframe = document.getElementById("voteLoader");
    if(oIframe==null)
      return;
    oIframe.src = "/ecms/ecms.portal/live/pages/votehandler.aspx?guid=" + escape(strGuid) + "&rating=" + value + "&anonymous=" + anonymous;
    objSelect.parentNode.innerHTML = "Danke!";

  } else {
   
    document.location.href="/HMOnline/Deutsch/HMS_Bewerberportal/_Formulare/BewertungSeite.htm?guid=" + escape(strGuid.replace(new RegExp('[}{]','gi'),'')) + "&rating=" + value;
    objSelect.parentNode.innerHTML = "";
  }
}

// Workaround für Doppeltes URL-Encoding bei der Formularkomponente / ISA
function escape2(str){
  return escape(str).split("/").join("%2f").replace(/%/gi,'$');
}

function weiterempfehlen_onClick()
{  
  var toks = _eCMS_CurrentUrl.split("/");
  var name = toks[toks.length-1];

  document.location.href="/HMOn"+"line/deutsch/hms_bewerberportal/_formulare/empfehlung.htm?postingname="+escape2(name)+"&postingpath=" + escape2(_eCMS_CurrentUrl);

  return false; // Eventbehandlung abbrechen
}

function printStars(num)
{
  num = 1 * (num.replace(/,/gi,'.')) + 0.5;
  var i;
  for(i=1;i<=num;i++) // RN 20083001 war <= für "halbe Sternchen"
    document.write('<img border=0 src=/ecms/ecms.static/common/images/sternchen8.gif />');

/* // RN 20083001 war für "halbe Sternchen":
  if(num+1 >=(i+0.5)){
    document.write('<img border=0 src=/ecms/ecms.static/common/images/sternchen10.gif />');
    i++;
  }
*/
  for(;i<=5;i++)
    document.write('<img border=0 src=/ecms/ecms.static/common/images/sternchen9.gif />');

}

function getUrlParam( name )
{  
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");  
  var regexS = "[\\?&]"+name+"=([^&#]*)";  
  var regex = new RegExp( regexS );  
  var results = regex.exec( window.location.href );  
  if( results == null )    
    return "";  
  else    
    return results[1];
}

/***********
 Softlaunch
***********/

function addParamToUrl(url, paramlist)
{
  var hasparams = url.indexOf("?") > 0;
  var newurl = url;
  if (hasparams)
    newurl = newurl + "&";
  else
    newurl = newurl + "?";

  return newurl + paramlist;
}


function slmToggle(id, on)
{
  var objA  = document.getElementById(id);
  var objTr = document.getElementById("tr_"+id);
  if(!on && objA.className.indexOf("keepopen")>=0)
    return;  
  if(on){
	if(objTr!=null) objTr.style.display='';
	if(objA!=null)  objA.className = objA.className.replace(/([012])/g,'$1-hi');
  } else {
	if(objTr!=null) objTr.style.display='none';									
	if(objA!=null)  objA.className = objA.className.replace(/-hi/gi,'');
  }
}

function slmTrimId(id)
{
  var tokens = id.split('_');
  if(tokens.length>1)
    tokens.length = tokens.length-1;
  return tokens.join('_');
}

function slmclick(id){

	var objA = document.getElementById(id);
	if(objA==null)
		return true;
	if(objA.href != (unescape(location.href) +'#')) // server-seitiger Link ?
		return true;
	if(objA.className.indexOf("-hi")>=0){
		slmToggle(id,false); // zuklappen
	} else {
		slmToggle(id,true); // aufklappen
	}
	// zuletzt aufgeklappten Pfad zuklappen
	var strPos = slmSelectedItem;
	while(id.indexOf(strPos) < 0){
		slmToggle(strPos,false);
		strPos = slmTrimId(strPos);
	}
	slmSelectedItem = id;

	return false;
}

function slfaqclick(){
	return true;    	
}

// Zum Seitenanfang im OnLoad ausführen, altes OnLoad behalten
function composite_onLoadHandler(){															
	check_backtotop();
	if(composite_cachedOnLoad)
 	 	composite_cachedOnLoad();													
}

if(typeof(composite_cachedOnLoad) == 'undefined'){
    composite_cachedOnLoad = window.onload;
    window.onload = composite_onLoadHandler;
}



/*****************************************

  URSPRUENGLICH PPZ WINDOWOPENER.JS 

*****************************************/


function updateurlfocus(url, focus)
{
	if(parent.fensteropener == null) {
		parent.fensteropener = parent.opener.parent;
	}
	parent.fensteropener.location.href = url;
	
	if(focus)
		parent.fensteropener.focus();
}

function updateurl(url)
{
	if(parent.fensteropener == null) {
		parent.fensteropener = parent.opener.parent;
	}
	parent.fensteropener.location.href = url;
}

/* aus openchild.js */


function openChild(childUrl,childName,childWidth,childHeight,childLeft,childTop,childStatus,childScrollbars,childLocation,childTollbar,childMenubar) 
{
	var newChild = null;
	if (childLeft=='center') {	
		childPosLeft = Math.floor((screen.width - childWidth) / 2);
		if (childTop=='center'||childTop=='middle')
			childPosTop = Math.floor((screen.height - childHeight) / 2);
    	else if (childTop=='top')
			childPosTop = 0;
		else
			childPosTop = screen.height - childHeight-30;
	}
	else if (childLeft=='left') {	
		childPosLeft = 0;
		if (childTop=='center'||childTop=='middle')
			childPosTop = Math.floor((screen.height - childHeight) / 2);
    	else if (childTop=='top')
			childPosTop = 0;
		else
			childPosTop = screen.height - childHeight-30;
	}
	else {	
		childPosLeft = screen.width - childWidth-10;
		if (childTop=='center'||childTop=='middle')
			childPosTop = Math.floor((screen.height - childHeight) / 2);
    	else if (childTop=='top')
			childPosTop = 0;
		else
			childPosTop = screen.height - childHeight-30;
	}
 
	var tmp = '';
	if (childUrl != null)
		tmp = childUrl.toLowerCase();
	if (tmp.indexOf('/service-neu/kontakt/') > -1){
		window.location.href = childUrl;
	}
	else {
	newChild = window.open(childUrl,childName,'width='+childWidth+',height='+childHeight+',innerwidth='+childWidth+',innerheight='+ childHeight+',top='+childPosTop+',left='+childPosLeft+',status='+childStatus+',scrollbars='+childScrollbars+',location='+childLocation+',toolbar='+childTollbar+',menubar='+childMenubar);
	if (newChild != null && childUrl.indexOf("http:")<0)
		newChild.window.focus();
	}
}



/*****************************************

  URSPRUENGLICH PPZ/MS ROLLOVER.JS 

*****************************************/



if(typeof flashWindowOpener == 'undefined') {
	var flashWindowOpener = null;
}

// var fenster = window.open('', 'testfenster', '');

function ppzPicChange(n, picname) {
	if(document.images)	{
		document.images['pic'+n].src=picname;
	}
}

function ppzPicChangeSwitch(n, picname, switcher) {
	if(switcher != 'pic'+n)
	{
		if(document.images)	{
			document.images['pic'+n].src=picname;
		}
	}
}

function toggleCSSClass(id, active)
{
	var obj = document.getElementById(id);
	if(obj){
		if(active){
			obj.className = obj.className.replace("-Std","-Hover"); 		
		} else {
			obj.className = obj.className.replace("-Hover","-Std");
		}
	}
}

function chImg(name, btsrc) {
	if(document.images)	{
		document.images[name].src=btsrc;
	}
}

// funktionen für Flash Film ZGC

function sucheExperte() {
	window.open("/HMOnline/Deutsch/_Service/_Kontakt/Kontaktsuche.htm","Suche",'width=751,height=532,top=50,left=50,status=no,scrollbars=no,location=no,toolbar=no,menubar=no');
}

function goToProduct(url) {
	// alert(flashWindowOpener.location);
	if(typeof flashWindowOpener != 'object') {
		alert('Kein Object');
	}
	flashWindowOpener.location.href=url;
}

function getOpener() {
	// alert('Zustand von fWO: ' + flashWindowOpener + ' in getOpener()');
	if(flashWindowOpener == null) {
		// alert('setze opener-Var neu!');
		flashWindowOpener = window.opener.top;
	}
	// alert('Zustand von fWO nach der Abfrage: ' + flashWindowOpener + ' in getOpener()');
	// flashWindowOpener = fenster;
}


/*****************************************

  URSPRUENGLICH RN BACKTOTOP.JS 

*****************************************/


// - Setzt Sichtbarkeit des "Zum Seitenanfang" dynamisch in Abhängigkeit
//   von der Scrollposition
// - Aufruf durch OnScroll Event beim Explorer
function display_backtotop_ie()
{
	prefix = document.all('backtotoplink').style;	
	if(typeof(document.body.scrollTop)!="undefined" 
	&& document.body.scrollTop<27){	
		prefix.visibility ='hidden';
	} else {		
		prefix.visibility ='visible';		
	}	
}

// - Setzt Sichtbarkeit des "Zum Seitenanfang" Buttons und registriert, 
//   im Falle des IE, obige Funktion für den OnScroll Event
// - Wird per OnLoad aufgrufen
function check_backtotop()
{
	var ie = (document.all) ? true : false;
	var ns = (document.layers) ? true : false;

	if (ie) {
		// folgende Logik beim Internet Explorer:
		// sobald im Fenster nach gescrollt wurde, Link anzeigen		

		if(document.getElementById('backtotoplink')==null)
			return;
		prefix = document.getElementById('backtotoplink').style;
		
		prefix.visibility = 'hidden';									
		window.onscroll = display_backtotop_ie;
	} else {
		// folgende Logik bei anderen Browsern:
		// Differenz Fenster- und Dokumenthöhe beim Laden feststellen
		if (ns) {
			if(typeof(document.layers['backtotoplink'])=='undefined')
				return;
			prefix = document.layers['backtotoplink'];
			backtotop_top = document.layers['backtotoppos'].pageY;
			stage_height = window.innerHeight;		
		} else {
			if(document.getElementById('backtotoplink')==null)
				return;
			prefix = document.getElementById('backtotoplink').style;
			backtotop_top = document.getElementById('backtotoppos').offsetTop;
			stage_height = window.innerHeight;	
		}
		
		if (backtotop_top>=stage_height) {
			prefix.visibility='visible';							
		} else {
			prefix.visibility='hidden';							
		}
		
		window.onresize = check_backtotop;
	}
}



// Die eigentliche Funktion, die hinter dem "Zum Seitenanfang Button steckt"
// 
function do_backtotop()
{
	self.scrollTo(0,0);						
}






/*****************************************

  URSPRUENGLICH PPZ/RN NAVIGATION.JS 

*****************************************/



// Diese Konstanten müssen mit dem C# Code abgeglichen sein !
var imgArrOff = "/eCMS/eCMS.Static/Common/Images/pic_white_arrow_left.gif";
var imgArrOn  = "/eCMS/eCMS.Static/Common/Images/pic_white_arrow_down.gif";
var imgEmpty  = "/eCMS/eCMS.Static/Common/Images/pic_empty.gif";
var imgBlArrOff = "/eCMS/eCMS.Static/Common/Images/pic_black_arrow_left.gif";
var imgBlArrOn  = "/eCMS/eCMS.Static/Common/Images/pic_black_arrow_down.gif";
// Namensbestandteile / Teilstrings / Separatoren
var ppz_menu_id_prefix = 'menu-';
var ppz_active_class_designator = 'active';
var ppz_menu_path_separator = '-';
var ppz_menu_image_prefix = 'menu-img-';
var ppz_ic_image_prefix = 'ic-img-';


// set_class_name
// Setzt in Objekt inObj die Property className auf inClass
// wenn die Property nicht bereits den Wert enthaelt
function set_class_name(inObj, inClass)	
{
	if ((inObj) && (inObj.className) && (inObj.className != inClass))	{
		inObj.className = inClass;
	}
	return (inObj);
}

// get_submenu_id_from_path
// Erzeugt die ID einer Untermenuegruppe aus dem Input-Array
//
function get_submenu_id_from_path(inPath)	
{
	var newpath =  inPath.slice(0);	// Must make a copy here!!

	newpath[newpath.length-1] = 0; // Untermenuegruppe hat immer '0' als Ende des ID-Pfads
	submenu_id = ppz_menu_id_prefix + newpath.join(ppz_menu_path_separator);
	return submenu_id;
}

// close_submenu
// submenu schliessen, argument ist array mit den ID-Pfad-Teilen
//
function close_submenu(inPath)	
{
	var submenu;
	var new_class_name ='';

// Ebene bestimmen	
	switch(inPath.length)	{
	case 0:
	case 1:
		return 0;	// gibts nicht, abbruch	
	case 2:			// 1. Unterebene (Ebene 2)
		new_class_name = 'menu-layer-1';
// Sonderfall Ebene 1: Menue ist Bild!
		var menu_image = document.getElementById(ppz_menu_image_prefix + inPath[0]);
		if (menu_image)	{
			menu_image.src = imgArrOff;
		}
		break;
	case 3:			// 2. Unterebene (Ebene 3)
		new_class_name = 'menu-layer-2';
// Sonderfall Ebene 2:
// wenn keine Auswahl vorliegt muss Ebene2 mit anderen Farben dargestellt werden
		var targetmenu = document.getElementById(get_submenu_id_from_path(inPath.slice(0,-1)));
		set_class_name(targetmenu, 'menu-layer-1-active');
		if (inPath[inPath.length-1] == '0')	{
			targetmenu = document.getElementById(ppz_menu_id_prefix + inPath[0] + ppz_menu_path_separator + inPath[1]);
			set_class_name(targetmenu, 'submenuitem-1');
		}
		break;
	case 4:			// wird noch nicht verwendet, support fuer Unterebene (Ebene 4)
		new_class_name = 'menu-layer-3';
		break;
	default: 			// weitere Ebenen sind z.Zt. nicht vorgesehen
		return 0;	// abbruch
	}	
	submenu = document.getElementById(get_submenu_id_from_path(inPath));
	if (set_class_name(submenu, new_class_name))	{
		return 1;
	}
	return 0;
}

// open_submenu
// submenu oeffnen, argument ist array mit den ID-Pfad-Teilen
// hier werden auch ggf geoffnete Untermenues der gleichen Eben geschlossen,
// wenn noetig, Elternmenues bis zur obersten Ebene geoeffnet
//
function open_submenu(inPath)	
{
	// // alert('Open : ' + inPath);	
	var i, j;
	var targetmenu;	
	
	switch(inPath.length)	{
	case 0:
	case 1:
		return 0;
	case 2:
		i = 1;


// evtl. geoeffnete Untermenues auf geoeffneter Ebene einklappen und inaktiv setzen
// dabei das menue, welches geoeffnet werden soll uebergehen
		while ((i == inPath[0]) || close_submenu(new Array(i, '0')))	{
			++i;
		}
// Sonderfall Ebene 1: Menue ist Bild!
		var menu_image = document.getElementById(ppz_menu_image_prefix + inPath[0]);
		if (menu_image)	{
			menu_image.src= imgArrOn;
		}
// evtl. geoeffnete Untermenues auf geoeffneter Ebene einklappen und inaktiv setzen
// dabei das menue, welches geoeffnet werden soll uebergehen
		i = 1;
		while (close_submenu(new Array(inPath[0], i, '0')))	{
			targetmenu = document.getElementById(ppz_menu_id_prefix + inPath[0] + ppz_menu_path_separator + i);
			set_class_name(targetmenu, 'submenuitem-1');
			++i;
		}
//	jetzt eigentliches Zielmenu aktivieren und untermenu oeffnen
		targetmenu = document.getElementById(get_submenu_id_from_path(inPath));
		set_class_name(targetmenu, 'menu-layer-1-active');
		break;
	case 3:
	
		if (inPath[inPath.length-1] == '0')	{
			var parentmenupath = inPath.slice(0,-1);
			parentmenupath[parentmenupath.length-1] = '0'; // IE can't handle Array.push() in some versions
			open_submenu(parentmenupath);	// Parent-Menu oeffen

// auf uebergeordneter Ebene muss jetzt gedimmt werden!
			targetmenu = document.getElementById(get_submenu_id_from_path(inPath.slice(0,-1)));
			set_class_name (targetmenu,  'menu-layer-1-active-selection');	
// evtl auf dieser Ebene vorhandene Highlights entfernen
			i = 1;
			while(targetmenu = document.getElementById(ppz_menu_id_prefix + inPath[0] + ppz_menu_path_separator + inPath[1] + ppz_menu_path_separator + i))	{
				if (i != inPath[inPath.length-1])	{
					set_class_name(targetmenu, 'submenuitem-2');
				}
				++i;
			}
			targetmenu = document.getElementById(get_submenu_id_from_path(inPath));
			set_class_name(targetmenu, 'menu-layer-2-active');
			targetmenu = document.getElementById(ppz_menu_id_prefix + inPath.slice(0,-1).join(ppz_menu_path_separator));
			set_class_name(targetmenu, 'submenuitem-1-active');
		} else	{
// evtl auf dieser Ebene vorhandene Highlights entfernen
			i = 1;
			while(targetmenu = document.getElementById(ppz_menu_id_prefix + inPath[0] + ppz_menu_path_separator + inPath[1] + ppz_menu_path_separator + i))	{
				if (i != inPath[inPath.length-1])	{
					set_class_name(targetmenu, 'submenuitem-2');
				}
				++i;
			}
			
			targetmenu = document.getElementById(ppz_menu_id_prefix + inPath.join(ppz_menu_path_separator));
			set_class_name(targetmenu, 'submenuitem-2-active');
		}
		break;
		
	case 4:
		var parentmenupath = inPath.slice(0,-2);
		parentmenupath[parentmenupath.length] = 0; // IE can't handle Array.push()
		open_submenu(parentmenupath);	// Parent-Menu oeffen
											// Weitere aktionen muessten hier implementiert werden!
		break;
	default:
		return 0;
	}
}


function toggle_sub(inID)	
{
	var menu_item = document.getElementById(inID);
	if (menu_item)	{
		var becomes_active = (menu_item.className.indexOf(ppz_active_class_designator) == -1) ? 1 : 0;
		var i;
		var menu_path = inID.substring(5).split(ppz_menu_path_separator);
	
		switch (menu_path.length)	{	// Welche Ebene?
			case 0:						// Diesen Fall gibt's nicht
				break;
			case 1:						// oberste Ebene
			case 2:						// Ebene 2
			case 3:						// Ebene 3 
			case 4:
				if (becomes_active)	{
					open_submenu(menu_path);
				} else	{
					if (menu_path[menu_path.length-1] == '0')
						close_submenu(menu_path);
				}
				break;
			default:
				break;
		}
	}	
}

function toggle_ic(inID)	
{
	ic_item = document.getElementById(inID);
	if (ic_item)	{
		var becomes_active = (ic_item.className.indexOf(ppz_active_class_designator) == -1) ? 1 : 0;
		var ic_path = inID.substring(11).split(ppz_menu_path_separator);
		if (becomes_active)	{
			set_class_name(ic_item, 'InfoCenter-layer-active');
			var arrow_image = document.getElementById(ppz_ic_image_prefix + ic_path[0]);
			if (arrow_image)	{
				arrow_image.src= imgBlArrOn;
			}
		} else	{
			set_class_name(ic_item, 'InfoCenter-layer');
			var arrow_image = document.getElementById(ppz_ic_image_prefix + ic_path[0]);
			if (arrow_image)	{
				arrow_image.src= imgBlArrOff;
			}
		}

	}
}


// Funktionen fuer das SUBMIT-Handling der Expertensuche


function icHandleInput()
{
	if(window.event && window.event.keyCode == 13)
		icSubmit();						
}
function icSubmit()
{
	url = '/HMOnline/Deutsch/_Service/_Suchen/Suchen.htm?PLZ=' + escape(document.forms[0].PLZ.value);
	openChild(url, 'Suchen',741,503,'center','middle','no','yes','no','no','no');return false;
}	



/*****************************************

  FLASH DETECTION

  URSPRUENGLICH PPZ(?) CHECKFLASH_JS 

*****************************************/

var gIsMac;
var gIsIE;
var gBrowserVersion;
var vbFlashInstalled;
var vbFlashVersion;
var gFlashChecked;

gIsWin  = (navigator.appVersion.indexOf("Win") != -1) ? true : false;
gIsMac  = (navigator.appVersion.indexOf("Mac") != -1) ? true : false;
gIsIE	= (document.all)?true:false;

gBrowserVersion = 0;

CheckMSIE = navigator.userAgent.indexOf("MSIE");
if (CheckMSIE > -1)
{	Short = navigator.userAgent.substr(CheckMSIE+5,100);
	gBrowserVersion = Short.substr(0,Short.indexOf(";"));
}

gFlashChecked = false;


if (gIsWin && gIsIE) document.writeln("<script language='VBScript' src='/HMOnline/Deutsch/_Intern/checkflash_vbs.htm?wbc_purpose=Basic&WBCMODE=PresentationUnpublished'></script>");


//	----------

function Check_Flash (Version, Loose)
{
	FlashDetectable = true;
	FlashInstalled = false;
	FlashActive = false;
	FlashVersion = "not detectable";
	FlashImplementation = "not detectable";

	if (vbFlashInstalled)
	{
		FlashInstalled = vbFlashInstalled;
		FlashActive = FlashInstalled;
		FlashVersion = 1*vbFlashVersion;
		FlashImplementation = "ActiveX";
	}
	else if (navigator.plugins && navigator.plugins.length > 0)
	{
		FlashImplementation = "Plugin";
		if (navigator.plugins["Shockwave Flash"])
		{
			FlashInstalled = true;
			var StringTmp = navigator.plugins["Shockwave Flash"].description.split(" ");
		
			for (var i=0; i<StringTmp.length; ++i)
			{
				if (isNaN(parseInt(StringTmp[i])))
					continue;
				FlashVersion = 1*StringTmp[i];
			}
		}

		if (navigator.mimeTypes["application/x-shockwave-flash"])
 			FlashActive = (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin != null);
	}
	
	if (gIsIE && gIsMac && (1*gBrowserVersion)<5) FlashDetectable = false;
	if (FlashVersion=="not detectable") FlashImplementation = "not detectable";

	gFlashChecked = true;

	if (Loose)
		CheckRes = ((FlashVersion >= 1*Version) || !FlashDetectable);
	else
		CheckRes = (FlashVersion >= 1*Version);
	
	if (!FlashActive) CheckRes = false;
	
	return (CheckRes);
}

//	----------

function Show_Flash (File, XSize, YSize, Version, BGColor, NoFlashURL, NoFlashImg, Loose)
{
	FlashOK = Check_Flash (Version, Loose);

	if (FlashOK)
		Build_SWF (File, XSize, YSize, Version, BGColor);
	else
	{
		if (typeof(NoFlashURL)=="string" && NoFlashURL!="")
			location.replace (NoFlashURL);
		else if (typeof(NoFlashImg)=="string" && NoFlashImg!="")
			Build_Img (NoFlashImg, XSize, YSize);
		else
			document.write("<b>Keine Flash-Alternative vorgegeben!</b>");
	}
}

//	----------

function Build_Img (File, XSize, YSize)
{
	var ImgString = "<img src='" + File + "' alt='' width=" + XSize + " height=" + YSize + " border=0 align='top'>";
	document.write(ImgString);
}

//	----------

function Build_SWF (FileAndParams, XSize, YSize, VersionOpt, BGColorOpt)
{
	if (typeof(FileAndParams)=="undefined")
	{	document.write("<b>Build_SWF</b>: keine swf-Datei angegeben");
		return false;	}

	if (typeof(XSize)=="undefined" || typeof(YSize)=="undefined")
	{	document.write("<b>Build_SWF</b>: Unkorrekte Gr&ouml;&szlig;enangabe");
		return false;	}
	
	if (typeof(VersionOpt)=="undefined") VersionOpt = 5;
	if (typeof(BGColorOpt)=="undefined") BGColorOpt ="#ffffff";

	//	Defaults:
	var FlLoop		= "false";
	var FlMenu		= "false";
	var FlQuality	= "high";
	var FlAlign		= "lt";
	var FlScale		= "noscale";
	var FlMode		= "opaque";
		
	var FlashString = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ";
	FlashString    += "codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=" + VersionOpt + ",0,0,0' ";
	FlashString    += "width='" + XSize + "' ";
	FlashString    += "height='" + YSize + "'> ";
	FlashString    += "<param name=movie value='" + FileAndParams + "'> ";
	FlashString    += "<param name=loop value='" + FlLoop + "'> ";
	FlashString    += "<param name=menu value='" + FlMenu + "'> ";
	FlashString    += "<param name=quality value='" + FlQuality + "'> ";
	FlashString    += "<param name=scale value='" + FlScale + "'> ";
	FlashString    += "<param name=salign value='" + FlAlign + "'> ";
	// FlashString    += "<param name=wmode value='" + FlMode + "'> ";
	FlashString    += "<param name=bgcolor value='" + BGColorOpt + "'> ";
	FlashString    += "<embed src='" + FileAndParams + "' ";
	FlashString    += "loop='" + FlLoop + "' ";
	FlashString    += "menu='" + FlMenu + "' ";
	FlashString    += "quality='" + FlQuality + "' ";
	FlashString    += "scale='" + FlScale + "' ";
	FlashString    += "salign='" + FlAlign + "' ";
	// FlashString    += "wmode='" + FlMode + "' ";
	FlashString    += "bgcolor='" + BGColorOpt + "' ";
	FlashString    += "width='" + XSize + "' ";
	FlashString    += "height='" + YSize + "' ";
	FlashString    += "type='application/x-shockwave-flash' ";
	FlashString    += "pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>";
	FlashString    += "</embed></object>";
	
	document.write(FlashString);
}



/*****************************************

  ONLINE TARIFRECHNER POPUP LAYER

  URSPRUENGLICH RN DHTMLPOPUP_JS 

*****************************************/



function DhtmlPopupLibObj(name){
	return document.getElementById?document.getElementById(name):document.all?document.body.all[name]:layer?0:0;	 
}

function DhtmlPopupUrldecode(str){
   str = str.replace(/\+/g," ")
   return unescape(str)
}

dhtmlPopupActiveItem = "";

function DhtmlPopup(text, id, link)
{	
	text = DhtmlPopupUrldecode(text);
	if(link && link != ""){
// ALTer Aufruf	text += "<a target=_blank style='text-align:left;width:50%' href='"+link+"'>Groß</a>";
		text += "<a  style='text-align:left;width:50%' href='javascript:void(openChild(&quot;"+link+"&quot;,&quot;_blank&quot;,720,280,&quot;center&quot;,&quot;middle&quot;,&quot;no&quot;,&quot;yes&quot;,&quot;no&quot;,&quot;no&quot;,&quot;no,resizable=yes&quot;))'>Groß</a>"
		text += "<a style='text-align:right;width:50%' onclick='DhtmlPopup(\"\", null, \"\");return false;' href='javascript:void()'>Schließen [X]</a>";
	} else {
		text += "<a style='text-align:right;width:100%' onclick='DhtmlPopup(\"\", null, \"\");return false;' href='javascript:void()'>Schließen [X]</a>";
	}

	var objT = DhtmlPopupLibObj('DhtmlPopupText');
	if(!objT)return;
	var objL = DhtmlPopupLibObj('DhtmlPopupLayer');	
	if(!objL)return;
		
	text = unescape(text);		

	if(id && dhtmlPopupActiveItem != id){
			
		dhtmlPopupActiveItem = id;
		objT.innerHTML = unescape(text);		
		objL.style.visibility = "visible";
		do_backtotop();
	} else {

		dhtmlPopupActiveItem = "";	
		objT.innerHTML = "";
		objL.style.visibility = "hidden";		
	} 	
}