// Copyright: Siemens Power Generation OI43 Web Solutions, Erlangen, 2001
//==================================================================================
//<table border=0 cellpadding=5 cellspacing=5><tr><td bgcolor=yellow>
// <br>
//<font face=arial> Achtung!Sie benutzen einen Browser, der diese Seite nicht interpretieren kann!<br>
// <br>
// <b>Bitte verwenden Sie mindestens Netscape Version 4.xx oder Internet Explorer Version 4.xx<br></b>
// Wenn Sie bei der Installation Unterstützung benötigen, wenden Sie Sich bitte an die Hotline.<br>
// <br>
// Evtl. folgende Fehlermeldungen schließen Sie bitte mit OK.<br>
// <br><hr>
// <br>
//<font face=arial> Warning! Your browser-version cannot interprete this page.<br>
// <br>
// <b>Please use at least Netscape Version 4.xx or Internet Explorer Version 4.xx<br></b>
// If you need help in installing the software, please call the hotline.<br>
// <br>
// Please close any following error messages by clicking the OK-button.<br>
//<br></font></td></tr></table>

// Der obige Kommentar wird nur im Fehlerfall am Bildschirm erscheinen!
//==================================================================================
//<font size=-2>
//<font size=-2>
//
// SRE-Version 0.2
var toolboxVersion="PG-Web-Toolbox Version 2.0sre 2001-12-13 / Contact: Gudrun.Kaiser@erl11.siemens.de";
// 2001-12-11
// modified for SRE by Schrader
//	- toolbox-location umgesetzt
//	- Farbselektion entfernt, Farben fest vorgegeben
//	- Siemens-logo farbig angepasst eingesetzt
//	- generische Navigation angepasst
//	- Suchen-Feld, JavaScript-Code angepasst
//	- Sprach-Button kommt nur, wenn Sprachvariable gesetzt ist.
//	- SekNavi-Einträge unterstrichen mittels styleguide und cellpadding=1

// 2001-11-01
// relativen Vorpfad für Navigationen eingebaut  Schrader

// 2001-10-10
// suchkatalog für search-Formular von www_1 auf www-1 geändert
// createprint: auch für"html" nicht nur "htm" ma

// 2001-09-05
// toolboxLocation: ':' entfernt, falls kein port angegeben ist gk

// 2001-09-04
// function setTableWidth(paraWidth) eingefügt aber nicht aktiviert  ma

// 2001-08-17
// Link zur Standorthomepage hinter Servername rechts oben  ma

// 2001-07-31
// Farbe redHarvestPortal war weg und ist jetzt wieder drin gk
//
// 2001-07-30
// endprimnavi: position des 'welcome' wenn secinfo verwendet wird gk
//
// 2001-07-28
// feedback mit smileys gk
//
// Fehler bei setColors behoben (if (colorTypeSet)....)  GK 2001-07-20
//
// 2001-09-28
// Erfurt nachgetragen
//
// Toolbox-Version 2.0a	GK 2001-07-05
// Fuss in seknavi
// Farben vereinfacht
// Servername rechts oben
// Home-Server über cookie
// -----------------------------------------------
// Toolbox-Version 2.0
// based on Version 1.3p
// -----------------------------------------------


// Configuration
//==============
// Diese Variablen bitte an Ihren Server anpassen.
// Please adapt these lines to your server.

// Toolbox location and version:
//==================
// Falls kein https verwendet wird, kann die location auch /common/templates/ sein!
// für https und IE muss für Dateien aus /common/.... explizit
//	das https-Protokoll verwendet werden, IE nimmt sonst http://
// und fragnt anschliessen dauernd ab, ob die Bilder der toolbox geladen werden dürfen.

var toolboxLocation="/toolbox/templates/";
var toolboxProtocol=document.location.protocol;

var toolboxPort=document.location.port;
if(toolboxPort=="" || toolboxPort=="undefined" || toolboxPort==null)
{
	toolboxPort=''
}else{
	toolboxPort=':'+toolboxPort
}

var domainName=document.location.hostname;

toolboxLocation=document.location.protocol+"//"+domainName+toolboxPort+toolboxLocation;


// Funktionsumfang Toolbox
var toolboxTest=false;
var printFunction=false;

// locations
//==============
var TlocationName=new Array(	'Berlin (Service)'			,'Berlin (Manuf.)'		,'Charlotte'		,'Erlangen '				,'Görlitz'			,'Hamilton'			,'Mülheim (Service)'			,'Mülheim (Manuf.)'		,'Newcastle'				,'Orlando'			,'Redwitz'				)
var TlocationName2=new Array(	'Berlin (Service)'			,'Berlin (Manuf.)'		,'Charlotte'		,'Erlangen/Karlsruhe/Offenbach '	,'Görlitz'			,'Hamilton'			,'Mülheim (Service)'			,'Mülheim (Manuf.)'		,'Newcastle'				,'Orlando'			,'Redwitz'				)
var TlocationString=new Array(	'blnwbf1a.blnh'				,'www.blnh'			,'cltw110a'		,'erl.'					,'glzl'				,'hltm'				,'mlhw105a'				,'www.mlh'			,'spgl'					,'orla'				,'intranet.red1'			)
var TlocationUrl=new Array(	'http://blnwbf1a.blnh.siemens.de/'	,'http://www.blnh.siemens.de/'	,'http://cltw110a/'	,'http://www.pg.erl.siemens.de/'	,'http://www.glzl.siemens.de/'	,'http://www.hltm.siemens.ca/'	,'http://mlhw105a.mlh.siemens.de/'	,'http://www.mlh.siemens.de/'	,'http://intranet.spgl.siemens.co.uk'	,'http://www.orla.siemens.com/'	,'http://intranet.red1.siemens.de/'	)


TlocationName[TlocationName.length]='Erfurt';
TlocationName2[TlocationName2.length]='Erfurt';
TlocationString[TlocationString.length]='www.erfg';
TlocationUrl[TlocationUrl.length]='http://www.erfg.siemens.de/';


function TfindLocationString(string){
// String -> index
	var iFound=-1;
	for(i=0;i<TlocationName.length+1;i++){
		if (TlocationString[i] == string){iFound = i}
	}
	return iFound;
}
//------------------------------------
// get default location for generic and
//------------------------------------
var TdefaultLocation='/';


// colors
//==============
var colorType="seriousInviting6";
var colorTypeStandard="seriousInviting6";
var noColorType=false;

// serious,inviting (lower right) = blue
var colorSiemens="#FFFFFF"		

var colorHome="#CCCCCC";
var colorRightFromPrimnavi="#999999";

var colorRightFromSearch="#99CC66"

var colorStandard="#CCCCCC";
var colorSecinfo="#CCCCCC";
var colorSearch="#99CC66";

var colorPrimnavi="#99CC66";
var colorSeknavi="#CCCCCC";

var colorGenNaviFont='white'
var colorPGNaviFont='white'
var colorHomeFont='black'
var colorPrimnaviFont='black';
var colorSearchFont='white';
var colorServerFont='white'
var colorSeknaviFont='black'

var colorMain="#FFFFFF"

var colorNavi=new Array('white','white','white','white','white','white')


// Buttons and links
//==================

// Generic Buttons: SCD
var SCDLinkDe="http://scd.siemens.de/pages/suche_de.html";
var SCDLinkEn="http://scd.siemens.de/pages/suche_en.html";
var SCDTextDe="SCD";
var SCDTextEn="SCD";

var SCDLinkFooterDe="http://scd.kwu.erl.siemens.de/";
var SCDLinkFooterEn="http://scd.kwu.erl.siemens.de/";

// Generic Buttons: Employee Portal
//var SCOLinkDe="http://sco.siemens.de/scounits.html";
//var SCOLinkEn="http://sco.siemens.de/scounits_E.html";
var SCOLinkDe="https://esp.sip.siemens.net/SIPF_https-IE-de/PortalUI/EP.entry.html";
var SCOLinkEn="https://esp.sip.siemens.net/SIPF_https-IE-en/PortalUI/EP.entry.html";
var SCOTextDe="Employee Portal";
var SCOTextEn="Employee Portal";

// Generic Buttons: SRE-Home
var homeLinkDe="https://sre.siemens.com";
var homeLinkEn="https://sre.siemens.com";

// Generic Buttons: Home
var helpLinkDe=TdefaultLocation;
var helpLinkEn=TdefaultLocation;
var helpTextDe="Home";
var helpTextEn="Home";

// Generic Buttons: Contact
var contactLinkDe="https://sre.siemens.com/de/kontakt.php";
var contactLinkEn=TdefaultLocation+"toolbox/templates/contact.htm";
var contactTextDe="Kontakt&nbsp;";
var contactTextEn="Contact&nbsp;";


//===============================================

var genericLinks = new Array();
var genericText = new Array();
var standardLinks = new Array();
var standardText = new Array();

// Number of columns forgeneric items  for formatting
var numberOfGenNavi = "31";

// Top of Seknavi: Site-Home
var homeLinkPara="";
var homeLinkText="";
var homeLinkUsed = false;

//More definitions can be made in the subroutine startBody().

// globale variablen
//==================
var naviColor = "";
var selectedColor = "";
var sekNaviItems="";

// if startSekNavi is not called by user, it will be called automatically by startHtmlContent
var sekNaviUsed=false;

//prepath for navigation files to be added to relative navigation file path
var sekNaviPrepath="";
var primNaviPrepath="";

// maybe you need the toolbox layout without generic navigation
var onlineLayout=true;

// right part of the page may contain secondary information
var secInfo=false;

// text at the bottom of the secondary navigation bar
var sekNaviEndColor='#ffffff';
var sekNaviEndText=' ';

var initialPageLanguage="";

// what browser do you use?
var IE=false;
var NS=true;



// globale variablen für die navigation etc.
//=============================================
var sekNaviSelectedText ="";
var languageOfThisPage="d";
var typeOfThisPage="";
var selectedChapter="";

// slide menue
//========================================
var	barColor='0';
var 	selectedColor='';
var	slide="noslide";
var countMain=-1;



//globale variablen für die primärnavigation
//==========================================
var primNaviSelectedText = "";

//================================================================================

function setTableWidth(paraWidth){
//==============================
//tableWidth=paraWidth;
} // endfunc

//================================================================================
//================================================================================
function newToolboxWindow(urltext){
	var hilfewin=new Object();
	var width=screen.width-200
	var height=screen.height-300
	if (!hilfewin.closed || hilfewin.closed) {
		hilfewin=window.open(urltext,'hilfe','toolbar=yes,resizable=yes,scrollbars=yes,location=yes,status=yes,menuebar=yes,width='+width+',height='+height+',screenX=100,screenY=100');
	}else{
		  hilfewin.document.location.replace(urltext);
	}
	if (hilfewin.focus) {
		  hilfewin.focus();
	}
	//hilfewin.moveTo(200,200)

}


function initToolbox(){
//==============================

//---------------------------------------------------------
// check browser version
//---------------------------------------------------------
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var bsyslan = navigator.systemLanguage;
//alert(bName+bVer)
var doesnt_workie = (bVer < 4 && bName == "Microsoft Internet Explorer");
 var doesnt_workns = (bVer < 4 && bName == "Netscape" && bsyslan == "undefined" );
var doesnt_work=(doesnt_workie || doesnt_workns);

//---------------------------------------------------------
// Es wird mindestens Netscape 4 oder MSIE 4 vorausgesetzt,
//    falls andere Version oder Browser, dann Fehlermeldung
//---------------------------------------------------------
if (doesnt_work) {
string0="\nSie arbeiten mit "+bName+ " Version "+bVer+".\n\n"
string1="Diese Seite wurde für Netscape Version 4.xx  oder Microsoft Internet Explorer Version 4.xx entwickelt."
string2="\nBitte benutzen oder installieren Sie diese oder eine höhere Version."
string3="\n \nEvtl. folgende Fehlermeldungen bitte mit OK schließen.\n"
	alert(string0+string1+string2+string3);
} // endif (doesnt_work)

if(bName=="Microsoft Internet Explorer"){IE=true;NS=false}else{IE=false;NS=true}

}

function toBold(obj){
//==============================
//---------------------------------------------------------
// switch style to bold
//---------------------------------------------------------
if(navigator.appName != "Netscape"){
	obj.style.fontWeight = 'bold'
}
}

function toNormal(obj){
//==============================
//---------------------------------------------------------
// ...and back
//---------------------------------------------------------
if(navigator.appName != "Netscape"){
	obj.style.fontWeight = 'normal'
}
}

function setColors(colorTypeSet){
//not used in SRE toolbox
} //endfunc setColors



function startBody(languageLink,languageOfPage,genericButtonType,homeLinkParameter,contactLinkParameter,secondaryInformation,colorTypePara,imgFile){
//==============================
initToolbox();
if(colorTypePara=="" || colorTypePara=="undefined" || colorTypePara==null){colorTypePara="emotionalWarm6";noColorType=true}
setColors(colorTypePara)

if(imgFile=="" || imgFile=="undefined" || imgFile==null){imgFile=toolboxLocation+'images/standard.jpg'}

if(secondaryInformation=="secinfo"){secInfo=true}

//if(toolboxTest){
//	document.writeln('<p align="right"><font face="arial"><small><small>'+toolboxVersion+'. Der neue Styleguide ist erstmal vorübergehend auf dem Testserver installiert.</small></small></font><hr width="100%">');
//}

//evtl. umwandeln, damit's an die alte version passt
if (genericButtonType==null) genericButtonType="undefined";

initialPageLanguage=languageOfPage;
if (languageOfPage==""||languageOfPage=="undefined"||languageOfPage==null) {
	languageOfPage="d";
	genericButtonType="";
}
if (languageOfPage=="d"&&genericButtonType=="undefined") {
	languageOfPage="d";
	genericButtonType="";
}
if (languageOfPage=="e"&&genericButtonType=="undefined") {
	languageOfPage="e";
	genericButtonType="";
}
if (languageOfPage=="id") {
	languageOfPage="d";
	genericButtonType="i";
}
if (languageOfPage=="ie") {
	languageOfPage="e";
	genericButtonType="i";
}
if (languageOfPage=="we") {
	languageOfPage="e";
	genericButtonType="w";
}
if (languageOfPage=="wd") {
	languageOfPage="d";
	genericButtonType="w";
}
// ende umwandeln

// Link auf die andere Sprache: "" -> automatisch; "*" -> dummy

// automatisch: /de/ -> /en/, /d/ -> /e/, falls keine /de/ oder /d/ -> "*" (dummy)
if (languageLink==""||languageLink=="undefined"||languageLink==null) {
	urlstring=unescape(document.location);
	if (languageOfPage=="d") {
		i1=urlstring.lastIndexOf("/de/");
		if(i1 != -1) {
			languageLink=urlstring.substring(0,i1)+"/en/"+urlstring.substring(i1+4,urlstring.length);
		} else {
			i1=urlstring.lastIndexOf("/d/");
			if(i1 != -1) {
				languageLink=urlstring.substring(0,i1)+"/e/"+urlstring.substring(i1+3,urlstring.length);
			} else {
				languageLink="*";
			}
		}
	} else {
		i1=urlstring.lastIndexOf("/en/")
		if(i1 != -1) {
			languageLink=urlstring.substring(0,i1)+"/de/"+urlstring.substring(i1+4,urlstring.length);
		} else {
			i1=urlstring.lastIndexOf("/e/");
			if(i1 != -1) {
				languageLink=urlstring.substring(0,i1)+"/d/"+urlstring.substring(i1+3,urlstring.length);
			} else {
				languageLink="*";
			}
		}
	}
} // endif languageLink==""

// "*" --> setzen auf dummy
if (languageLink=='*'){
	if (languageOfPage=="d"){
		languageLink=toolboxLocation+"dummy_english.htm"
	} else {
		languageLink=toolboxLocation+"dummy_deutsch.htm"
	}
} // endif languageLink=='*'

// "**" --> setzen auf dummy ohne Back-Link
if (languageLink=='**'){
	if (languageOfPage=="d"){
		languageLink=toolboxLocation+"dummy_english_frame.htm"
	} else {
		languageLink=toolboxLocation+"dummy_deutsch_frame.htm"
	}
} // endif languageLink=='**'

// ende Sprachumschaltung

//globale Variablen (werden z.B. in endHtmlContent für den Footer verwendet):

languageOfThisPage=languageOfPage;
typeOfThisPage=genericButtonType;

homeLinkUsed=false;

if (homeLinkParameter!=""&&homeLinkParameter!="undefined"&&homeLinkParameter!=null) {

	var trenn=homeLinkParameter.indexOf('+');
	if (trenn > 0) {
		homeLinkText=homeLinkParameter.substring(0,trenn)
		homeLinkPara=homeLinkParameter.substring(trenn+1,homeLinkParameter.length)
	}else{
		homeLinkPara=homeLinkParameter;
		homeLinkText='Home';
	}

	homeLinkUsed=true;

}
// used no longer ....
if (contactLinkParameter!=""&&contactLinkParameter!="undefined"&&contactLinkParameter!=null) {
	contactLinkDe=contactLinkParameter;
	contactLinkEn=contactLinkParameter;
}

// vorbelegen der verschiedenen generischen Buttons

var dummy = "";
// intranet:
var dGenericLinks = new Array(homeLinkDe,SCOLinkDe, helpLinkDe,languageLink,SCDLinkDe, 	contactLinkDe);
var dGenericText  = new Array(''        ,SCOTextDe, helpTextDe,'English',SCDTextDe, 	contactTextDe);

var eGenericLinks = new Array(homeLinkEn,SCOLinkEn, helpLinkEn,languageLink,SCDLinkEn, contactLinkEn);
var eGenericText  = new Array(''        ,SCOTextEn, helpTextEn,'Deutsch',SCDTextEn,    contactTextEn);



//alert(languageOfPage);

// alt!!! gibt's nicht mehr, daher immer auf ""
// if (genericButtonType=="undefined"||genericButtonType==null) genericButtonType="";
genericButtonType="";


// Generic Navigation

if (languageOfPage=="d" && genericButtonType=="") {
 for (i=0;i<eGenericLinks.length+1;i++){
 genericLinks[i]= dGenericLinks[i];
 genericText[i]=dGenericText[i];
 }//endfor
} //endif "d",""

if (languageOfPage=="e" && genericButtonType=="") {
 for (i=0;i<eGenericLinks.length+1;i++){
 genericLinks[i]= eGenericLinks[i];
 genericText[i]=eGenericText[i];
}//endfor
} //endif "e",""

// needed anymore????


// end of navigation settings

// diese Variable wird von aussen gesetzt, wenn die generische Navi nicht gebraucht wird
if (!onlineLayout) genericLinks.length=1;

//----------------- Ausgabe ----------------

document.writeln(' <!-- 	First Row, First Half Top Middle-Right Box Left (90x144), Logo Area (45x*) -->');
document.writeln('<a name="top"></a>');
// NS interpretiert die height=100% nicht richtig
if(IE){
	document.writeln(' <table width="100%"  height="100%" border="0" cellspacing="0" cellpadding="0">');
}else{
	document.writeln(' <table width="100%"  height="70%" border="0" cellspacing="0" cellpadding="0">');
}
document.writeln(' 	<tr>    ');
document.writeln(' <!-- remove the gif below and insert the -->');
document.writeln(' <!--		key visual pic. it MUST have the size (144x90) or the layout wont be as nice as  usual.-->');
document.writeln('		<td bgcolor="#999999" align="center" rowspan="3"><img src="'+imgFile+'" border="0" height="90" width="144"></td>');
document.writeln('  <!-- same here : remove the following gif and insert the logo (128x54) instead !! -->');
document.writeln('			<td bgcolor="'+colorSiemens+'" rowspan="2"><a href="http://www.siemens.com/"><img src="'+toolboxLocation+'images/siemens-marke.gif" border="0" height="54" width="128"></a></td>');
document.writeln(' 		<td height="1" bgcolor="'+colorSiemens+'"><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="340"></td>');
document.writeln(' 		<td bgcolor="'+colorSiemens+'"><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="144"></td>');
document.writeln(' 		<td bgcolor="'+colorSiemens+'" width="100%"><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="1"></td>');
document.writeln(' 	</tr>');
document.writeln(' 	<tr>');
document.writeln(' 		<td height="53" colspan=2 bgcolor="'+colorSiemens+'" align="center" valign="bottom">');
//document.writeln('<!-- gk: table für employee portal...');
//document.writeln('			<table border="0" cellspacing="0" cellpadding="0">');
//document.writeln('				<tr>');
//document.writeln('					<td><img src="'+toolboxLocation+'images/ocd_white.gif" width="1" height="10" alt="" border="0"></td>');
//document.writeln('					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="4" height="1" alt="" border="0"></td>');
//document.writeln('					<td><a href=""><span class="ocdmenuwhite">Employee Portal</span></a></td>');
//document.writeln('					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="24" height="1" alt="" border="0"></td>');
//document.writeln('				</tr>');
//document.writeln('				<tr><td colspan="4"><img src="'+toolboxLocation+'images/ocd_blank.gif" width="1" height="2" alt="" border="0"></td></tr>');
//document.writeln('			</table>');
//document.writeln('-->');

// zusammengezogen, wegen länge der gennavi
//document.writeln(' 		</td>');
//document.writeln(' 		<td bgcolor="'+colorSiemens+'" valign="bottom" >');

document.writeln('			<table border="0" cellspacing="0" cellpadding="0">');
document.writeln('				<tr><td></td></tr>');
document.writeln('				<tr><td></td></tr>');
document.writeln('				<tr>');
for (i=1;i<genericLinks.length - 1;i++){
if (initialPageLanguage!="" ||  !(/(english|deutsch)/i.test(genericText[i]))) {
// beim ersten kein leerraum davor:
if(i>1){
  document.writeln('					<td></td>');
}
  document.writeln('					<td></td>');
  document.writeln('					<td></td>');
  document.writeln('					<td></td>');
  }
} // for (...
document.writeln('				</tr>');
document.writeln('				<tr><td colspan="'+numberOfGenNavi+'"><img src="'+toolboxLocation+'images/ocd_blank.gif" width="1" height="2" alt="" border="0"></td></tr>');
document.writeln('			</table>');
document.writeln(' 		</td>');
document.writeln(' 		<!-- This is an expanding area, do not use. -->');
document.writeln(' 		<td width="*" bgcolor="'+colorSiemens+'">&nbsp;</td>');
document.writeln(' 	</tr><!-- 	Second Row middle, right Box Left (90x144), Logo Area (45x*) -->');
document.writeln(' 	<tr> ');
document.writeln(' 		<!-- Standard Navigation. -->');
document.writeln(' 		<td height="36" bgcolor="'+colorStandard+'" valign="top" colspan="2">');
document.writeln('		');
// Search Box SRE

document.writeln(' 			<table border="0" cellspacing="0" cellpadding="0" width=100%>');
document.writeln(' 				<tr><td colspan="4" align=right width=100%><img src="'+toolboxLocation+'images/ocd_blank.gif" width="1" height="6" alt="" border="0"></td>');
document.writeln('</td></tr>');
document.writeln(' 				<tr>');
document.writeln(' 					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="18" height="1" alt="" border="0"></td>');
document.writeln('					<td><nobr>&nbsp;');

for (i=0;i<standardLinks.length - 1;i++){
document.writeln('						<img src="'+toolboxLocation+'images/ocd_'+colorPGNaviFont+'.gif" width="1" height="10" alt="" border="0">');
document.writeln(' 						<img src="'+toolboxLocation+'images/ocd_blank.gif" width="2" height="1" alt="" border="0">');
document.writeln(' 						<a href='+standardLinks[i]+' target="_top"><span class="pgnavi'+colorPGNaviFont+'">'+standardText[i]+'</span></a>');
document.writeln(' 						<img src="'+toolboxLocation+'images/ocd_blank.gif" width="4" height="1" alt="" border="0">');
}

document.writeln('					</nobr></td>');
document.writeln('<td valign="middle" align="right" width=33 ><nowrap>');  // width so klein wie möglich
document.writeln('                                              </td>');

document.writeln(' 				</tr>');
document.writeln(' 			</table>');
document.writeln(' <!-- gk: bis hierher fix im header -------------->');
document.writeln(' 		<!-- Search box. -->');
document.writeln('		</td><td colspan="2" bgcolor="'+colorRightFromSearch+'" nowrap  align=left>');
if (languageOfThisPage=="d"){
	document.writeln('');
}else{
	document.writeln('');
}
document.writeln('');
document.writeln('')
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');
document.writeln('');


document.writeln('</td>');
document.writeln(' </tr>');
document.writeln('<!-- gk: Tabellen zu einer zusammenfügen  </table> -->');
document.writeln(' <!-- gk: bis hierher alles in startBody packen , Achtung: hier müssen die Tabellen zusammengebaut werden! ---------------->');
document.writeln('');


return;
} //function startbody


function endBody(){
//=======================
if(toolboxTest){
	document.writeln('<p align="right"><hr width="100%"><font face="arial"><small><small> &nbsp;&nbsp;&nbsp;Testversion: '+toolboxVersion+'. Contact: Gudrun Kaiser, OI43</small></small></font>');
}
document.writeln('</body>');
document.writeln('</html>');
  return;
}


function startPrimNavi(colorTypePara){
//===========================

//falls in startBody keine Farbe gesetzt ist:
if(noColorType){
	setColors(colorTypePara)
	noColorType=false
}

//<!---------- ausgabe ---------------------->
document.writeln(' <!-- 	Here we start the Table which Contains the main page.-->');
document.writeln(' <!-- 	It was useful necessary to separate the page into two table, to -->');
document.writeln(' <!-- 	enable Netscape to Process and display the Page header whilst -->');
document.writeln(' <!-- 	loading and processing the main body.-->');
document.writeln(' ');
document.writeln('<!-- gk: startPrimNavi ... --------------------------------->');
document.writeln('<!-- gk: Tabellen zu einer zusammenfügen  <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> -->');
document.writeln(' ');
document.writeln(' <!-- Row 1 -->');
document.writeln(' 	<tr align="left" valign="top">');
document.writeln(' 		<!-- Column 1 -->');
document.writeln(' 		<!-- gk: hier ist der HOME-Button ---------------------------->');

if(homeLinkUsed){
	document.writeln(' 		<td height="54" background="'+toolboxLocation+'images/logokleinneu.jpg" align=center valign=middle>&nbsp;</td>');
}else{
	document.writeln(' 		<td height="54" bgcolor="'+colorHome+'"><img src="'+toolboxLocation+'images/ocd_blank.gif" height="54" width="144"></td>');
}


document.writeln(' 		<!-- Column 2 -->');
if(secInfo){cols="2"}else{cols="3"}
document.writeln(' 		<!-- gk: hier colspan=2, damits zu der oberen table passt, + 2, wenn secinfo nicht gebraucht wird ---------------------------->');
document.writeln(' 		<td bgcolor="'+colorPrimnavi+'" colspan='+cols+'>');
document.writeln(' 			<table border="0" cellspacing="0" cellpadding="0">');
document.writeln(' 				<tr><td colspan="2"><img src="'+toolboxLocation+'images/ocd_blank.gif" width="1" height="6" alt="" border="0"></td></tr>');
document.writeln(' 				<tr>');
document.writeln(' 					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="18" height="1" alt="" border="0"></td>');
document.writeln('');
return;
}//endfunc startPrimNavi

function selectedPrimNavi(selection){
//===============================
// merkt sich, welche Zeile markiert werden soll
// selection = dieser Text wird dann markiert bei writeSekNavi
primNaviSelectedText=selection;
document.writeln('<!--primnavi:'+selection+'-->');
return;
}//endfunc

function writePrimNavi(text,linktext){
//===================
// muss als tabellenfelder gemacht werden, sonst klappt das mit dem abstand untereinander nicht ordentlich
if (linktext=="" || linktext == "undefined" || linktext == null || linktext == " ") linktext = "javascript:void(0)";
linktext=setPrePath(linktext,primNaviPrepath);
var text='<nobr>'+text+'</nobr>';

<!------ ausgabe -------------->
document.writeln(' 					<td valign="top" width=5>');
document.writeln(' 						<img src="'+toolboxLocation+'images/ocd_'+colorPrimnaviFont+'.gif" width="1" height="10" alt="" border="0">');
document.writeln(' 					</td>');
document.writeln(' 					<td valign="top" width=2>');
document.writeln(' 						<img src="'+toolboxLocation+'images/ocd_blank.gif" width="5" height="1" alt="" border="0">');
document.writeln(' 					</td>');
document.writeln(' 					<td valign="top"><nobr>');
if (text=='<nobr>'+primNaviSelectedText+'</nobr>'){
	document.writeln(' 						<a href='+linktext+'><span class="primnaviselected'+colorPrimnaviFont+'">'+text+'</span></a>');
}else{
	document.writeln(' 						<a href='+linktext+'><span class="primnavi'+colorPrimnaviFont+'">'+text+'</span></a>');
}
document.writeln(' 					</nobr></td>');
document.writeln(' 					<td valign="top" width=5>');
document.writeln(' 						<img src="'+toolboxLocation+'images/ocd_blank.gif" width="5" height="1" alt="" border="0">');
document.writeln(' 					</td>');
return;
} //endfunc writePrimNavi



function endPrimNavi(){
//===================

<!----------------- ausgabe -------------------->


document.writeln('						<!-- gk: endPrimNavi ... ------------------------------------>');
document.writeln(' 				</tr>');
document.writeln(' 			</table>');
document.writeln(' 		</td>');
document.writeln(' 		<!-- Column 3 -->');
if(secInfo){
	document.writeln(' 		<!-- gk: col 3 und col 4 fallen weg, wenn secinfo nicht gebraucht wird -- nö, bloss col 3 fällt weg!---------------------------->');
	document.writeln(' 		<!-- Column 3+4 -->');
	if (languageOfThisPage=="d"){
				document.writeln('<td colspan=2 width="100%" bgcolor="'+colorRightFromPrimnavi+'"><a href="http://www.med-archiv.de/shop/bestellung.php?action=change"><div style="text-decoration: none;"><font face="Arial" size="2" color="#ffffff">&nbsp;&nbsp;&nbsp;Online-SHOP</font></div></a></td>');
	} else {document.writeln(' 		<td colspan=2 width="100%" bgcolor="'+colorRightFromPrimnavi+'" valign=middle><a href="http://www.med-archiv.de/shop/bestellung.php?action=change"><div style="text-decoration: none;"><font face="Arial" size="2" color="#ffffff">&nbsp;&nbsp;&nbsp;Online-SHOP</font></div></a></td>');
			}
}else{
	document.writeln(' 		<!-- Column 4 -->');
	if (languageOfThisPage=="d"){
		document.writeln(' 		<td width="100%" bgcolor="'+colorRightFromPrimnavi+'" valign=middle>&nbsp;</td>');
		}
	else {document.writeln(' 		<td width="100%" bgcolor="'+colorRightFromPrimnavi+'" valign=middle>&nbsp;</td>');
		}
}
document.writeln(' 	</tr>');

return;
}//endfunc

function writeSekNavi(text,link,level,chapterMarker) {
//==============================
var nolink = false;
link=setPrePath(link,sekNaviPrepath);

// viele verwenden ein <hr> als vertikalen abstand, das wird dann im else-zweig behandelt, es darf dann
// nämlich kein pfeil davor stehen

if (slide=="slide"||slide=="SLIDE"){
	document.writeln('<!--Specific Settings-->');
	//levels auftrennen
		if(level.indexOf("-") == -1){  //main
			if (link!="") {
				//direktlink
				countMain=countMain+1;
				document.writeln('<param name="maindesc'+level+'" value="1|'+text+'">\n');
				document.writeln('<param name="mdesturl'+level+'" value="'+link+'">\n');
			}else{
				document.writeln('<param name="maindesc'+level+'" value="0|'+text+'">\n');
			} //endif (link!="")
		}else{ // unterer level
			if (link!="") {
				//direktlink
				document.writeln('<param name="desc'+level+'" value="1|'+text+'">\n');
				document.writeln('<param name="desturl'+level+'" value="'+link+'">\n');
			}else{
				document.writeln('<param name="desc'+level+'" value="0|'+text+'">\n');
			} //endif (link!="")						}
		} //endif(level.indexOf("-") == -1) - mehrstufiger level


}else{

if(text != '<hr>' && text != '<hr> ' && text != ' ' && text != '&nbsp;'  && text != '' ){

	// wenn kein link angegeben ist, darf auch nix passieren
	if (link=="" || link == "undefined" || link == null || link == " ") {
		link = "javascript:void(0)";  // kein Link -> es passiert nix
	}
	if (link=="x" || link == "X" ) {
		nolink=true; // kein Pfeil, bloss überschrift
	}

	sekNaviItems = "x";

	if(chapterMarker == ""||chapterMarker == "undefined"||chapterMarker == null){
		document.writeln('							<tr>');
		if(text==sekNaviSelectedText){
			document.writeln('								<td valign="middle"><a href='+link+'><img src="'+toolboxLocation+'images/ocd_link1_r_'+colorSeknaviFont+'_selected.gif" width="9" height="7" alt="" border="0"></a></td>');
			document.writeln('								<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="4" height="1" alt="" border="0"></td>');
			document.writeln('								<td valign="middle" colspan=3><a href='+link+'><span class="seknaviselected'+colorSeknaviFont+'">'+text+'</span></a><br><img src="'+toolboxLocation+'images/srcLine.gif" width="105" height="1" border="0"></td>');
		}else{
			// mit oder ohne Pfeil
			if(nolink){
			//	document.writeln('								<td valign="middle"><img src="'+toolboxLocation+'images/ocd_blank.gif" width="9" height="7" alt="" border="0"></td>');
			//	document.writeln('								<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="4" height="1" alt="" border="0"></td>');
				document.writeln('								<td valign="middle" colspan=5><span class="seknavi'+colorSeknaviFont+'">'+text+'</span><br><img src="'+toolboxLocation+'images/srcLine.gif" width="105" height="1" border="0"></td></tr><tr><td colspan=7 color=white height=2></td>');
			}else{
				document.writeln('								<td valign="middle"><a href='+link+'><img src="'+toolboxLocation+'images/ocd_link1_r_'+colorSeknaviFont+'.gif" width="9" height="7" alt="" border="0"></a></td>');
				document.writeln('								<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="4" height="1" alt="" border="0"></td>');
				document.writeln('								<td valign="middle" colspan=3><a href='+link+' onMouseOver="toBold(this)" onMouseOut="toNormal(this)" ><span class="seknavi'+colorSeknaviFont+'">'+text+'</span></a><br><img src="'+toolboxLocation+'images/srcLine.gif" width="105" height="1" border="0"></td>');
			}
		}
		document.writeln('							</tr>');
		document.writeln('							<tr><td colspan=3><img src="'+toolboxLocation+'images/ocd_blank.gif" width="1" height="3" alt="" border="0"></td></tr>');
	}else{
		if(chapterMarker == selectedChapter){
			document.writeln('							<tr>');
			document.writeln('								<td valign="middle"></td>');
			document.writeln('								<td valign="middle"></td>');
			if(text==sekNaviSelectedText){
				document.writeln('								<td valign="middle"><a href='+link+' ><img src="'+toolboxLocation+'images/ocd_link1_r_'+colorSeknaviFont+'_selected.gif" width="9" height="7" alt="" border="0"></a></td>');
				document.writeln('								<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="4" height="1" alt="" border="0"></td>');
				document.writeln('								<td valign="middle" ><a href='+link+'><span class="seknaviselected'+colorSeknaviFont+'">'+text+'</span></a><br><img src="'+toolboxLocation+'images/srcLine.gif" width="105" height="1" border="0"></td>');
			}else{
				// mit oder ohne Pfeil
				if(nolink){
				//	document.writeln('								<td valign="middle"><img src="'+toolboxLocation+'images/ocd_blank.gif" width="9" height="7" alt="" border="0"></td>');
				//	document.writeln('								<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="4" height="1" alt="" border="0"></td>');
					document.writeln('								<td valign="middle" colspan=3><span class="seknavi'+colorSeknaviFont+'">'+text+'</span><br><img src="'+toolboxLocation+'images/srcLine.gif" width="105" height="1" border="0"></td>');
				}else{
					document.writeln('								<td valign="middle"><a href='+link+' ><img src="'+toolboxLocation+'images/ocd_link1_r_'+colorSeknaviFont+'.gif" width="9" height="7" alt="" border="0"></a></td>');
					document.writeln('								<td><img src="'+toolboxLocation+'images/ocd_blank.gif" width="4" height="1" alt="" border="0"></td>');
					document.writeln('								<td valign="middle" ><a href='+link+' onMouseOver="toBold(this)" onMouseOut="toNormal(this)" ><span class="seknavi'+colorSeknaviFont+'">'+text+'</span></a><br><img src="'+toolboxLocation+'images/srcLine.gif" width="105" height="1" border="0"></td>');
				}
			}
			document.writeln('							</tr>');
			document.writeln('							<tr><td colspan=3><img src="'+toolboxLocation+'images/ocd_blank.gif" width="1" height="3" alt="" border="0"></td></tr>');
		}
	}
}else{
	document.writeln('							<tr>');
	document.writeln('								<td valign="middle" colspan=5>'+text+'</td>');
	document.writeln('							</tr>');
	document.writeln('							<tr><td colspan=3><img src="'+toolboxLocation+'images/ocd_blank.gif" width="1" height="3" alt="" border="0"></td></tr>');

}
}

return;
} //endfunc


function selectedSekNavi(selection,selChapter){
//===============================
// merkt sich, welche Zeile markiert werden soll
// selection = dieser Text wird dann markiert bei writeSekNavi
// selChapter = alle Seknavi-Items mit dieser Marke werden ausgegeben
sekNaviSelectedText=selection;
selectedChapter=selChapter;
document.writeln('<!--seknavi:'+selection+selChapter+'-->');
return;
}//endfunc

function setNaviPrePath(prim, sek) {
//	alert(prim+":"+sek+":");
//	if(sek=="undefined") alert("undefined steht drin");
  if ( typeof prim == "string" ) primNaviPrepath=prim;
  if ( typeof sek == "string" )  sekNaviPrepath=sek;
}
function startSekNavi(setSlide,barImage,dummy1,dummy2,topoffset,mheight,mfont) {
//=====================

//set global variable
sekNaviUsed = true;

document.writeln(' 	<!-- Row 2 -->	');
document.writeln(' 	<!-- gk: startSekNavi ... ---------------------------------------->');
document.writeln(' 	<tr>');
document.writeln(' 		<!-- Column 1 -->');
document.writeln(' 		<td height="100%" bgcolor="'+colorSeknavi+'" valign="top">');
document.writeln(' 		<!-- Content Table, Creates a 4x9 Pixel Border for the content -->');
document.writeln(' 			<table border="0" cellspacing="0" cellpadding="0">');
document.writeln(' 				<!-- spacer -->');
document.writeln(' 				<tr>');
document.writeln(' 					<td colspan="2"><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="18" width="1"></td>');
document.writeln(' 				</tr>');
document.writeln(' 				<tr>');
document.writeln(' 					<!-- spacer -->');
document.writeln(' 					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="4"></td>');
document.writeln(' 					<!-- Content -->');
document.writeln(' <!--  #############   Begin Left hand Secondary Navigation  -->');
document.writeln(' 					<td valign="top">');
if (setSlide=="slide"||setSlide=="SLIDE"){
	barColor='0';
	selectedColor=colorSeknavi;
	slide="slide"
	if (topoffset==""||topoffset=="undefined"||topoffset==null) topoffset="10";
	if (mheight==""||mheight=="undefined"||mheight==null) mheight="16";
	if (mfont==""||mfont=="undefined"||mfont==null) mfont="12";

	document.writeln('			<TD BGCOLOR="'+colorSeknavi+'" WIDTH="133">\n');
	document.writeln('<!--Applet Tag starts below this line-->\n');
	document.writeln('<applet code="slidem" codebase="'+toolboxLocation+'" align="baseline" height="400" width="133">\n');
	document.writeln('<!--TAG GENERATOR: OpenCube - Applet Composer, (www.opencube.com)-->\n');

	document.writeln('<!--OpenCube Copyright Notice Parameter-->\n');
	document.writeln('<param name="Notice" value="Sliding Tree Menu, Copyright (c) 1998, OpenCube Inc.">\n');

	document.writeln('<!--General / Default Settings-->\n');

	document.writeln('<param name="bgcolor" value="'+colorSeknavi+'">\n');
	document.writeln('<param name="onsbtext" value="Corporate Design Toolbox">\n');
	document.writeln('<param name="offsbtext" value="Corporate Design Toolbox">\n');
	document.writeln('<param name="mbgfile" value="'+toolboxLocation+'images/seknavibar_'+barColor+'.gif">\n');
	document.writeln('<param name="mbgonmenusonly" value="false">\n');
	document.writeln('<param name="mtilebg" value="false">\n');
	document.writeln('<param name="mheight" value="'+mheight+'">\n');
	document.writeln('<param name="topoffset" value="'+topoffset+'">\n');
	document.writeln('<param name="mindent" value="12">\n');
	document.writeln('<param name="mfont" value="Arial, plain, '+mfont+'">\n');
	if (colorType == 'supplier'){
		document.writeln('<param name="mtextcolor" value="0,0,0">\n');
		document.writeln('<param name="mhltextcolor" value="0,0,0">\n');
		document.writeln('<param name="muhltextcolor" value="0,0,0">\n');
	}else{
		document.writeln('<param name="mtextcolor" value="255,255,255">\n');
		document.writeln('<param name="mhltextcolor" value="255,255,255">\n');
		document.writeln('<param name="muhltextcolor" value="255,255,255">\n');
	}
	document.writeln('<param name="mhlbgcolor" value="'+selectedColor+'">\n');


	document.writeln('<param name="muhlbgcolor" value="'+selectedColor+'">\n');
	document.writeln('<param name="subheight" value="16">\n');
	document.writeln('<param name="subindent" value="10">\n');
	document.writeln('<param name="subiconindent" value="-2">\n');
	document.writeln('<param name="subfont" value="Helvetica, PLAIN, 12">\n');
//	document.writeln('<param name="s_bgfile" value="images/level2.jpg">\n');
	document.writeln('<param name="s_color" value="'+colorSeknavi+'">\n');
	document.writeln('<param name="s_hlcolor" value="'+selectedColor+'">\n');
	if (colorType == 'supplier'){
		document.writeln('<param name="s_textcolor" value="0,0,0">\n');
		document.writeln('<param name="s_hltextcolor" value="0,0,0">\n');
		document.writeln('<param name="s_uhltextcolor" value="0,0,0">\n');
	}else{
		document.writeln('<param name="s_textcolor" value="255,255,255">\n');
		document.writeln('<param name="s_hltextcolor" value="255,255,255">\n');
		document.writeln('<param name="s_uhltextcolor" value="255,255,255">\n');
	}

	document.writeln('<param name="s_uhlcolor" value="'+selectedColor+'">\n');
	document.writeln('<param name="hlsubtextonly" value="false">\n');
	document.writeln('<param name="jumpsize" value="2">\n');
	document.writeln('<param name="rfromoff" value="true">\n');
	document.writeln('<param name="loadwhere" value="_self">\n');

}else{

	document.writeln(' 						<table border="0" cellspacing="0" cellpadding="1">');
}
return;
} //endfunc

function endSekNavi(Titeltext,Color) {
//============================
if(slide=="slide"||slide=="SLIDE"){
	document.writeln('<!--end Settings-->');
//	document.writeln('<param name="s_bgfile0" value="'+toolboxLocation+'images/level2.jpg">');
	document.writeln('<param name="s_hlcolor0" value="'+selectedColor+'">');
	document.writeln('<param name="s_hltextcolor0" value="255,255,255">');
	document.writeln('<param name="iconfile0" value="'+toolboxLocation+'images/icon0.gif">');
	document.writeln('<param name="iconswitchfile0" value="'+toolboxLocation+'images/down.gif">');
	document.writeln('<param name="iconclickfile0" value="'+toolboxLocation+'images/up.gif">');
	document.writeln('<param name="iconfile1" value="'+toolboxLocation+'images/icon0.gif">');
	document.writeln('<param name="iconswitchfile1" value="'+toolboxLocation+'images/enter.gif">');
	document.writeln('<param name="iconclickfile1" value="'+toolboxLocation+'images/up.gif">');
	document.writeln('<param name="iconfile2" value="'+toolboxLocation+'images/icon0.gif">');
	document.writeln('<param name="iconswitchfile2" value="'+toolboxLocation+'images/enter.gif">');
	document.writeln('<param name="iconclickfile2" value="'+toolboxLocation+'images/up.gif">');
	document.writeln('<param name="iconfile3" value="'+toolboxLocation+'images/icon0.gif">');
	document.writeln('<param name="iconswitchfile3" value="'+toolboxLocation+'images/enter.gif">');
	document.writeln('<param name="iconclickfile3" value="'+toolboxLocation+'images/up.gif">');
	document.writeln('</applet>');
	document.writeln('<!--Applet Tag ends above this line-->');

}else{
	document.writeln(' 							<!-- gk: endSekNavi ... ------------------------------------->');
	document.writeln(' 						</table>');
}
	document.writeln(' 					</td>');
	document.writeln(' <!--  End Left hand Secondary Navigation  #############   -->');
	document.writeln(' 					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="4"></td>');
	document.writeln(' 				</tr>');
	document.writeln(' 			</table>');
document.writeln(' 		</td>');

// will be used in endSecInfo ....
sekNaviEndColor=colorSeknaviFont;
if(Titeltext != '' && Titeltext != 'undefined' && Titeltext != null){sekNaviEndText=Titeltext}

return;
}


function startHtmlContent(abstand_links,balken_text){
//==========================

// if there is no secondary navigation: automatically create an empty secondary navigation for layout reasons
if(!sekNaviUsed){
	startSekNavi();
	endSekNavi("");
}

abstand_oben=24;
// abstand_links == undefined -> abstand content von links und oben wird standardmaessig eingestellt
// sonst oben und links gleicher wert (wird aber nicht gleich dargestellt!)
if(abstand_links == "" || abstand_links == "undefined" || abstand_links == null){
	abstand_links=18;
}

document.writeln('		<!-- Column 2 -->');
// colspan=2 wegen anpassung an obere tabelle
if(secInfo){
	mainCols="2"
	mainWidth="468"
}else{
	mainCols="3"
	mainWidth="700"
}
document.writeln(' 		<!-- gk: startHtmlContent ... ---------------------------------------->');
document.writeln(' 		<!-- Column 2 -->');
document.writeln(' 		');
document.writeln(' 		<!-- gk: hier colspan=2 damits zu der oberen table passt,  +1 wenn secinfo nicht genutzt wird -->');

// weisser Hintergrund -> transparent, damit die Hintergrundbilder funktionieren
if(colorMain != '#ffffff' && colorMain != '#FFFFFF'){
	document.writeln(' 		<td bgcolor="'+colorMain+'" colspan='+mainCols+' valign="top">');
}else{
	document.writeln(' 		<td colspan='+mainCols+' valign="top">');
}

if(balken_text != "" && balken_text != "undefined" && balken_text != null){
	document.writeln('<table width=100%><tr><td align=right class=ocdmenublackselected>'+balken_text+'</td></tr></table>');
}

document.writeln(' 			<table border="0" cellspacing="0" cellpadding="0" width="'+mainWidth+'">');

// erste spalte/zeile für den abstand
if(abstand_links != "0"){
	document.writeln(' 				<tr>');
	document.writeln(' 					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="'+abstand_oben+'" width="'+abstand_links+'"></td>');
	document.writeln(' 					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="'+abstand_oben+'" width="432"></td>');
// dies wäre ein rechter rand!
//	document.writeln(' 					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="'+abstand_oben+'" width="18"></td>');
	document.writeln(' 				</tr>');
}

document.writeln(' 				<tr>');

//erste spalte für den abstand
if(abstand_links != "0"){
	document.writeln(' 					<td>&nbsp;</td>');
}

document.writeln(' 					<!-- Content -->');
document.writeln(' <!--  #############  Begin Main Content Area  -->');
// achtung, colspan, da sonst rechts ein rand bleibt!
document.writeln(' 					<td >');

return;
}



      function endHtmlContent(vorname,name,bereich,datum,jahr,mail){
   //=======================


   document.writeln(' 					</td>');
   document.writeln(' <!--  End Main Content Area #############   -->');
// deleted (hspace on right side)
//   document.writeln(' 					<td>&nbsp;</td>');
   document.writeln(' 				</tr>');
// colspan=2 weil wir die dritte spalte (rechter rand) rausgenommen haben
   document.writeln(' 				<tr><td colspan="2"><img src="'+toolboxLocation+'images/ocd_blank.gif" height="18" width="1"></td></tr>');
   document.writeln(' 			</table>');
   document.writeln(' 		</td>');

   if(!secInfo){
   	startSecInfo();
   	endSecInfo(vorname,name,bereich,datum,jahr,mail);
   }
   return;
   } // endfunc

   function startSecInfo(){
   //======================
   document.writeln(' 		<!-- column 3 -->');
document.writeln(' 		<!-- gk: startSecinfo  .... ---------------------->');
if(secInfo){
	document.writeln(' 		<!-- gk: if (secinfo) ... -->');
	document.writeln(' 		<td bgcolor="'+colorSecinfo+'" valign="top">');
	document.writeln(' 			<table width="100%" border="0" cellspacing="0" cellpadding="0">');
	document.writeln(' 				<tr>');
	document.writeln(' 					<td colspan="2"><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="4" width="11"></td>');
	document.writeln(' 				</tr>');
	document.writeln(' 				<tr>  ');
	document.writeln(' 					<td><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="9"></td>');
	document.writeln(' 					<!-- Content for right-hand secondary information -->');
	document.writeln(' <!--   #############   Begin Left hand Secondary Information  -->');
	document.writeln(' 					<td>');
}
return;
} // endfunc

//	document.writeln('						Secondary Information');

function endSecInfo(vorname,name,bereich,datum,jahr,mail){
//====================
var datenschutz='<a href=http://www.siemens.com/page/1,3771,223880-1-999_0_0-0,00.html class=footer>Privacy Policy</a>'
if(languageOfThisPage=='d'){
	datenschutz=''
}else{
	datenschutz='<a href=http://www.siemens.com/page/1,3771,223880-1-999_0_0-0,00.html class=footer>Privacy Policy</a>'
}

if (jahr == "oi43logo") jahr="<a href='' target='_blank'><img src='"+toolboxLocation+"logo.gif' border=0 width=67 height=19 align=right></a>";
// kompletter SCD-Aufruf oder irgendein Link (mit http://), das mit dem Bereich (else-Zweig) ist nur noch Altlast
if (bereich==""||bereich==" "||bereich=="undefined"||bereich==null){
	contact="javascript:void(0)";
} else if (bereich.indexOf("http://")!= -1 ){
	contact=bereich;
} else if (bereich.indexOf("mailto:")!= -1  ){
	contact=bereich;
} else if (bereich.indexOf("/common/")!= -1  ){
	contact=bereich;
} else if (bereich.indexOf("/common_local/")!= -1  ){
	contact=bereich;
}else{
	contact="http://scd.siemens.de/cgi-bin/db4web_c/scd/personen.d4w?lang=de&sn="+name+"&gn="+vorname+"&cn=&o=SIEMENS&ou="+bereich+"&c=DE&l=ERL+S+F&dep=&suchart=detail&ver=v2 target=_blank";
	//contact=SCDLinkFooterDe+"cgi-bin/DirXscd.tcl/C=DE/O=SIEMENS/OU="+bereich+"/L=ERL+S+F/CN="+name+"+"+vorname+"/Lang=de target=_blank";
} //endif scd


// allgemeines Datumformat

if (datum.indexOf(".") != -1 && datum.length<11){
	ersterPunkt=datum.indexOf(".");
	zweiterPunkt=datum.indexOf(".",ersterPunkt+1) ;

	anfangMM=zweiterPunkt-1;
	charCode=datum.charCodeAt(anfangMM-1);
	while (charCode>47&&charCode<59) {
		anfangMM=anfangMM-1;
		charCode=datum.charCodeAt(anfangMM-1);
	}
	MM=datum.substring(anfangMM,zweiterPunkt);

	anfangTT=ersterPunkt-1;
	charCode=datum.charCodeAt(anfangTT-1);
	while (charCode>47&&charCode<59) {
		anfangTT=anfangTT-1;
		charCode=datum.charCodeAt(anfangTT-1);
	}
	TT=datum.substring(anfangTT,ersterPunkt);

	endeYY=zweiterPunkt+1;
	charCode=datum.charCodeAt(endeYY+1)
	while (charCode>47&&charCode<59) {
		endeYY=endeYY+1;
		charCode=datum.charCodeAt(endeYY+1);
	}
	YY=datum.substring(zweiterPunkt+1,endeYY+1);

	//auffüllen
	if (TT.length==1) TT="0"+TT;
	if (MM.length==1) MM="0"+MM;

	// z.B. 9 -> 2009
	if (YY.length==1) YY="200"+YY;

	//z.B. 07 -> 2007
	if (YY.length==2 && YY.substring(0,1) == "0") YY="20"+YY;

	// z.B. 81 -> Fehlermeldung
	//if (YY.length==2 && YY.substring(0,1) != "9") alert("Achtung, Fehler in der Seitenprogrammierung. \nBitte Jahreszahl für Seitenfuss 4stellig eingeben!\n\nBitte senden Sie dem Seitenverantwortlichen (siehe Seitenfuss) \neine kurze Mail über diese Fehlermeldung; Danke!");

	// z.B. 95 -> 1995
	if (YY.length==2 && YY.substring(0,1) == "9") YY="19"+YY;;

	if (YY.length>3&&MM.length>1&&TT.length>1){
		datumneu=YY+"-"
		+MM+"-"
		+TT;
		datum=datum.substring(0,anfangTT)+datumneu+datum.substring(endeYY+1,datum.length+1);
	}
} // endif datum

if (secInfo){
	document.writeln(' 					</td>');
	document.writeln(' <!--   End Left hand Secondary Information  #############   -->');
	document.writeln(' 				<td bgcolor="'+colorSecinfo+'">&nbsp;</td>');
	document.writeln(' 				</tr>');
	document.writeln(' 			</table>  ');
	document.writeln(' 		</td>');
}
	document.writeln(' 		<!-- gk: dieses feld hat gefehlt?! -->');
	document.writeln(' 		<td bgcolor="'+colorSecinfo+'">&nbsp;</td>');
	document.writeln(' 		<!-- gk: endif secinfo  -->');


document.writeln(' 	</tr>');
document.writeln(' 	');
document.writeln(' 	<!-- Row 3 -->');
document.writeln(' 	');
document.writeln(' 	<tr align="center" valign="bottom"> ');

// footer of seknavi
document.writeln(' 		<td height="36" bgcolor="'+colorSeknavi+'"><span class=seknavi><b><font color='+sekNaviEndColor+'>'+sekNaviEndText+'</font><b><br>&nbsp;</td>');

document.writeln(' <!--   #############   Begin Footer  -->');
if(secInfo){cols="2"}else{cols="3"}
document.writeln(' 		<!-- gk: colspan=2 damits zu der oberen table passt,  +1 wenn kein secinfo -->');
if(secInfo){
	// vorn ein Abstand, wenn align=left=no secinfo, daher die zwei varianten an dieser stelle
	document.writeln(' 		<td bgcolor="'+colorMain+'" align="center" colspan='+cols+'>');
	document.writeln(' 		<table width="432" border="0" cellpadding="0" cellspacing="0">');
	document.writeln(' 			<tr><td colspan="5" align="right"><a href="#top"><span class=ocdmenublackselected>up&nbsp;</span><img src="'+toolboxLocation+'images/ocd_pageup.gif" width="13" height="9" border="0"></a></td></tr>');

// smileys???
	if(mail){
		document.writeln(' 			<tr><td colspan=5 align=right>');
// auskommentiert, da hier nicht implementiert
//		createSmiley(mail);
		document.writeln(' 			</tr>');
	}
}else{

	// weisser Hintergrund -> transparent, damit die Hintergrundbilder funktionieren
	if(colorMain != '#ffffff' && colorMain != '#FFFFFF'){
		document.writeln(' 		<td bgcolor="'+colorMain+'" align="left" colspan='+cols+'>');
	}else{
		document.writeln(' 		<td align="left" colspan='+cols+'>');
	}
		document.writeln(' 		<table width="95%" border="0" cellpadding="0" cellspacing="0">');
	document.writeln(' 			<tr><td rowspan=6 >&nbsp;&nbsp;&nbsp;</td><td colspan="7" align="right"><a href="#top"><span  class=ocdmenublackselected>up&nbsp;</span><img src="'+toolboxLocation+'images/ocd_pageup.gif" width="13" height="9" border="0"></a></td></tr>');

// smileys???
	if(mail){
		document.writeln(' 			<tr><td colspan=8 align=right>');
		createSmiley(mail);
		document.writeln(' 			</tr>');
	}

}
document.writeln(' 			<tr><td colspan="7"><img src="'+toolboxLocation+'images/ocd_blank.gif" height="4" width="432"></td></tr>');
document.writeln(' 			<tr>');
document.writeln(' 				<td colspan="7">&nbsp;&nbsp;&nbsp;<a href="http://www.siemens.com/about/de/footer/impressum.htm"><img src="'+toolboxLocation+'images/link_impressum.gif" border=0 alt="Regionales Impressum"></a>&nbsp;&nbsp;<a href="http://www.siemens.com/about/de/footer/datenschutz.htm"><img src="'+toolboxLocation+'images/link_datenschutz.gif" border=0 alt="Datenschutzbestimmungen"></a>&nbsp;&nbsp;<a href="http://www.siemens.com/about/de/footer/nutzungsbedingungen.htm"><img src="'+toolboxLocation+'images/link_nutzung.gif" border=0 alt="Nutzungsbedingungen"></a>&nbsp;&nbsp;<a href="http://www.siemens.com/about/de/footer/digital_id.htm"><img src="'+toolboxLocation+'images/link_digital-ID.gif" border=0 alt="Digital-ID"></a></td></tr>');
document.writeln(' 			<tr><td colspan="7"><img src="'+toolboxLocation+'images/ocd_blank.gif" height="4" width="432"></td></tr>')
document.writeln(' 			<tr>');
document.writeln('				<td valign=top></td>');


if(typeOfThisPage == 'ls3' || typeOfThisPage == 'LS3' ){
document.writeln('		<td><span class="footer"></span></td>');}else{
document.writeln('		<td valign=top><span class="footer">&nbsp;&nbsp;&nbsp;&nbsp;'+datum+'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Siemens &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="'+contact+'" target="_blank" class="footer">Verantwortlich: '+vorname+' '+name+'</a><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ref Erlangen</span></td>');

		
}




// kein platz für toolbox.gif, wenn secinfo dabei ist
if (secInfo){
	document.writeln('				<td width=* align=right colspan=2></td>');
}else{
	document.writeln('				<td width=* align=right></td>');
	document.writeln('				<td align=right><a href=http://www.pg.erl.siemens.de/common/toolbox/de target=_blank><img border=0 src='+toolboxLocation+'distance.gif width="10" height="10" alt="'+toolboxVersion+'"></a></td>');
}

document.writeln(' 			</tr>');
document.writeln(' 			<tr><td colspan="7"><img src="'+toolboxLocation+'images/ocd_blank.gif" height="18" width="432"></td></tr>');
document.writeln(' 		</table>');
document.writeln(' 		</td>');
document.writeln(' <!--   End Footer  #############   -->');
if(secInfo){
	document.writeln(' 		<!-- gk: diese beiden fallen weg, wenn kein secinfo, nö bloss eine -->');
	document.writeln(' 		<td bgcolor="'+colorSecinfo+'">&nbsp;</td>');
}
document.writeln(' 		<td bgcolor="'+colorSecinfo+'">&nbsp;</td>');
document.writeln('   	</tr><!-- Row 5 -->	');
document.writeln(' 	<tr>');
document.writeln(' 		<td height="*" bgcolor="'+colorSeknavi+'"><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="144"></td>');
if(secInfo){cols="2"}else{cols="3"}
document.writeln(' 		<!-- gk: colspan=2 damits zu der oberen passt, colspan+2 if !secinfo-->');
document.writeln(' 		<td bgcolor="'+colorMain+'" colspan='+cols+'><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="468"></td>');
if(secInfo){
	document.writeln(' 		<!-- gk: diese beiden fallen weg if !secinfo -- nö, bloss eine -->');
	document.writeln(' 		<td bgcolor="'+colorSecinfo+'"><img src="'+toolboxLocation+'images/ocd_blank.gif"  border="0" height="1" width="144"></td>');
}
document.writeln(' 		<td bgcolor="'+colorSecinfo+'" width="100%"><img src="'+toolboxLocation+'images/ocd_blank.gif" border="0" height="1" width="1"></td>');
document.writeln(' 	</tr>');
document.writeln(' </table>');
document.writeln(' ');
return;
}

//========================================================
function createPrint() {
//========================
	var pdfLocation=unescape(document.location);
	var rest = pdfLocation.split(".");
			if(pdfLocation.indexOf('.htm') > 0) {
			pdfLocation=pdfLocation.substring(0,pdfLocation.length-rest[1].length)+'pdf';
			}else{
			pdfLocation=pdfLocation+'index.pdf';
			}

	document.writeln('<a href='+pdfLocation+'><img src='+toolboxLocation+'images/printericon.gif alt=Print-Preview border=0 align=right></a>');
}
//========================================================
// 2 functions for translate button
function toolboxTranslate(text){
//=======================// performing translate action
	window.open('http://dict.leo.org/?lang=de&deStem=none&searchLoc=0&search='+text,'_blank','scrollbars=yes,resizable=yes,width=400, height=500, screenX=300, screenY=300, X=300, Y=300')
}

function createTranslate(distance){
//=======================
//creating translate-button, see also function toolboxTranslate()
	document.writeln('<form name=translate action=javascript:toolboxTranslate(document.translate.texttotranslate.value)>');
	document.writeln('<table cellpadding=0 cellspacing=0><tr><td width='+distance+'>&nbsp;</td><td  align=right valign=top>');
	document.writeln('<input type=text length=30 name=texttotranslate value class=indexsearchinput>');
	document.writeln('</td><td valign=middle>');
	document.writeln('&nbsp;&nbsp;<a href=# onClick=toolboxTranslate(document.translate.texttotranslate.value) class=ocdmenublackselected>Translate!</a>');
	document.writeln('</td></tr></table>');
	document.writeln('</form>');
}

function chartwindow() {
// =========================
// Fenster mit Aktienkurs
   var chart=open("/common/en/docs/chart.htm","chartwindow", "height=210,width=235,screenX=300,screenY=300");
   chart.focus();
}
function setPrePath(linktext,prepath) {
// =========================
//wenn ein relativer Link vorliegt, wird der Vorpfad davorgesetzt
//Ausschlusskriterium: Link darf nicht mit einem Protokoll oder Schrägstrich beginnen.
a=linktext;
if (typeof linktext == "string" && (linktext !="" ) && !(/^[xX]$/.test(linktext)))  {
   if ( !(/^\w*:/.test(linktext)) &&  !(/^\//.test(linktext)) ) linktext=prepath+linktext;
}
//alert(prepath+"  "+linktext);
return linktext;
}
///////////////////////////////////////////////////////////////////////////////////////////////
// cookie-funktionen, doku in Mintert: Java Script 1.2
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));}//
function FixCookieDate (date) {  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);}//
function GetCookie (name) {
  var arg = name + "=";  var alen = arg.length;
  var clen = document.cookie.length;  var i = 0;  while (i < clen) {
    var j = i + alen;    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;   }  return null;}//
function SetCookie (name,value,expires,path,domain,secure) {
  document.cookie = name + "=" + escape (value) +
    ((expires) ? "; expires=" + expires.toGMTString() : "") +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +    ((secure) ? "; secure" : "");}
function DeleteCookie (name,path,domain) {  if (GetCookie(name)) {
    document.cookie = name + "=" +      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      "; expires=Thu, 01-Jan-70 00:00:01 GMT";  }}////  Examples//
var expdate = new Date ();
FixCookieDate (expdate); // Correct for Mac date bug - call only once for given Date object!
expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000)); // 24 hrs from now
