//WINDOWS MANAGEMENT VARIABLES
var lastWin = 0;
document.wins = new Array();
document.wins['guide'] = new Array('width','height','top','left','style');
ht = (ns4) ? 565:600;
document.wins['chart'] = new Array(245,ht,0,0,'directories=0,location=0,menubar=0,scrollbars=no,status=0,toolbar=0,resizable=no');
document.wins['chart'].win = 0;
document.wins['app'] = new Array(800,600,0,0,'directories=0,location=0,menubar=0,scrollbars=yes,status=yes,toolbar=0,resizable=no');
document.wins['app'].win = 0;
wd = (screen.width < 801) ? 800:820;
document.wins['brokerage'] = new Array(wd,565,0,0,'directories=0,location=0,menubar=0,scrollbars=yes,status=yes,toolbar=0,resizable=no');
document.wins['brokerage'].win = 0;
document.wins['powertrader1'] = new Array(815,525,0,0,'directories=0,location=0,menubar=0,scrollbars=yes,status=yes,toolbar=0,resizable=no,copyhisory=no');
document.wins['powertrader1'].win = 0;
wd = (screen.width < 801) ? 800:940;
document.wins['banking'] = new Array(wd,560,0,0,'directories=0,location=0,menubar=0,scrollbars=yes,status=yes,toolbar=0,resizable=no');
document.wins['banking'].win = 0;
document.wins['druck'] = new Array(620,600,0,0,'directories=0,location=0,menubar=1,scrollbars=yes,status=1,toolbar=1,resizable=yes');
document.wins['druck'].win = 0;
document.wins['login'] = new Array(520,550,0,0,'directories=0,location=0,menubar=0,scrollbars=yes,status=yes,toolbar=0,resizable=no');
document.wins['login'].win = 0;
document.wins['waehrungsapplet'] = new Array(700,610,0,0,'directories=0,location=0,menubar=0,scrollbars=yes,status=0,toolbar=0,resizable=no');
document.wins['waehrungsapplet'].win = 0;
document.wins['fms'] = new Array(620,600,0,0,'directories=0,location=0,menubar=0,scrollbars=yes,status=0,toolbar=0,resizable=yes');
document.wins['fms'].win = 0;
document.wins['calc'] = new Array(200,370,0,0,'directories=0,location=0,menubar=0,scrollbars=auto,status=0,toolbar=0,resizable=no');
document.wins['calc'].win = 0;
document.wins['blank'] = new Array(0,0,0,0,0,'');
document.wins['blank'].win = 0;
document.wins['editorial'] = new Array(640,480,0,0,'directories=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,resizable=yes');
document.wins['editorial'].win = 0;
document.wins['sendtoafriend'] = new Array(520,550,0,0,'directories=0,location=0,menubar=0,scrollbars=yes,status=yes,toolbar=0,resizable=no');
document.wins['sendtoafriend'].win = 0;

var ns6 = false
if ((navigator.appName=="Netscape") && (navigator.appVersion.substring(0,1)>=5)){
	document.all = document.getElementsByTagName('div');
	ns6 = true
	}
var ns4 = (document.layers);
var ie = (navigator.appName=="Microsoft Internet Explorer")
var mac = false
if (navigator.platform.indexOf('Mac') != -1) mac = true;
var lnx = false
if (navigator.platform.indexOf('Linux') != -1) lnx = true;

var flipflop = 0;
var activemain = -1;
var lastmain = -1;
var emptycalls = 0;
var lastWin = 0;
var nextTime = 0;
var looping = false;
var amp = '%26';

function animation1() {
	newWindow = window.open('/de/allgemein/kunde_werden/index.html', 'animation1', 'toolbar=no,location=no left=100 top=130,scrollbars=no,width=400,height=367')
	}

function getMS(){
	t = new Date();
	return t.valueOf()
	}

function loop(){
	if (nextTime > getMS()) {
		setTimeout('loop()',100);
		}
	else {
		rite('&nbsp;');
		looping = false;
		}
	}

function setNextTime(howmuch){
	if (activemain == -1){
		nextTime = (getMS()+ howmuch);

		if (!looping){
			looping = true;
			loop();
			}
		}
	}

function ro(on,which,zub) {
	if (on) {
		if ((lastmain != -1) && (lastmain != which)) document.images[('n' + lastmain)].src = imgArr[('n'+lastmain+'0')].src;
		document.images[('n' + which)].src = imgArr[('n'+which+'1')].src;
//		if (activemain == -1) {
//			str = '';
//			for(i=1;i<navArr[which].length;i++) {
//				z = ((i+1.000)/2);
//				if (z == zub) cls = 'navzhi';
//				else cls = 'navz';
//				ln = ('<span class="navsub">&nbsp;&nbsp;&nbsp;</span>');
//				if ((i+2) == navArr[which].length) ln = '';
//				str += ('<A HREF="' + navArr[which][i+1] + '" CLASS="' + cls + '" onMouseOver="setTimeout(\'ro(0,'+which+','+z+')\',50)">' + navArr[which][i] + '</A>'+ln);
//				i++; //double step to deal with this Array structure
//			}
//			rite(str);
//		}
		lastmain = which;
	} else {
		document.images[('n' + which)].src = imgArr[('n'+which+'0')].src;
	}
	if ((zub == 0) && (!on)) setNextTime(200);
	else setNextTime(60000);
}

function rite(str){
	if (document.layers){
		document.znavshadow.top = 96;
		document.znavshadow.visibility = 'show';
		document.znav.top = 102;
		document.znav.document.open();
		document.znav.document.write(str);
		document.znav.document.close();
		}
	else{
		document.all.znavshadow.style.visibility = 'visible';
		if (ns6) {
			if (mac){
				document.all.znav.style.top = 147;
				document.all.znavshadow.style.top = 142;
				}
			if (lnx){
				document.all.znav.style.top = 122;
				document.all.znavshadow.style.top = 114;
				}
			else {
				document.all.znav.style.top = 100;
				document.all.znavshadow.style.top = 95;
				}
			}
		else {
			if ((mac) && (ie)){
				document.all.znav.style.top = 106;
				document.all.znavshadow.style.top = 101;
				document.all.znav.style.zIndex = 200;
				document.all.znavshadow.style.zIndex = 100;
				}
			else if (lnx){
				document.all.znav.style.top = 94;
				document.all.znavshadow.style.top = 90;
				}
			else {
				document.all.znav.style.top = 102;
				document.all.znavshadow.style.top = 97;
				}
			}
		document.all.znav.innerHTML = str;
		}
	}

function donothing(){
}

//WINDOW MANAGEMENT
function popwin(loc,what){
	nm = what;
	txt = ('' + document.wins[what][4] + ',height='+ document.wins[what][1]+ ',width='+ document.wins[what][0]+ '');
	if (what != 'app'){
		if (! document.wins[what].win.closed){
			if (document.wins[what].win != 0) document.wins[what].win.close();
		}
		if (what == 'blank'){
			window.open(loc,what);
		} else{
			document.wins[what].win = window.open(loc,nm,txt);
			document.wins[what].win.focus();
		}
	} else {
		fenster = window.open(loc,nm + document.wins[what].win++,txt);
		fenster.focus();
	}
}

function start(){
	//resize function
	if (ns4) onresize=function(){location.reload();}
    else onresize=function(){setTimeout('start()',100);}
}
