﻿// Subnavigation Investor
// (c) F.A.Z. Electronic Media GmbH

var menuNav = "invest";
var menuPic = "invest";

var menuClass = "menu-investor";
var menuBgColor = "#f6efe1";
var menuBorderColor = "#95550a";

var armenuPos = new Array(
new Array(1,60,'Aktien'),
new Array(61,116,'Fonds & Vorsorge'),
new Array(117,188,'Anleihen'),
new Array(189,321,'Devisen & Rohstoffe'),
new Array(322,445,'Strategie & Trends'),
new Array(446,554,'Optionsscheine'),
new Array(555,631,'Zertifikate')
);

// NB: 2. Zeile in jedem Ressort, Uebersicht, ist synonym mit Hauptressortrubrik
var mbarArray = new Array(
	new Array("Aktien", sHref+"/s/RubF3F7C1F630AE4F8D8326AC2A80BDBBDE/Tpl~Einvest~Sressort.html"),
	new Array("Fonds & Vorsorge", sHref+"/s/Rub645F7F43865344D198A672E313F3D2C3/Tpl~Einvest~Sressort.html"),
	new Array("Anleihen", sHref+"/s/Rub09A305833E12405A808EF01024D15375/Tpl~Einvest~Sdrehscheibe.html"),
	new Array("Devisen & Rohstoffe", sHref+"/s/Rub58BA8E456DE64F1890E34F4803239F4D/Tpl~Einvest~Sdrehscheibe.html"),
	new Array("Strategie & Trends", sHref+"/s/Rub48D1CBFB8D984684AF5F46CE28AC585D/Tpl~Einvest~Sdrehscheibe.html"),
	new Array("Optionsscheine", sHref+"/s/Rub3D6040857A734996B355094EA04C76A0/Tpl~Einvest~Sdrehscheibe.html"),
	new Array("Zertifikate", sHref+"/s/Rub7A85C6569B04454A9A83A40138971ACF/Tpl~Einvest~Sdrehscheibe.html")
 );

// hard-coded specials for prototyping new asp.net investor stuff

function fnArmenuPosInvest(sType) {
	//alert("fnArmenuPosInvest(" + sType + ")");
	switch (sType)
	{
	  case "Akt":
		return new Array(
			new Array(1,83,  '&Uuml;bersicht'),
			new Array(84,163,'Details'),
			new Array(164,243,'Portr&auml;t'),
			new Array(244,394,'FundamentalAnalyse'),
			new Array(394,466,'Chart'),
			new Array(467,551,'Meldungen'));

	  case "Fonds":
		return new Array(
			new Array(1, 92, '&Uuml;bersicht'),
			new Array(93, 184, "Details"),
			new Array(185, 276, 'Portr&auml;t'),
			new Array(277, 367, "Kennzahlen"),
			new Array(368, 459, "Chart"),
			new Array(460, 551, "Struktur"));
	  case "Anl":
	  case "Dev":
	  case "Ind":
	  default:
		alert("fnArmenuPosInvest() -- sType not yet supported: " + sType);
	  break;
	}
}


function fnMbarArrayInvest(sType) {
	//alert("fnMbarArrayInvest(" + sType + ")");
	switch (sType)
	{
	case "Akt":
	  return new Array(
		new Array('&Uuml;bersicht', sHref+'/d/invest/Aktie1.aspx'),
		new Array('Details', sHref+'/d/invest/Aktie2.aspx'),
		new Array('Portr&auml;t', sHref+'/d/invest/Aktie3.aspx'),
		new Array('FundamentalAnalyse', sHref+'/d/invest/Aktie4.aspx'),
		new Array('Chart', sHref+'/d/invest/Aktie5.aspx'),
		new Array('Meldungen', sHref+'/d/invest/Aktie6.aspx'));

	case "Fonds":
	  return new Array(
		new Array("&Uuml;bersicht", "/d/invest/Fonds1.aspx"),
		new Array("Details", sHref+"/d/invest/Fonds2.aspx"),
		new Array("Portr&auml;t", sHref+"/d/invest/Fonds3.aspx"),
		new Array("Kennzahlen", sHref+"/d/invest/Fonds4.aspx"),
		new Array("Chart", sHref+"/d/invest/Fonds5.aspx"),
		new Array("Struktur", sHref+"/d/invest/Fonds6.aspx"));

	}
}



var currentMenuInvest;
var armenuPosInvest;
function fnInitNavInvest (menuName,sRqparas,sType) {
  //alert("fnInitNavInvest(" + menuName + ", " + sRqparas + ", " + sType + ")");
  armenuPosInvest = fnArmenuPosInvest(sType);
  fnCreateNavInvest(1, sType);
  fnNaviMap ("MenuMapInvest", armenuPosInvest, 0, 18, fnMbarArrayInvest(sType), sRqparas);
  highlight (armenuPosInvest, "SubNavInvest", "SubNavInvestHigh", menuName);
  currentMenuInvest = menuName;
}

// globals:   armenuPosInvest, currentMenuInvest, bMenuOver

function MenuOverInvest (which, on) {
	//alert("MenuOverInvest (" + which + ", " + on + ")");
	bMenuOver = on;
 	if (armenuPosInvest[which][2] == currentMenuInvest) { return; }

	var obj = getOver ("SubNavInvestOver", "SubNavInvest");
	mapOver (obj, armenuPosInvest[which][0], armenuPosInvest[which][1], on);
}

// Unternavi f. den Investor
function fnCreateNavInvest (bDyn, sType)
{
	//alert("fnCreateNavInvest(" + bDyn + ", " + sType + ")");
 if (!(is.ns4 ^ bDyn)) return;
//  sType = "Akt"; // Aktien
  document.write ('<DIV ID="SubNavInvest">'
	+	'<DIV ID="SubNavInvestImg" ><IMG SRC="'+ makeImgSrcTag('/img/invest/Nav_'+ sType +'.gif')+'" width=552 height=18 BORDER=0></DIV>'
	+	'<DIV ID="SubNavInvestHigh"><IMG SRC="'+ makeImgSrcTag('/img/invest/Nav_'+ sType +'_h.gif')+'" width=552 height=18 BORDER=0></DIV>'
	+	'<DIV ID="SubNavInvestOver"><IMG SRC="'+ makeImgSrcTag('/img/invest/Nav_'+ sType +'_h.gif')+'" width=552 height=18 BORDER=0></DIV>'
	+	'<DIV ID="SubNavInvestOut" ><IMG SRC="'+ makeImgSrcTag('img/leer.gif')+'" usemap="#MenuMapInvest" width=552 height=18 border=0></DIV>'
  + '</DIV>');
}

function menuBarClickInvest (index)
{
//	alert("oops someone wants menuBarClickInvest (" + index + ") !!!");
/*
	var menu1 = getMenuLayer();
	if (menuCurrent == mbarArray[index]) return;

	menuCurrent = mbarArray[index];

	var out = menuCurrent.menuString;
	if (!out) {
		out = menuBuild(menuCurrent,0,menuPrefix,0);
		menuCurrent.menuString = out;
	}
	if (menu1)
	  if (is.ns4) {
		menu1.document.writeln(out);
		menu1.document.close();
	  } else
		menu1.innerHTML = out;

	menuTurnOn (index);
*/
}
