// für Gesamtmarktanalysen mit Banner


// Vordefinitionen im Html-File:
// = Title1
// = Title2
// = Chart


// Grafiken
var PRETITLE = "a_";
var PIC = 3;// Anzahl Grafiken vor newchart(): Logo(1)+Banner(2?)+sonstige_feste_Grafiken(?)
var PICSIZE = new Array(2);
    PICSIZE[0] = new Array(300,270);
    PICSIZE[1] = new Array(300,270);
    PICSIZE[2] = new Array(300,270);


// Hilfe
var Win_h = 0;
var WIN_h = "width=350,left=5,height=430,top=23";
    WIN_h = WIN_h + ",menubar=no,resizable=yes,scrollbars=yes,toolbar=no,status=no";
var DOKU = "h_gma_";


function newtitle1(NewTitle1)
{
	//document.all["title1_"+Title1].style.setAttribute("fontWeight","normal","false");
	document.getElementById("title1_"+Title1).style.fontWeight="normal";
	//document.all["title1_"+NewTitle1].style.setAttribute("fontWeight","bold","false");
	document.getElementById("title1_"+NewTitle1).style.fontWeight="bold";
	Title1 = NewTitle1;
	document.images[PIC].src = PRETITLE+Title1+Title2+Chart+".gif";
	x_relbanner();
}
function newtitle2(NewTitle2)
{
	//document.all["title2_"+Title2].style.setAttribute("fontWeight","normal","false");
	document.getElementById("title2_"+Title2).style.fontWeight="normal";
	//document.all["title2_"+Title2].style.setAttribute("fontStyle","normal","false");
	document.getElementById("title2_"+Title2).style.fontStyle="normal";
	//document.all["title2_"+NewTitle2].style.setAttribute("fontWeight","900","false");
	document.getElementById("title2_"+NewTitle2).style.fontWeight="900";
	//document.all["title2_"+NewTitle2].style.setAttribute("fontStyle","italic","false");
	document.getElementById("title2_"+NewTitle2).style.fontStyle="italic";
	Title2 = NewTitle2;
	document.images[PIC].src = PRETITLE+Title1+Title2+Chart+".gif";
	x_relbanner();
}
function newchart(NewChart)
{
	//document.all["chart_"+Chart].style.setAttribute("fontWeight","normal","false");
	document.getElementById("chart_"+Chart).style.fontWeight="normal";
	//document.all["chart_"+NewChart].style.setAttribute("fontWeight","bold","false");
	document.getElementById("chart_"+NewChart).style.fontWeight="bold";
	Chart = NewChart;
	document.images[PIC].src = PRETITLE+Title1+Title2+Chart+".gif";
	document.images[PIC].width  = PICSIZE[parseInt(Chart)-1][0];
	document.images[PIC].height = PICSIZE[parseInt(Chart)-1][1];
	x_relbanner();
}


function openhlp(Doku)
{
	if (Doku == "")
		Doku = "../misc/"+DOKU+Title1+Chart+".htm";
	else
		Doku = "../misc/"+Doku+".htm";
	Win_h = window.open(Doku,'Hinweise',WIN_h)
	Win_h.focus();
	
	x_relbanner();
	
	if (Win_h) return false;
    else return true;
}


function x_relbanner()
{
	for (var ii = 0; ii <= document.images.length - 1; ii++)
	{
		if (document.images[ii].name.substr(0,6) == "banner")
		{
			document.images[ii].src = document.images[ii].src;
		}
	}
}

