function MenuButton(name,layerid,top,left,text,bgcolor,fgcolor,bvlcolor,bvdcolor,hlcolor,width,height,textstyle,href,newWindow) {
	this.active = false;
	this.SetMenu = SetMenu;
	this.Activate = Buttonan;
	this.DeActivate = Buttonaus;
	this.Init = ButtonInit;
	this.layerid = layerid;
	this.hlcolor = hlcolor;
	this.bgcolor = bgcolor;
	this.IsActive = IsActive;
	this.MenuCheck = MenuCheck;
	var ausgabestr;

	if(name == ""){
		cDeActivate = '';
		cActivate = '';
		cImage = '';
		}	
	else{
		cDeActivate = ' onMouseOver="' + name + '.DeActivate()"';
		cActivate = ' onMouseOver="' + name + '.Activate()"';
		cImage = '<img src="/images/menu_down.gif" alt="" border="0">';
		}
	
	ausgabestr = '<DIV id="' + layerid + '" style="width:' + width + '; height:' + height + '; background-color:' + bvdcolor + '; top:' + top + '; left:' + left + '; visibility:visible; position:absolute; z-index:10">\n';
	ausgabestr += '<DIV id="' + layerid + 'shadow" style="width:' + width + '; height:' + (height-1) + '; background-color:' + bvlcolor + '; top:0 ; left:0;"></DIV>\n';
	ausgabestr += '<DIV id="' + layerid + 'beveled" style="width:' + (width-1) + '; height:' + (height-2) + '; background-color:' + bgcolor + '; top:1 ;left:0 ;visibility:visible; position:absolute;"' + ' '+cActivate+'>'+cImage+'<A href="" onClick="return Goto(\'' + href + '\',\''+newWindow+'\')" class="' + textstyle + '">&nbsp;' + text + '&nbsp;</A></DIV>\n';
	ausgabestr += '</DIV>\n';
	ausgabestr += '<DIV id="' + layerid + 'clearer" style="width:100%; height:100%; visibility:hidden; z-index:2; position:absolute; top:0; left:0;"'+cDeActivate+'></DIV>';
	document.writeln(ausgabestr);
}

function ButtonInit(allbuttons) {
	this.content_ptr =  eval('document.getElementById("'+this.layerid+'beveled").style');
    this.allbuttons = allbuttons;
    this.clearer = eval('document.getElementById("'+ this.layerid+'clearer").style');
}

function Buttonan() {
	this.content_ptr.backgroundColor = this.hlcolor; 
	this.clearer.visibility = "visible";
	this.menu.Activate();
	this.active = true;
	this.MenuCheck();
}

function Buttonaus() {
	this.content_ptr.backgroundColor = this.bgcolor; 
	this.clearer.visibility = "hidden";
	this.menu.DeActivate();
	this.active = false;
}  

function IsActive() {
	return this.active;
}

function SetMenu(menu) {
	this.menu = menu;
}

function Item(name,link,newWindow) {
	this.text = name;
	this.href = link;
	this.newWindow = newWindow;  
}

function MenuCheck(n) {
	for (i=0;i<AnzahlMenus;i++) {
		if ((this.allbuttons[i] != this)  && this.allbuttons[i].active) this.allbuttons[i].DeActivate();
	}
}

function Menu(name,layerid,top,left,items,bgcolor,fgcolor,bdcolor,hlcolor,width,height,textstyle) {

  this.active = false; 
  this.items = items;
  this.name = name;
  this.layerid = layerid;
  this.bgcolor = bgcolor;
  this.fgcolor = fgcolor;
  
  this.bdcolor = bdcolor; 
  this.hlcolor = hlcolor; 
  this.length = items.length;

  this.Go = Go;

  this.Activate = Activate;
  this.DeActivate = DeActivate;
  this.Select = Select;
  this.SelectCheck = SelectCheck;
  this.DeSelect = DeSelect;
  this.Init = Init;
  this.SetOpener = SetOpener;
  var ausgabestr;
  var i;
  var j;
	ausgabestr = '<DIV id="' + layerid + '" style="width:' + width + '; height:' + (1+(height-1)*items.length) +'; background-color:' + bdcolor + '; top:' + top + '; left:' + left + '; visibility:hidden; position:absolute;z-index:20;">\n';
  for(i=0,j=1;i<items.length;i++,j+=(height-1)) {
	ausgabestr += '<DIV id="' + layerid + i + '" style="width:' + (width-2) + '; height:' + (height-2) + '; background-color:' + bgcolor + '; top:' + j + 
    				'; left=1; position:absolute;" onMouseOver="' + name + '.' + 'Select(' + i + 
					')" onMouseOut="' + name + '.' + 'DeSelect(' + i + ')" onClick="' + name + '.' + 'Go(' + i + ')">' +
					'<A class="' + textstyle + '" href="" onClick="return Goto(\'' + items[i].href +'\',\''+ items[i].newWindow+'\')">&nbsp;' + items[i].text + '&nbsp;</A></DIV>\n';
  }

  ausgabestr += '</DIV>\n';
  document.writeln(ausgabestr);
}

function Init() {
    this.menu_ptr = eval('document.getElementById("'+this.layerid+'").style');
    this.items_ptr = new Array(this.length);

    for(i=0;i<this.length;i++) {
      this.items_ptr[i] = eval('document.getElementById("'+this.layerid + i +'").style');
    }
}

function SetOpener(opener) {
	this.opener = opener;
}

function Go(n) {
	if (this.items[n].newWindow == 'false')
		window.location.href = this.items[n].href;
}

function Activate() {
	this.menu_ptr.visibility = "visible";
	this.active = true;
}

function DeActivate() {
	this.menu_ptr.visibility = "hidden";
	this.active = false;
}

function Goto(href,newWindow) {
	if(newWindow == 'true')
		open(href);
	else
		top.location.href = href;
	return false;
}

function SelectCheck(n) {
	for(i=0;i<this.length;i++) {
    	if(i!=n) this.items_ptr[i].backgroundColor = this.bgcolor;
    }
}

function Select(n) {
  this.items_ptr[n].backgroundColor = this.hlcolor;
  this.SelectCheck(n);
}

function DeSelect(n,m) {
	this.items_ptr[n].backgroundColor = this.bgcolor;
}

var AnzahlMenus = 5;
Menubuttons = new Array(AnzahlMenus);

var trennstrich		= "ffffff";
var colorTitleHL	= "FF9A00";
var colorTitleBG	= "FF9A00"; 
var colorTitleText	= "0000ff";
var colorMenuHL		= "DEDBDE"; // "FFCC66"
var colorMenuBG		= "FF9A00";

var TopSpace = 300; 
var menuTop = TopSpace + 18;
var menuWidth = 150; // 153; 
var menuHeight = 19;
var titlewidth1 = 153; 
var titlewidth2 = 153;
var titlewidth3 = 153;
var titlewidth4 = 77;
var titlewidth5 = 76;
if (navigator.appName == "Netscape")
	{var leftSpace = 32;}
else
	{var leftSpace = 25;}

var menu00_lpos = leftSpace;
var menu01_lpos = leftSpace+titlewidth1
var menu02_lpos = leftSpace+titlewidth1+titlewidth2
var menu03_lpos = leftSpace+titlewidth1+titlewidth2+titlewidth3
var menu04_lpos = leftSpace+titlewidth1+titlewidth2+titlewidth3+titlewidth4

//(name,layerid,top,left,text,bgcolor,fgcolor,bvlcolor,bvdcolor,hlcolor,width,height,textstyle,href)
Menubuttons[0] = new MenuButton("Menubuttons[0]","button0",TopSpace,menu00_lpos,"INVESTOR RELATIONS",colorTitleBG,colorTitleText,trennstrich,"ffffff",colorTitleHL,titlewidth1,19,"menutitel","#");
Menubuttons[1] = new MenuButton("Menubuttons[1]","button1",TopSpace,menu01_lpos,"ABOUT i:FAO",        colorTitleBG,colorTitleText,trennstrich,"ffffff",colorTitleHL,titlewidth2,19,"menutitel","#");
Menubuttons[2] = new MenuButton("Menubuttons[2]","button2",TopSpace,menu02_lpos,"INFORMATION",     colorTitleBG,colorTitleText,trennstrich,"ffffff",colorTitleHL,titlewidth3,19,"menutitel","#");
Menubuttons[3] = new MenuButton(""              ,"button3",TopSpace,menu03_lpos,"cytric",          colorTitleBG,colorTitleText,trennstrich,"ffffff",colorTitleHL,titlewidth4,19,"menutitel","http://www.cytric.com",true);
Menubuttons[4] = new MenuButton(""              ,"button4",TopSpace,menu04_lpos,"HOME",          colorTitleBG,colorTitleText,trennstrich,"ffffff",colorTitleHL,titlewidth5,19,"menutitel","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~home~eng");

for (i=0;i<AnzahlMenus;i++) {
  Menubuttons[i].Init(Menubuttons);
}

/* IR */
links0 = new Array(4);
links0[0] = new Item("At a Glance","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~ir~~eng",false);
links0[1] = new Item("Ad Hoc Releases","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~adhoc~~eng",false);
links0[2] = new Item("Financial Calendar","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~ShowAll~QB_JB_VP_EH_RH_YK_PK~~eng~all",false);
links0[3] = new Item("Stock Price Charts","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~6~28~34~eng",false);
links0[4] = new Item("Quarterly Reports/Annual Reports","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~ShowAll~QB_JB_VP~~eng",false);
myMenu0 = new Menu("myMenu0","menu0",menuTop,menu00_lpos,links0,colorMenuBG,"",colorMenuBG,colorMenuHL,"200",menuHeight,"menu");

/* Über i:FAO */
links1 = new Array(1);
links1[0] = new Item("Intro",														"http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~2~15~10~eng",false);
links1[1] = new Item("The Traveler Of The Future - The Vision Of The i:FAO Group",	"http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~2~16~11~eng",false);
links1[2] = new Item("Vision - Mission",											"http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~2~17~12~eng",false);
links1[3] = new Item("Report Of The Chief Executive Officer",						"http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~2~18~13~eng",false);
links1[4] = new Item("eProcurement For Business Travel",							"http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~2~20~15~eng",false);
myMenu1 = new Menu("myMenu1","menu1",menuTop,menu01_lpos,links1,colorMenuBG,"",colorMenuBG,colorMenuHL,"335",menuHeight,"menu");

/* Informationen */
links2 = new Array(1);
links2[0] = new Item("Press","http://www.ifao.net/cgi-win/faocgi.dll?press~pressestart~eng",false);
links2[1] = new Item("Events","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~x_events~eng",false);
links2[2] = new Item("Download Center","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~3~14~17~eng",false);
links2[3] = new Item("Brochures","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~3~24~22~eng",false);
links2[4] = new Item("Contact","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~3~22~18~eng",false);
links2[5] = new Item("Job Offers","http://www.ifao.net/cgi-win/faocgi.dll?press~StellenArchiv~eng",false);
links2[6] = new Item("eMail Disclaimer","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~3~56~54~eng",false);
links2[7] = new Item("Corporate Information & Terms of Use","http://www.ifao.net/cgi-win/faocgi.dll?x_i_forms~content~3~57~55~eng",false);
myMenu2 = new Menu("myMenu2","menu2",menuTop,menu02_lpos,links2,colorMenuBG,"",colorMenuBG,colorMenuHL,220,menuHeight,"menu");

/* Produkte */
//links3 = new Array(1);
//links3[0] = new Item("cytric","http://www.cytric.com",true); 
//myMenu3 = new Menu("myMenu3","menu3",menuTop,menu03_lpos,links3,colorMenuBG,"",colorMenuBG,colorMenuHL,menuWidth,menuHeight,"menu");

myMenu0.Init();
myMenu1.Init();
myMenu2.Init();
//myMenu3.Init();

Menubuttons[0].SetMenu(myMenu0);
Menubuttons[1].SetMenu(myMenu1);
Menubuttons[2].SetMenu(myMenu2);
//Menubuttons[3].SetMenu(myMenu3);

