/********************************************************************************
Variables to set.
********************************************************************************/
var i=0; var j=0;
var allitems = new Array()
var hi_item = new Array()
stdheight=23;


switch (thisdoc_title)
{
	case 'Introduction':
	case 'Company Profile':
	case 'Facts & Figures':
	case 'Personal &<br>Commercial':
	case 'Business <br>Development':
	case 'Corporate':
	case 'China Desk':
	case 'Policy Admin.<br>& Service':
	case 'Reinsurance':
	case 'Marketing &<br>Communications':
		allitems[i] = new menuItemObj(stdheight,'Welcome','intro.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new menuItemObj(36,'Company Profile','compa.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new menuItemObj(stdheight,'Facts & Figures','facts.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new menuItemObj(36,'Personal &<br>Commercial','perso.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new menuItemObj(36,'Business <br>Development','bddept.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new menuItemObj(stdheight,'Corporate','corpo.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new menuItemObj(36,'Policy Admin.<br>& Service','custo.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new menuItemObj(stdheight,'Claims','claim.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new menuItemObj(stdheight,'Reinsurance','reinsurance.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
		allitems[i] = new 
menuItemObj(36,'Corporate<br>Communications','marke.htm');
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
	break;

	case 'Allianz Group':
	case 'Allianz<br>Asia Pacific':
	case '&nbsp;&nbsp;Introduction':
	case '&nbsp;&nbsp;Our Presence':
	case '&nbsp;&nbsp;Strategic Goals':
	case '&nbsp;&nbsp;Our Customers':
	case '&nbsp;&nbsp;Our Employees':
	case '&nbsp;&nbsp;Facts & Figures':
		allitems[i] = new menuItemObj(stdheight,'Allianz Group','corporate.htm'); // 3rd Level Navigation
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;

		switch (thisdoc_title)
		{
			case 'Allianz Group':
			case '&nbsp;&nbsp;Introduction':
			case '&nbsp;&nbsp;Our Presence':
			case '&nbsp;&nbsp;Strategic Goals':
			case '&nbsp;&nbsp;Our Customers':
			case '&nbsp;&nbsp;Our Employees':
			case '&nbsp;&nbsp;Facts & Figures':
				allitems[i] = new menuItemObj(stdheight,'&nbsp;&nbsp;Introduction','corporate.htm'); // 4th Level Navigation
				if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
				allitems[i] = new menuItemObj(stdheight,'&nbsp;&nbsp;Our Presence','ourpresence.htm'); // 4th Level Navigation
				if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
				allitems[i] = new menuItemObj(stdheight,'&nbsp;&nbsp;Strategy','strategicgoals.htm'); // 4th Level Navigation
				if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
				allitems[i] = new menuItemObj(36,'&nbsp;&nbsp;Our<br>&nbsp;&nbsp;Customers','ourcustomers.htm'); // 4th Level Navigation
				if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
				allitems[i] = new menuItemObj(36,'&nbsp;&nbsp;Our<br>&nbsp;&nbsp;Employees','ouremployees.htm'); // 4th Level Navigation
				if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
			break;
		}

		allitems[i] = new menuItemObj(36,'Allianz<br>Asia Pacific','allianz_ap.htm'); // 3rd Level Navigation
				if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
				allitems[i] = new menuItemObj(stdheight,'&nbsp;&nbsp;Introduction','allianz_ap.htm'); // 4th Level Navigation		
				if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;
				allitems[i] = new menuItemObj(36,'&nbsp;&nbsp;Facts &<br>&nbsp;&nbsp;Figures','factsfigures.htm'); // 4th Level Navigation		
		if (thisdoc_title==allitems[i].text) hi_item[j++] = i++; else i++;

	break;

}

mainmenu_items = allitems.length;
mainwidths = new Array (mainmenu_items)
var mainheights = new Array ()
for (i=0;i<mainmenu_items;i++)
{
	mainwidths[i] = 111
	mainheights[i] = allitems[i].height;
}

//Making a menu object
o3rdLevelSideMenu=new menuObj('o3rdLevelSideMenu') //Place a name for the menu in there. Must be uniqe for each menu

//Setting menu object variables
if (bw.ie4 || bw.ie5)
	padding = 'padding:4px;'
else
	padding = 'padding-top:2px;padding-left:2px;'

//Style variables NOTE: The stylesheet have been removed. Use this instead! (some styles are there by default, like position:absolute ++)
o3rdLevelSideMenu.clMain='padding:6px; font-family:verdana; font-size:10px; ' //The style for the main menus
o3rdLevelSideMenu.clSub='margin-left:1;margin-top:0;border-top-width:1;border-right-width:0;border-left-width:0;border-bottom-width:0;border-color:black;border-style:solid;'+padding+' font-family:verdana; font-size:10px' //The style for the submenus
o3rdLevelSideMenu.clSubSub='padding:0px; font-family:verdana; font-size:10px' //The style for the subsubmenus
o3rdLevelSideMenu.clAMain='text-decoration:none; color:White' //The style for the main links
o3rdLevelSideMenu.clASub='text-decoration:none; color:White' //The style for the sub links
o3rdLevelSideMenu.clASubSub='text-decoration:none; color:White' //The style for the subsub links

//Background bar properties
o3rdLevelSideMenu.backgroundbar=0 //Set to 0 if no backgroundbar
o3rdLevelSideMenu.backgroundbarfromleft=0 //The left placement of the backgroundbar in pixel or %
o3rdLevelSideMenu.backgroundbarfromtop=0 //The top placement of the backgroundbar  in pixel or %
o3rdLevelSideMenu.backgroundbarsize="100%" //The size of the bar in pixel or %
o3rdLevelSideMenu.backgroundbarcolor="#5D629F" //The backgroundcolor of the bar

o3rdLevelSideMenu.mainheight=23 //The height of the main menuitems in pixel or %
o3rdLevelSideMenu.mainwidth=111 //The width of the main menuitems  in pixel or %


/*These are new variables. In this example they are set like the previous version*/
o3rdLevelSideMenu.subheight=23 //The height of the subitems in pixel or % 
o3rdLevelSideMenu.subwidth=111 // ** NEW ** The width of the submenus

o3rdLevelSideMenu.subsubwidth=o3rdLevelSideMenu.subwidth // ** NEW ** The width of the subsubmenus in pixel or % 
o3rdLevelSideMenu.subsubheight=o3rdLevelSideMenu.subheight //** NEW ** The height if the subsubitems in pixel or % 


//Writing out the style for the menu (leave this line!)
o3rdLevelSideMenu.makeStyle()

o3rdLevelSideMenu.subplacement=o3rdLevelSideMenu.mainheight //** NEW ** Relative to the main item
o3rdLevelSideMenu.subsubXplacement=o3rdLevelSideMenu.subwidth/2 //** NEW ** The X placement of the subsubmenus, relative to the sub item
o3rdLevelSideMenu.subsubYplacement=7 //** NEW ** The Y placement of the subsubmenus, relative to the sub item

o3rdLevelSideMenu.mainbgcoloroff='#353B87' //The backgroundcolor of the main menuitems
o3rdLevelSideMenu.mainbgcoloron='#5D629F' //The backgroundcolor on mouseover of the main menuitems
//o3rdLevelSideMenu.subbgcoloroff=o3rdLevelSideMenu.mainbgcoloroff //The backgroundcolor of the sub menuitems
//o3rdLevelSideMenu.subbgcoloron=o3rdLevelSideMenu.mainbgcoloron //The backgroundcolor on mouseover of the sub menuitems
//o3rdLevelSideMenu.subsubbgcoloroff='#353b87' //The backgroundcolor of the subsub menuitems
//o3rdLevelSideMenu.subsubbgcoloron='#5D629F' //The backgroundcolor on mouseover of the subsub menuitems
o3rdLevelSideMenu.stayoncolor=0 //Do you want the menus to stay on the mouseovered color when clicked?

o3rdLevelSideMenu.menuspeed=100 //The speed of the clipping in px
o3rdLevelSideMenu.menusubspeed=100 //The speed of the submenus clipping in px

o3rdLevelSideMenu.menurows=0 //Set to 0 if you want rows and to 1 if you want columns

o3rdLevelSideMenu.menueventon="mouse" //Set this to "mouse" if you want the menus to appear onmouseover, set it to "click" if you want it to appear onclick
o3rdLevelSideMenu.menueventoff="mouse" //Set this to "mouse" if you them to disappear onmouseout, if not set it to "click"

//Placement of the menuitems

//Example in %:
//o3rdLevelSideMenu.menuplacement=new Array("20%","40%","60%","50%","65%") //Remember to make the arrays contain as many values as you have main menuitems

//Example in px: (remember to use the ' ' around the numbers)
//o3rdLevelSideMenu.menuplacement=new Array(114,194,329)

//Example right beside eachother (only adding the pxbetween variable)
o3rdLevelSideMenu.menuplacement=0

//If you use the "right beside eachother" you cant specify how many pixel there should be between each here
o3rdLevelSideMenu.pxbetween=1 //in pixel or %

//And you can set where it should start from the left here
o3rdLevelSideMenu.fromleft=2 //in pixel or %

//This is how much from the top the menu should be.
// 119 is the no of pixels from the top if there were no 3rd level menus.
// Y_OffSet is the total height of the 3rd level menu including spaces in between menuitems.
o3rdLevelSideMenu.fromtop=117 //in pixel or % :


/********************************************************************************
Construct your menus below
********************************************************************************/
//Main items:
// makeMain(MAIN_NUM,'TEXT','LINK','FRAME_TARGET') (set link to 0 if you want submenus of this menu item)
var menuheight=0;
for (menuidx=0;menuidx<mainmenu_items;menuidx++)
{
	o3rdLevelSideMenu.makeMain(menuidx,allitems[menuidx].text,allitems[menuidx].url);
	menuheight = parseInt(menuheight)+parseInt(allitems[menuidx].height)+parseInt(o3rdLevelSideMenu.pxbetween);
}
/********************************************************************************
End menu construction
********************************************************************************/

if (menuheight > 0)
	menuheight++;
menuheight = parseInt(menuheight)+119;
	str=""
	str='<div id="leftnav" style="position:absolute; width:111px; height:380px; z-index:10; left:2px; top:'+menuheight+'px">\n\n'
	str+='<table width="111" border="0" cellspacing="0" cellpadding="0">\n\n'
	str+='<tr><td><a href="index.htm"><img src="images/nav3/home.gif" width="111" height="21" border="0"></a></td></tr>\n\n'
    str+='<tr><td><a href="http://www.allianz.com/"><img src="images/nav3/allianz_com.gif" width="111" height="23" border="0"></a></td></tr>\n\n'
    str+='<tr><td><a href="dialogue.htm"><img src="images/nav3/dialogue.gif" width="111" height="23" border="0"></a></td></tr>\n\n'
    str+='<tr><td><a href="sitemap.htm"><img src="images/nav3/sitemap.gif" width="111" height="23" border="0"></a></td></tr>\n\n'
    str+='<tr><td><img src="images/nav3/quickfinder.gif" width="111" height="23"></td></tr>\n\n'
  	str+='<form action="query.asp" method="get"><tr><td bgcolor="#282D6A">&nbsp;&nbsp;<input type="text" name="SearchString" size="10"></td></tr>\n\n'
    str+='<tr><td><input type="image" name="go" src="images/nav3/go.gif" width="111" height="19" border="0" alt="Go!"></td></tr></form>\n\n'
    str+='</table>\n\n'
	str+='</div>\n\n'
	document.write(str)

//When all the menus are written out we initiate the menu
o3rdLevelSideMenu.construct()
