/**
 * Tigra Menue
 * Version: 3.0
 */
var w,F=[];G=['mout','mover','mdown'];function J0(){this.P0=window.innerWidth!=null?function(){return window.innerWidth}:function(){return document.body.clientWidth};this.j=window.innerHeight!=null?function(){return window.innerHeight}:function(){return document.body.clientHeight};this.m=window.pageXOffset!=null?function(){return window.pageXOffset}:function(){return document.body.scrollLeft};this.Q=window.pageYOffset!=null?function(){return window.pageYOffset}:function(){return document.body.scrollTop};this.N=document.all?function(i){return document.all[i]}:function(i){return document.getElementById(i)};this.b=F0;this.G0=S;}function F0(){var R0,D0;if(this.width!=(R0=this.P0())){this.width=R0;D0=true;}if(this.height!=(R0=this.j())){this.height=R0;D0=true;}if(this.d!=(R0=this.m())){this.d=R0;D0=true;}if(this.L!=(R0=this.Q())){this.L=R0;D0=true;}if(D0){if(this.x)clearTimeout(this.x);this.x=setTimeout('w.G0()',200);}window.setTimeout('w.b()',50);}function S(){for(var i=0;i<F.length;i++)if(F[i].g)F[i].G0();}function menu(J,K){this.J=J;this.K=K;this.T=[];this.I=[];this.v=[];this.q=0;this.hide=t;this.onclick=R;this.onmouseout=L0;this.onmouseover=c;this.onmousedown=A0;this.y=O;this.G0=M0;if(!w){w=new J0();w.b();}this.id=F.length;F[this.id]=this;for(var i=0;i<this.J.length;i++)new E0(i,this,this);var X=0,Y=0,n=Number.POSITIVE_INFINITY,p=Number.POSITIVE_INFINITY;for(var i=0;i<this.I.length;i++){X=Math.max(X,this.I[i].y('left')+this.I[i].y('width'));Y=Math.max(Y,this.I[i].y('top')+this.I[i].y('height'));n=Math.min(n,this.I[i].y('left'));p=Math.min(p,this.I[i].y('top'));}this.v.top=0;this.v.left=0;this.v.width=X-n;this.v.height=Y-p;this.g=true;this.G0();}function t(){if(!this.k||this.q||!this.e)return;this.e.u(0);this.e=null;}function M0(){this.v.top=this.v.left=0;if(this.K.align=='center')this.v.left=Math.round((w.width-this.v.width)/2);else if(this.K.align=='right')this.v.left=w.width-this.v.width;if(this.K.valign=='center')this.v.top=Math.round((w.height-this.v.height)/2);else if(this.K.valign=='bottom')this.v.top=w.height-this.v.height;if(this.K.scroll=='horizontal'||this.K.scroll=='both')this.v.left+=w.d;if(this.K.scroll=='vertical'||this.K.scroll=='both')this.v.top+=w.L;for(var i=0;i<this.I.length;i++){this.I[i].o('hidden',true);this.I[i].M(true);this.I[i].o('mout');}}function O(W){return this.v[W]?this.v[W]:0;}function R(id){return(this.T[id].B[1]?true:false);}function L0(id){this.q--;this.k=setTimeout('F['+this.id+'].hide();',this.K.hide_delay[this.T[id].H]);}function c(id){this.q++;clearTimeout(this.k);this.k=null;this.T[id].l();this.e=this.T[id];}function A0(id){this.T[id].o('mdown');}function E0(D,E,A){this.D=new String(D);this.E=E;this.A=A;this.B0=this.D.split('_');this.H=this.B0.length-1;var f='';for(var i=0;i<=this.H;i++)f+='['+(Number(this.B0[i])+(i?3:0))+']';eval('this.B=this.A.J'+f);if(!this.B)return;this.id=this.A.T.length;this.A.T[this.id]=this;E.I[E.I.length]=this;if(document.layers){this.write=H0;this.o=P;this.y=C0;}else{this.write=z;this.o=N0;this.y=s;}this.u=K0;this.l=Z;this.M=mitem_reposition;this.O0=[];this.C=[];this.write(this.M(false));this.V='hidden';this.I=[];var a=this.B.length-3;for(var i=0;i<a;i++)new E0(this.D+'_'+i,this,this.A);}function K0(h){for(var i=0;i<this.I.length;i++)this.I[i].o('hidden');if(h>=this.H)this.o('mout');else this.E.u(h);}function Z(){if(this.A.e&&this.H<=this.A.e.H)this.A.e.u(this.A.e.E==this?this.H+1:this.H);if(!this.A.e||this.A.e.E!=this)for(var i=0;i<this.I.length;i++)this.I[i].o('mout');this.o('mover');}function mitem_reposition(b){if(this.B0[this.H]==0){this.O0.left=this.E.y('left')+(this.B[2]!=null&&this.B[2][0]!=null?this.B[2][0]:this.A.K.block_left[this.H]);this.O0.top=this.E.y('top')+(this.B[2]!=null&&this.B[2][1]!=null?this.B[2][1]:this.A.K.block_top[this.H]);}else{this.O0.left=this.E.I[this.B0[this.H]-1].y('left')+(this.B[2]!=null&&this.B[2][0]!=null?this.B[2][0]:this.A.K.left[this.H]);this.O0.top=this.E.I[this.B0[this.H]-1].y('top')+(this.B[2]!=null&&this.B[2][1]!=null?this.B[2][1]:this.A.K.top[this.H]);}this.O0.width=(this.B[2]!=null&&this.B[2][2]!=null?this.B[2][2]:this.A.K.width[this.H]);this.O0.height=(this.B[2]!=null&&this.B[2][3]!=null?this.B[2][3]:this.A.K.height[this.H]);if(!b)return this.O0;this.y('left',this.O0.left);this.y('top',this.O0.top);for(var i=0;i<this.I.length;i++)this.I[i].M(true);}function z(y){for(var i=0;i<G.length;i++){document.write('<div id="m'+this.A.id+'i'+this.id+G[i]+'" style="position:absolute;left:'+y.left+'px;top:'+y.top+'px;width:'+y.width+'px;height:'+y.height+'px;visibility:hidden;z-index:'+this.H*2+';" class="m'+this.A.id+'l'+this.H+G[i]+'o"><div class="m'+this.A.id+'l'+this.H+G[i]+'i">'+(typeof(this.B[0])=='object'?this.B[0][i]:this.B[0])+'</div></div>');this.C[G[i]]=w.N('m'+this.A.id+'i'+this.id+G[i]);}document.write('<div id="m'+this.A.id+'i'+this.id+'i" style="position:absolute;left:'+y.left+'px;top:'+y.top+'px;width:'+y.width+'px;height:'+y.height+'px;visibility:hidden;z-index:'+(this.H*2+1)+';"><a href="'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][0]!=null?this.B[1][0]:this.B[1])+'"'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][1]!=null?' target="'+this.B[1][1]+'"':'')+' onclick="return F['+this.A.id+'].onclick('+this.id+');" onmouseout="F['+this.A.id+'].onmouseout('+this.id+');" onmouseover="F['+this.A.id+'].onmouseover('+this.id+');" onmousedown="F['+this.A.id+'].onmousedown('+this.id+');"><img src="'+this.A.K['pixel_path']+'" width="'+y.width+'" height="'+y.height+'" border="0"'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][2]!=null?' alt="'+this.B[1][2]+'"':'')+'></a></div>');this.link=w.N('m'+this.A.id+'i'+this.id+'i');}function N0(V,U){if(!this.H&&V=='hidden'&&!U)V='mout';if(V==this.V)return;if(this.V=='hidden')this.link.style.visibility='visible';else this.C[this.V].style.visibility='hidden';if(V=='hidden')this.link.style.visibility='hidden';else this.C[V].style.visibility='visible';this.V=V;}function s(W,I0){if(!W)return;if(this.link.style.pixelLeft)if(W=='left')W='pixelLeft';else if(W=='top')W='pixelTop';else if(W=='width')W='pixelWidth';else if(W=='height')W='pixelHeight';if(I0){for(var i=0;i<G.length;i++)this.C[G[i]].style[W]=I0;this.link.style[W]=I0;return(this.O0[W]=I0);}else{var Q0=/^(\-?\d+)/;if(Q0.exec(this.link.style[W]))return new Number(RegExp.$1);}}function H0(y){for(var i=0;i<G.length;i++){document.write('<layer name="m'+this.A.id+'i'+this.id+G[i]+'" left="'+y.left+'" top="'+y.top+'" z-index="'+this.H*2+'" width="'+y.width+'" height="'+y.height+'" visibility="hide"><table cellpadding="0" cellspacing="0" border="0" width="'+y.width+'" height="'+y.height+'" class="m'+this.A.id+'l'+this.H+G[i]+'o"><tr><td><div class="m'+this.A.id+'l'+this.H+G[i]+'o"><div class="m'+this.A.id+'l'+this.H+G[i]+'i">'+(typeof(this.B[0])=='object'?this.B[0][i]:this.B[0])+'</div></div></td></tr></table></layer>');this.C[G[i]]=document.layers['m'+this.A.id+'i'+this.id+G[i]];}document.write('<layer name="m'+this.A.id+'i'+this.id+'i" left="'+y.left+'" top="'+y.top+'" z-index="'+(this.H*2+1)+'" visibility="hide" width="'+y.width+'" height="'+y.height+'"><a href="'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][0]!=null?this.B[1][0]:this.B[1])+'"'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][1]!=null?' target="'+this.B[1][1]+'"':'')+' onclick="return F['+this.A.id+'].onclick('+this.id+');" onmouseout="F['+this.A.id+'].onmouseout('+this.id+');" onmouseover="F['+this.A.id+'].onmouseover('+this.id+');" onmousedown="F['+this.A.id+'].onmousedown('+this.id+');"><img src="'+this.A.K['pixel_path']+'" width="'+y.width+'" height="'+y.height+'" border="0"'+(this.B[1]!=null&&typeof(this.B[1])!='string'&&this.B[1][2]!=null?' alt="'+this.B[1][2]+'"':'')+'></a></layer>');this.link=document.layers['m'+this.A.id+'i'+this.id+'i'];}function P(V){if(!this.H&&V=='hidden')V='mout';if(V==this.V)return;if(this.V=='hidden')this.link.visibility='show';else this.C[this.V].visibility='hide';if(V=='hidden')this.link.visibility='hide';else this.C[V].visibility='show';this.V=V;}function C0(W,I0){if(!W)return;if(I0){this.O0[W]=I0;for(var i=0;i<G.length;i++){this.C[G[i]].moveTo(this.O0.left,this.O0.top);this.C[G[i]].resizeTo(this.O0.width,this.O0.height);}this.link.moveTo(this.O0.left,this.O0.top);this.link.resizeTo(this.O0.width,this.O0.height);}return this.O0[W];}

var oWindow = null;

/** functions to generate array for tigra menue */

function Item(id, aContent) {
		
	this.id = id;
	this.content = aContent;
	this.childs = new Array();
	
	Item.prototype.add = function(obj) {
		this.childs[this.childs.length] = obj;
	}
}

function addObjectToTree(obj, target, treeObj) {

	if (treeObj.id == target) {
		treeObj.add(obj);
	}
	
	for (var i=0; i<treeObj.childs.length; i++) {
		if (treeObj.childs[i].id == target) {
			treeObj.childs[i].add(obj);
			break;
		}
		
		if (treeObj.childs[i].childs.length > 0) {
			addObjectToTree(obj, target, treeObj.childs[i])
		}
	}
}
	
function build(treeObj) {
		
	var aSiblings = new Array();
	var aChilds = new Array();
	
	for (var i=0; i<treeObj.childs.length; i++) {
		
		if (treeObj.childs[i].childs.length > 0) {
			aChilds = build(treeObj.childs[i]);
			
			for (var j in aChilds) {
				treeObj.childs[i].content[treeObj.childs[i].content.length] = aChilds[j];
			}
	
		}
		aSiblings[aSiblings.length] = treeObj.childs[i].content
	}
	return aSiblings;
}

function dump(data) {
	
	switch(typeof(data)) {
		
		case "number": return data;	break;
		case "string": return data;	break;
		case "object":
			if (data == null) return data;
			if (typeof(data.length) == "number") break;
		break;
	}
	
	var s = '<table cellpadding="0" cellspacing="0" border="1"  style="font-size: 10pt;" align="left">';
	
	for (var i in data) {
		s += '<tr><td><strong>' + i + '</strong></td><td>' + dump(data[i]) + '</td></tr>';
	}
	
	s += '</table>';
	
	return s;
}

function getNavItem(iLevel, sText, showLeftBorder) {
		
	var s = "";
	
	showLeftBorder = (typeof(showLeftBorder) == "undefined") ? false : showLeftBorder;
	
	switch (iLevel) {
	
		case 0:
		
			sImgSrc = '<img id="' + sText + '" src="/gfx/navi/' + sText + '" border="0" alt="">';
			
			s =		'<table width="100%" cellspacing="0" cellpadding="0" border="0" class="mainNavigationEntry">'
				+	'	<tr>';
			if (showLeftBorder) {
			s+=		'		<td class="vertical-border"></td>'
			}
			s+=		'		<td class="horizontal-border"></td>'
				+	'		<td class="vertical-border"></td>'
				+	'	</tr>'
				+	'	<tr>';
			if (showLeftBorder) {
			s+=		'		<td></td>';
			}
			s+=		'		<td class="content" style="color: #ffffff; width: 100%; text-align: center; padding: 2px 0px 2px 0px;"><nobr>' + sImgSrc + '</nobr></td>'
				+	'		<td></td>'
				+	'	</tr>'
				+	'	<tr>'
			if (showLeftBorder) {
			s+=		'		<td class="vertical-border"><img src="" width="1" height="1" border="0" alt=""></td>';
			}
			s+=		'		<td class="horizontal-border"></td>'
				+	'		<td class="vertical-border"><img src="" width="1" height="1" border="0" alt=""></td>'
				+	'	</tr>'
				+	'</table>';
			
		break;
		
		case 1:
		case 2:
		case 3:
			s = 	'<table width="100%" height="100%" cellpadding="0" cellspacing="0" border="0">'
				+	'	<tr>'
				+	'		<td style="color: #ffffff; background-color: #840017; text-align: center; vertical-align: middle;">' +  sText + '</td>'
				+	'	</tr>'
				+	'</table>'
		break;
	}
	
	return s;
}
   
function addOnLoadEvent(func) {
	var oldonload = window.onload;
	
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
      		func();
		}
  	}
}

function setBorderStyle() {
	
	var oDivBorder = document.getElementById("borderdiv");
	
	oWindow = {width : ((window.innerWidth!=null) ? window.innerWidth : document.body.offsetWidth), height: ((window.innerHeight != null) ? window.innerHeight : document.body.offsetHeight)};
	
	var className = (oWindow.width > 1000 && oWindow.height > 782) ? "showBorder" : "hideBorder";
	
	if (oDivBorder.className != className) {
		oDivBorder.className = className;
	}
}

function initPage() {
	setBorderStyle();
}

window.onresize = setBorderStyle;

var MENU_POS = {
	'height' : [30, 25],
	'width' : [90, 90],
	'block_top' : [0, 39],
	'block_left' : [10, 0],
	'top' : [0, 26],
	'left' : [100, 0],
	'hide_delay' : [200, 200],
	'expd_delay' : [200, 200],
	'pixel_path' : '/gfx/blank.gif',
	'align' : 'left'
};

function printContent(page) {
	var page;
	var printpage = window.open(page+'?print=1','printwindow','resizable=1,location=1,toolbar=1,directories=1,status=1,menubar=1,scrollbars=1,width=800,height=600');
}

function openWorldwideDetail(url)
{
	var world = window.open(url,'','scrollbars=no,status=no,resizable=no,width=800,height=458');
 	world.focus();
}

function openDetails(url,width,height) {
	var width = (!width)?'800':width;
	var height = (!height)?'458':height;
	
	var details = window.open(url,'','scrollbars=no,status=no,resizable=no,width='+width+',height='+height);
 	details.focus();
}


