/*     Titel: J|G Balkendiagramm    Autor: Johannes Gamperl    email: jg@jg.seite.net    Copyright (c) J|G Webdesign & Programmierung - Johannes Gamperl, 1998.     All rights reserved. Alle Rechte vorbehalten. URL: http://jg.seite.net    Dieser Code darf für nicht-kommerzielle sowie kommerzielle Zwecke frei    genutzt und angepaßt werden, solange dies unentgeltlich erfolgt und    dieser Vermerk bestehen bleibt. *///---------------------------------------------------------// Allgemeine Variablen definieren ----------------------->//---------------------------------------------------------var maxhoehe = 430;var breite = 20; // nicht < 30 !var hoehe = 10;//---------------------------------------------------------// Ab hier keine weiter Anpassung notwendig! ------------->//---------------------------------------------------------var Index = 0;var data = new Array();function chartObj(txt, color, zahl) {	this.txt = txt;	this.color = color;	this.zahl = zahl;	this.chartH = chartH;	this.chartV = chartV;	this.chartT = chartT;	this.chartL = chartL;		this.chartTT = chartTT;    this.printText = printText;    }function chartData(txt, color, zahl) {data[Index] = new chartObj(txt, color, zahl);Index++;}	function chartH() {	a = this.color.split(' ');b = this.zahl.split(' ');	document.write('<B>' +this.txt+ '</B><BR><IMG SRC="pics/' +a[0]+ '.gif" WIDTH=' +eval(parseInt(b[0]/10))+	               ' HEIGHT=' +hoehe+ ' BORDER=1> ' +b[0]+ '<BR>');}function chartV() {	a = this.color.split(' ');b = this.zahl.split(' ');		document.write('<TD ALIGN=CENTER VALIGN=Bottom>' +b[0]+				   '<BR><IMG SRC="pics/' +a[0]+ '2.gif" WIDTH=' +breite+ ' HEIGHT=' +parseInt(b[0]*10)+				   ' BORDER=1><BR>' +this.txt+ '</TD>');}function chartT() {  	a = this.color.split(' ');b = this.zahl.split(' ');	document.write('<TD ALIGN=CENTER VALIGN=Bottom>');	for (i in a) document.write('<IMG SRC="pics/' +a[i]+ '2.gif" WIDTH=' +breite+ ' HEIGHT=' +b[i]+ ' BORDER=0><BR>');	document.write('</TD>');}function chartTT() {  	a = this.color.split(' ');b = this.zahl.split(' ');		document.write('<TD VALIGN="BOTTOM"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">');	for (i in a) {	document.write('<TR><TD ALIGN=CENTER VALIGN=Bottom><IMG SRC="pics/' +a[i]+ '2.gif" WIDTH=' +breite+				   ' HEIGHT=' +b[i]+ ' BORDER=0></TD>');	document.write('<TD ALIGN=CENTER VALIGN=Middle><FONT SIZE=1>' +b[i]+ '</FONT></TD></TR>');	}	document.write('<TR><TD COLSPAN="2" VALIGN="MIDDLE">' +this.txt+ '</TD></TR></TABLE></TD>');}function printText() {	document.write('<TD WIDTH=' +breite+ ' ALIGN="CENTER" VALIGN="TOP">' +this.txt+ '</TD>');}function chartL() {t=maxhoehe;u=t/50;v=50*Math.floor(u);z=breite*data.length;document.write('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">');document.write('<TR>');document.write('<TD COLSPAN=2></TD>');document.write('<TD><IMG SRC="pics/dia_pfv.gif" WIDTH=14 HEIGHT=20 BORDER="0"></TD>');document.write('<TD COLSPAN=2></TD>');document.write('</TR>');document.write('<TR>');document.write('<TD></TD>');document.write('<TD VALIGN="BOTTOM">');if (t!=v) document.write(t+ '<IMG SRC="pics/dia_lih.gif" WIDTH=5 HEIGHT=13 BORDER="0"><BR>');for (i=v;i>=50;i-=50) {document.write(i+ '<IMG SRC="pics/dia_lih.gif" WIDTH=5 HEIGHT=13 BORDER="0">');document.write('<BR><IMG SRC="pics/dummy.gif" WIDTH=5 HEIGHT=30 BORDER="0"><BR>');}document.write('&#160;&#160;0<IMG SRC="pics/dia_lih.gif" WIDTH=5 HEIGHT=13 BORDER="0">');document.write('</TD>');document.write('<TD><IMG SRC="pics/dia_liv.gif" WIDTH=14 HEIGHT=' +(t+26)+ ' BORDER="0"></TD>');document.write('<TD VALIGN="BOTTOM">');		chartLib(3);	document.write('</TD>');document.write('<TD></TD>');document.write('</TR>');document.write('<TR>');document.write('<TD></TD>');document.write('<TD></TD>');document.write('<TD><IMG SRC="pics/dia_liu.gif" WIDTH=14 HEIGHT=13 BORDER="0"></TD>');document.write('<TD><IMG SRC="pics/dia_lih.gif" WIDTH=' +(z+60)+ ' HEIGHT=13 BORDER="0"></TD>');document.write('<TD><IMG SRC="pics/dia_pfh.gif" WIDTH=18 HEIGHT=13 BORDER="0"></TD>');document.write('</TR>');document.write('<TR>');document.write('<TD></TD>');document.write('<TD></TD>');document.write('<TD></TD>');document.write('<TD>');	chartLib(5);document.write('</TD>');document.write('<TD></TD>');document.write('</TR>');document.write('<TR>');document.write('<TD></TD>');document.write('<TD></TD>');document.write('<TD></TD>');document.write('<TD></TD>');document.write('<TD></TD>');document.write('</TR>');document.write('</TABLE>');}function chartLib(x) {	if (x==1) for (i in data) data[i].chartH();	if (x==2) {		document.write('<TABLE BORDER="0" CELLSPACING="5" CELLPADDING="3"><TR>');  	    for (i in data) data[i].chartV();		document.write('</TR></TABLE>');		}	if (x==3) {		document.write('<TABLE BORDER="0" CELLSPACING="5" CELLPADDING="3"><TR>');  	    for (i in data) data[i].chartT();		document.write('</TR></TABLE>');		}	if (x==4) {		document.write('<TABLE BORDER="0" CELLSPACING="5" CELLPADDING="3"><TR>');  	    for (i in data) data[i].chartTT();		document.write('</TR></TABLE>');		}			if (x==5) {		document.write('<TABLE BORDER="0" CELLSPACING="5" CELLPADDING="3"><TR>');  	    for (i in data) data[i].printText();		document.write('</TR></TABLE>');		}		}