// Funktionen zur Navigation

// alte Version:

//var gSSubDir = '../..';		// enthält Pfad zum Internet-Auftrit auf den Entwicklungsrechnern
//var gSLangDir;
//if(top.document.location.href.indexOf("/de/") >= 0)
//	gSLangDir = '/de';
//else if(top.document.location.href.indexOf("/en/") >= 0)
//	gSLangDir = '/en';

// Ende alte Version:


// Färben der Links im menübalken des Mainframe´s (News; Downloads; Wissen; Demos; Kundenbereich; Kontakt; Home )

function changeColor(SColor)

{
	if(window.event)
	{
		var OSrcElem = window.event.srcElement;
		if(!OSrcElem)		// Netscape kennt dies nicht
			OSrcElem = window.event.target;
		if(OSrcElem)
			OSrcElem.style.color = SColor;
	}

}


function newWindow(SName, oResize, iWidth, iHeight)
{
	var gSPath;

	if(!iWidth)
		iWidth = 550;
	if(!iHeight)
		iHeight = 550;

	if(top.Main.document.location.href.indexOf("/root/") >= 0)
	{
		gSPath='';
	}
	else
	{
		if(top.Main.document.location.href.indexOf("/Customer_Area/") >= 0 ||top.Main.document.location.href.indexOf("/Kundenbereich/") >= 0 )
		{
			gSPath='../../root/';
		}
		else
		{
			gSPath='../root/';
		}
	}

	var ODoc = window.open(gSPath + SName + '.htm', 'Info', 'left=150,top=150,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=' + (oResize ? "1" : "0") + ',width=' + iWidth + ',height=' + iHeight);


// alte Version:	var ODoc = window.open(gSSubDir + gSLangDir + '/root/' + SName + '.htm', 'Info', 'left=150,top=150,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=550,height=550')
//	alert(top.document.location.href.indexOf("/root/")); // Nur für Testzwecke
//	alert(gSPath + SName + '.htm'); // Nur für Testzwecke

	ODoc.focus();
}


function newWindowAddInfo(SName)
{
	var ODoc = window.open(SName + '.htm', 'Info', 'left=150,top=150,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=550,height=550')
	ODoc.focus();
}

function SwapBackLink()
{
	if (document.all.backlink)
	{
		if (this.window.name == "Info")
		{
		//ohne Pfeil
		var linktext="<a href='javascript:window.close()'>Schlie&szlig;en</a>"
		}
		else
		{
			var linktext="<a onmouseover='changeColor(\"red\"); " +
				"status=\"Startseite Rohde &amp; Schwarz Dienstleistungszentrum K&ouml;ln\"; return true;' " +
				"onmouseout='changeColor(\"black\"); status=\" \"; return true;' " +
				"href='" + gSSubDir + gSLangDir +  "/root/index.htm' target='_top'>" +
				"Rohde &amp; Schwarz Dienstleistungszentrum K&ouml;ln</a>";
		}
		document.all.backlink.innerHTML=linktext;
	}
	if (document.all.returnlink)
	{
		if (this.window.name == "Info")
		{
		//mit Pfeil
		var linktext="<a href='javascript:history.back()'>Zur&uuml;ck</a>"
		}
		else
		{
			var linktext="<a onmouseover='changeColor(\"red\"); " +
			"status=\"Startseite Rohde &amp; Schwarz Dienstleistungszentrum K&ouml;ln\"; return true;' " +
			"onmouseout='changeColor(\"black\"); status=\" \"; return true;' " +
			"href='" + gSSubDir + gSLangDir + "/root/index.htm' target='_top'>" +
			"Rohde &amp; Schwarz Dienstleistungszentrum K&ouml;ln</a>";
		}
		document.all.returnlink.innerHTML=linktext;
	}
}


function SwapBackLink_E()

{



	if (document.all.backlink)

	{

		if (this.window.name == "Info")

		{

		//ohne Pfeil

		var linktext="<a href='javascript:window.close()'>Close Window</a>"

		}

		else

		{

			var linktext="<a onmouseover='changeColor(\"red\"); " +

				"status=\"Start Page Rohde &amp; Schwarz Service Center Cologne\"; return true;' " +

				"onmouseout='changeColor(\"black\"); status=\" \"; return true;' " +

				"href='" + gSSubDir + gSLangDir +  "/root/index.htm' target='_top'>" +

				"Rohde &amp; Schwarz Service Center Cologne</a>";

		}

		document.all.backlink.innerHTML=linktext;

	}

	if (document.all.returnlink)

	{

		if (this.window.name == "Info")

		{

		//mit Pfeil

		var linktext="<a href='javascript:history.back()'>Back</a>"

		}

		else

		{

			var linktext="<a onmouseover='changeColor(\"red\"); " +

			"status=\"Start Page Rohde &amp; Schwarz Service Center Cologne\"; return true;' " +

			"onmouseout='changeColor(\"black\"); status=\" \"; return true;' " +

			"href='" + gSSubDir + gSLangDir + "/root/index.htm' target='_top'>" +

			"Rohde &amp; Schwarz Service Center Cologne</a>";

		}

		document.all.returnlink.innerHTML=linktext;

	}

}