5







// These are the arrays for the three right-most menus.

// Any modification of the following lines will affect every page that calls this script.



// This array creates the first of the three "always-on" arrays from the left.

var menuarray0 = new Array();

menuarray0[0] = new makeMenuArray("Paggastos nang Tama", "#", "", "", "", "");

menuarray0[1] = new makeMenuArray("Pagbabadyet", "cntrol01.htm", "", "", "", 0);

menuarray0[2] = new makeMenuArray("Paggawa ng Badyet", "cntrol02.htm", "", "", "", 0);

menuarray0[3] = new makeMenuArray("Ikaw ba ay May Problema sa Pera?", "cntrol03.htm", "", "", "", 0);

menuarray0[4] = new makeMenuArray("Pagkontrol sa Paggastos", "cntrol04.htm", "", "", "", 0);

menuarray0[5] = new makeMenuArray("Sikaping Tumagal ang mga Unang Hakbang", "cntrol05.htm", "", "", "", 0);

menuarray0[6] = new makeMenuArray("Paano kung Nakabaon ka sa Utang?", "cntrol06.htm", "", "", "", 0);

menuarray0[7] = 0




menuarray0[8] = new makeMenuArray("Paghahanda sa Kagipitan", "#", "", "", "", "");

menuarray0[9] = new makeMenuArray("Pagkawala ng Mahal sa Buhay", "ht01.htm", "", "", "", 8);

menuarray0[10] = new makeMenuArray("Separasyong Legal at Kredit", "ht02.htm", "", "", "", 8);

menuarray0[11] = new makeMenuArray("Paghihiwalay ng Kredit", "ht03.htm", "", "", "", 8);

menuarray0[12] = new makeMenuArray("Buhay nang may Kapansanan", "ht04.htm", "", "", "", 8);

menuarray0[13] = new makeMenuArray("Buhay sa Isang Pirmihang Kita", "ht05.htm", "", "", "", 8);

menuarray0[14] = new makeMenuArray("Mga <i>Idea</i> para Makatipid", "ht06.htm", "", "", "", 8);




// This array creates the middle of the three "always-on" arrays.

var menuarray1 = new Array();

menuarray1[0] = new makeMenuArray("Pag-iwas sa Pandaraya", "#", "", "", "", "");

menuarray1[1] = new makeMenuArray("Tiyaking Ligtas ang Kredit", "fraud01.htm", "", "", "", 0);

menuarray1[2] = new makeMenuArray("Ang <i>Internet</i>", "fraud02.htm", "", "", "", 0);

menuarray1[3] = new makeMenuArray("<i>ATM</i> Kard", "fraud03.htm", "", "", "", 0);




menuarray1[4] = new makeMenuArray("Pagnanakaw sa Identidad", "#", "", "", "", "");

menuarray1[5] = new makeMenuArray("Protektahan ang Sarili", "theft01.htm", "", "", "", 4);

menuarray1[6] = new makeMenuArray("Kung Manakaw ang Identidad", "theft02.htm", "", "", "", 4);

menuarray1[7] = new makeMenuArray("Pagbawi sa Iyong Identidad", "theft03.htm", "", "", "", 4);

menuarray1[8] = 0





//menuarray1[3] = new makeMenuArray("Email Profile", "https://www.accountonline.com/CB/servlet/CBEmailRegister", "", "", "", "");








// This array creates the right-most of the "always-on" arrays.

var menuarray2 = new Array();

menuarray2[0] = new makeMenuArray("Bago Ka sa Kredit?", "ntc.htm", "" , "450", "700", "");

menuarray2[1] = new makeMenuArray("Mga Importanteng Telepono", "info.htm", "" , "450", "700", "");

menuarray2[2] = new makeMenuArray("Talasalitaan", "glos.htm", "" , "450", "700", "");

menuarray2[3] = new makeMenuArray("Mapa ng Pook", "sitemap.htm", "" , "450", "700", "");

menuarray2[4] = new makeMenuArray("Tahanan", "index.htm", "" , "450", "700", "");





// This is the end of the arrays for the three "always-on" menus.









////////////////////////////////////////////////////////////////////////////

//

//     Please do not edit below this section without contacting Ocean-7.

//

////////////////////////////////////////////////////////////////////////////











var lastmenu = -1;

var lastmenuitem = -1;

var menuTimer = null;

var menuTimer1 = null;

var hidedivs = null;





// Variables for menu positions

vertpos = 130;

var xpos = new Array(4);

xpos[0] = 191;

xpos[1] = 377;

xpos[2] = 563;

xpos[3] = 5;



//vertpos = 146;

//var xpos = new Array(4);

//xpos[0] = 198;

//xpos[1] = 384;

//xpos[2] = 570;

//xpos[3] = 12;



var subdivs = new Array();







// The following array is a list of the images that appear at the top of the menu.

// Modifying the following array will affect every page that calls this script.

var imgname = new Array();

imgname[0] = "images/s_menu.gif";

imgname[1] = "images/br_menu.gif";

imgname[2] = "images/nn_menu.gif";





// The following variables are placeholders for the optional menu - do not modify or delete these!

var optimgname = "";

var optmenu = false;

var optmenuarray = new Array();

// End of variables for optional menu.





var styletag = "";

var clipheight = new Array();

var clipsubwidth = new Array();

var clipsubheight = new Array();

var menutops = new Array();

var menuarrays = new Array();

var menuarraysback = new Array();

var menuarraysfront = new Array();

var menusubarrays = new Array();

var menusubarraysback = new Array();

var menusubarraysfront = new Array();



var isIEMac = false;



if ( !document.layers )

{

	if ( ( navigator.appName != "Netscape" ) && ( navigator.platform != "Win32" ) )

	{

		isIEMac = true;

	}

}







// The following variables are all default values.

// They may be overwritten by the pages that call this script.

// Modifying the following variables will affect every page that calls this script, except in cases where they're overwritten by the page.

var menuforeground = '#000000';

var menubackground = 'images/3399cc.gif';

var menuhighlight = 'images/99ccff.gif';



var submenuforeground = '#000000';

var submenubackground = 'images/99ccff.gif';

var submenuhighlight = 'images/3399cc.gif';







function makeMenuArray(txt, url, linktype, height, width, par)

{

	if ( txt != "" )

	{

		this.txt = txt;

	}

	else

	{

		this.txt = "";

	}



	if ( url != "" )

	{

		this.url = url;

	}

	else

	{

		this.url = "";

	}



	if ( linktype != "" || linktype == "0" )

	{

		this.linktype = linktype;

	}

	else

	{

		this.linktype = 0;

	}



	if ( height != "" )

	{

		this.height = height;

	}

	else

	{

		this.height = "";

	}



	if ( width != "" )

	{

		this.width = width;

	}

	else

	{

		this.width = "";

	}



	if ( par != "" || par == "0" )

	{

		this.par = par;

	}

	else

	{

		this.par = -1;

	}

}





function cb_getElement(elemID)

{

	if ( document.layers )

	{

		return eval('document.layers["' + elemID + '"]');

	}

	else

	{

		if ( document.all )

		{

			return eval('document.all.' + elemID + '');

		}

		else

		{

			return document.getElementById(elemID);

		}

	}

}





function cb_getElementStyle(elemID)

{

	if ( document.layers )

	{

		return eval('document.layers["' + elemID + '"]');

	}

	else

	{

		if ( document.all )

		{

			return eval('document.all.' + elemID + '.style');

		}

		else

		{

			return document.getElementById(elemID).style;

		}

	}

}





function cb_getImage(elemID, imgID)

{

	if ( document.layers )

	{

		return eval('document.layers["' + elemID + '"].document.images["' + imgID + '"]');

	}

	else

	{

		return eval('document.images["' + imgID + '"]');

	}

}





function showmenu(num)

{

	if ( lastmenu != -1 )

	{

		eval('cb_getElementStyle("menu' + lastmenu + '").visibility = "hidden";');

		if ( !isIEMac )

		{

			eval('cb_getElementStyle("menu' + lastmenu + 'back").visibility = "hidden";');

			eval('cb_getElementStyle("menu' + lastmenu + 'front").visibility = "hidden";');

		}

		clearTimeout(menuTimer);

		hidesubmenu(lastmenu, lastmenuitem);

		lastmenuitem = -1;

	}

	lastmenu = num;



	if ( hidedivs != null )

	{

		for ( l = 0; l < hidedivs.length; l++ )

		{

			if ( eval('cb_getElement("' + hidedivs[l] + '")') )

			{

				eval('cb_getElementStyle("' + hidedivs[l] + '").visibility = "hidden";');

			}

		}

	}



	eval('cb_getElementStyle("menu' + num + '").visibility = "visible";');

	if ( !isIEMac )

	{

		eval('cb_getElementStyle("menu' + num + 'back").visibility = "visible";');

		eval('cb_getElementStyle("menu' + num + 'front").visibility = "visible";');

	}

}





function hidemenu(num)

{

	if ( hidedivs != null )

	{

		for ( l = 0; l < hidedivs.length; l++ )

		{

			if ( eval('cb_getElement("' + hidedivs[l] + '")') )

			{

				eval('cb_getElementStyle("' + hidedivs[l] + '").visibility = "visible";');

			}

		}

	}



	eval('cb_getElementStyle("menu' + num + '").visibility = "hidden";');

	if ( !isIEMac )

	{

		eval('cb_getElementStyle("menu' + num + 'back").visibility = "hidden";');

		eval('cb_getElementStyle("menu' + num + 'front").visibility = "hidden";');

	}

	hidesubmenu(lastmenu, lastmenuitem);

	lastmenuitem = -1;

}





function showsubmenu(i, j)

{

	if ( lastmenuitem != -1 )

	{

		eval('cb_getElementStyle("menu' + i + 'sub' + lastmenuitem + 'sub").visibility = "hidden";');

		if ( !isIEMac )

		{

			eval('cb_getElementStyle("menu' + i + 'sub' + lastmenuitem + 'subback").visibility = "hidden";');

			eval('cb_getElementStyle("menu' + i + 'sub' + lastmenuitem + 'subfront").visibility = "hidden";');

		}

		clearTimeout(menuTimer1);

		changeBG(i, lastmenuitem, menubackground);

	}

	lastmenuitem = j;

	eval('cb_getElementStyle("menu' + i + 'sub' + j + 'sub").visibility = "visible";');

	if ( !isIEMac )

	{

		eval('cb_getElementStyle("menu' + i + 'sub' + j + 'subback").visibility = "visible";');

		eval('cb_getElementStyle("menu' + i + 'sub' + j + 'subfront").visibility = "visible";');

	}

}





function hidesubmenu(i, j)

{

	if ( lastmenuitem != -1 )

	{

		changeBG(i, lastmenuitem, menubackground);

		eval('cb_getElementStyle("menu' + i + 'sub' + j + 'sub").visibility = "hidden";');

		if ( !isIEMac )

		{

			eval('cb_getElementStyle("menu' + i + 'sub' + j + 'subback").visibility = "hidden";');

			eval('cb_getElementStyle("menu' + i + 'sub' + j + 'subfront").visibility = "hidden";');

		}

		clearTimeout(menuTimer1);

	}

}





function menuitemover(i, j, haschildren)

{

	if ( j != lastmenuitem )

	{

		hidesubmenu(i, lastmenuitem);

	}

	else

	{

		clearTimeout(menuTimer1);

	}

	clearTimeout(menuTimer);

	changeBG(i, j, menuhighlight);

	if ( haschildren == true )

	{

		showsubmenu(i, j);

	}

}





function menuitemout(i, j, haschildren)

{

	menuTimer = eval("setTimeout('hidemenu(" + i + ")', 250);");



	if ( haschildren == true )

	{

		menuTimer1 = eval("setTimeout('hidesubmenu(" + i + ", " + j + ")', 250);");

		lastmenuitem = j;

	}

	else

	{

		changeBG(i, j, menubackground);

		lastmenuitem = -1;

	}

}





function changeBG(i, j, c)

{

	if ( j != -1 )

	{

		if ( !isIEMac )

		{

			eval('cb_getImage("menu' + i + 'back", "menu' + i + 'back' + j + '").src = "' + c + '";');

		}

	}

}



function popupURL(i, j)

{

	if ( eval('menuarray' + i + '[' + j + '].linktype') == 1 )

	{

		windowatts = 'toolbar=yes,scrollbars=yes,menubar=yes,location=yes,resizable=yes,status=yes';

		if ( eval('menuarray' + i + '[' + j + '].height') != '' )

		{

			windowatts += ',height=' + eval('menuarray' + i + '[' + j + '].height');

		}

		if ( eval('menuarray' + i + '[' + j + '].width') != '' )

		{

			windowatts += ',width=' + eval('menuarray' + i + '[' + j + '].width');

		}

		win = window.open(eval('menuarray' + i + '[' + j + '].url'), 'popup' + i + j, windowatts);

	}

	else

	{

		windowatts = 'toolbar=no,scrollbars=no,menubar=no,location=no,resizable=no,status=no';

		if ( eval('menuarray' + i + '[' + j + '].height') != '' )

		{

			windowatts += ',height=' + eval('menuarray' + i + '[' + j + '].height');

		}

		if ( eval('menuarray' + i + '[' + j + '].width') != '' )

		{

			windowatts += ',width=' + eval('menuarray' + i + '[' + j + '].width');

		}

		win = window.open(eval('menuarray' + i + '[' + j + '].url'), 'popup' + i + j, windowatts);

	}

}





function changesubBG(i, j, p, c)

{

	if ( j != -1 )

	{

		if ( !isIEMac )

		{

			eval('cb_getImage("menu' + i + 'sub' + p + 'subback", "menuback' + i + 'sub' + j + 'sub").src = "' + c + '";');

		}

	}

}





function writemenus()

{

	if ( !isIEMac )

	{

		document.write('<style>\n');

		if ( document.layers )

		{

			if ( navigator.platform == 'Win32' )

			{

				document.write('A.menu {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menu:link {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menu:active {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menu:visited {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  n');

				document.write('A.menuSub {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menuSub:link {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menuSub:active {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menuSub:visited {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

			}

			else

			{

				document.write('A.menu {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menu:link {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menu:active {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menu:visited {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  n');

				document.write('A.menuSub {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menuSub:link {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menuSub:active {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

				document.write('A.menuSub:visited {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }\n');

			}

		}

		else

		{

			document.write('A.menu {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }');

			document.write('A.menu:link {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }');

			document.write('A.menu:active {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }');

			document.write('A.menu:visited {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }');

			document.write('A.menuSub {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }');

			document.write('A.menuSub:link {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }');

			document.write('A.menuSub:active {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }');

			document.write('A.menuSub:visited {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }');

		}



		document.write('</style>');



		if ( ( optmenu == true ) && ( optmenuarray.length != 0 ) && ( optimgname != "" ) )

		{

			var menuarray3 = optmenuarray;

			imgname[3] = optimgname;

			c = 4;

		}

		else

		{

			c = 3;

		}



		styletag = '<style>\n\n';



		for ( i = 0; i < c; i++ )

		{

			menutops[i] = '<div id="menu' + i + 'top">';

			menutops[i] += '<table border="0" width="180" cellspacing="0" cellpadding="0">';

			menutops[i] += '<tr>';

			menutops[i] += '<td width="180" height="21"><a href="#" onmouseover="clearTimeout(menuTimer);showmenu(' + i + ');hidesubmenu(' + i + ', lastmenuitem);lastmenuitem = -1;" onmouseout="menuTimer = setTimeout(\'hidemenu(' + i + ')\', 250);"><img src="' + imgname[i] + '" height="21" width="180" border="0"></a></td>';

			menutops[i] += '</tr>';

			menutops[i] += '</table>';

			menutops[i] += '</div>';



			j_offset = 0;



			menuarrays[i] = "";

			menuarraysback[i] = "";

			menuarraysfront[i] = "";



			menusubarrays[i] = new Array();

			menusubarraysback[i] = new Array();

			menusubarraysfront[i] = new Array();



			clipsubheight[i] = new Array();



			for ( j = 0; j < eval('menuarray' + i + '.length'); j++ )

			{

				clipsubheight[i][j] = -1;

				haschildren = false;



				for ( k = 0; k < eval('menuarray' + i + '.length'); k++ )

				{

					if ( eval('menuarray' + i + '[' + k + '].par') == j )

					{

						haschildren = true;

					}

				}



				if ( haschildren == true )

				{

					styletag += '#menu' + i + 'sub' + j + 'sub { position: absolute; top: ' + ( ( ( j - j_offset ) * 25 ) + vertpos + 21 ) + 'px; left: ' + ( xpos[i] + 180 ) + 'px; visibility: hidden; z-index: 75; }\n';

					styletag += '#menu' + i + 'sub' + j + 'subback { position: absolute; top: ' + ( ( ( j - j_offset ) * 25 ) + vertpos + 21 ) + 'px; left: ' + ( xpos[i] + 180 ) + 'px; visibility: hidden; z-index: 74; }\n';

					styletag += '#menu' + i + 'sub' + j + 'subfront { position: absolute; top: ' + ( ( ( j - j_offset ) * 25 ) + vertpos + 21 ) + 'px; left: ' + ( xpos[i] + 180 ) + 'px; visibility: hidden; z-index: 76; }\n';



					menusubarrays[i][j] = '<div id="menu' + i + 'sub' + j + 'sub"><table border="0" cellpadding="0" cellspacing="0">\n';

					menusubarraysback[i][j] = '<div id="menu' + i + 'sub' + j + 'subback"><table border="0" cellpadding="0" cellspacing="0">\n';

					menusubarraysfront[i][j] = '<div id="menu' + i + 'sub' + j + 'subfront"><table border="0" cellpadding="0" cellspacing="0">\n';

				}

				else

				{

					menusubarrays[i][j] = '';

					menusubarraysback[i][j] = '';

					menusubarraysfront[i][j] = '';

				}



				if ( eval('menuarray' + i + '[' + j + '].par') == -1 )

				{

					styletag += '#menu' + i + 'sub' + j + ' { position: absolute; top: ' + ( ( j - j_offset ) * 25 ) + 'px; left: 0px; height: 25px; width: 180px; z-index: 75; }\n';



					menuarrays[i] += '<tr>\n\n<td height="25" width="165"><a href="#" class="menu"><nobr>&nbsp;&nbsp;' + eval('menuarray' + i + '[' + j + '].txt') + '&nbsp;&nbsp;</nobr></a></td><td width="15"><img src="';



					if ( haschildren == true )

					{

						menuarrays[i] += 'images/arr_rgt.gif';

					}

					else

					{

						menuarrays[i] += 'images/spacer.gif';

					}



					menuarrays[i] += '" height="21" width="15" border="0" align="right"></td>\n\n</tr>';



					menuarraysback[i] += '<tr>\n\n<td height="25" width="180"><img src="' + menubackground + '" name="menu' + i + 'back' + j + '" height="25" width="180" border="0"></td>\n\n</tr>';

					menuarraysfront[i] += '<tr>\n\n<td height="25" width="180"><a href="';



					if ( eval('menuarray' + i + '[' + j + '].url') != "" )

					{

						if ( eval('menuarray' + i + '[' + j + '].linktype') > 0 )

						{

							menuarraysfront[i] += 'javascript:popupURL(' + i + ', ' + j + ');';

						}

						else

						{

							menuarraysfront[i] += eval('menuarray' + i + '[' + j + '].url');

						}

					}

					else

					{

						menuarraysfront[i] += '#';

					}



					menuarraysfront[i] += '" onmouseover="menuitemover(' + i + ', ' + j + ', ' + haschildren + ');" onmouseout="menuitemout(' + i + ', ' + j + ', ' + haschildren + ');"><img src="images/spacer.gif" height="25" width="180" border="0"></a></td>\n\n</tr>';

				}

				else

				{

					j_offset++;



					menusubarrays[i][eval('menuarray' + i + '[' + j + '].par')] += '<tr>\n\n<td height="25"><a href="#" class="menuSub"><nobr>&nbsp;&nbsp;' + eval('menuarray' + i + '[' + j + '].txt') + '&nbsp;&nbsp;</nobr></a></td>\n\n</tr>\n';

					menusubarraysback[i][eval('menuarray' + i + '[' + j + '].par')] += '<tr>\n\n<td height="25"><img src="' + submenubackground + '" name="menuback' + i + 'sub' + j + 'sub" height="25" width="450" border="0"></td>\n\n</tr>';

					menusubarraysfront[i][eval('menuarray' + i + '[' + j + '].par')] += '<tr>\n\n<td height="25"><a href="' + eval('menuarray' + i + '[' + j + '].url') + '" onmouseover="clearTimeout(menuTimer);clearTimeout(menuTimer1);changesubBG(' + i + ', ' + j + ', ' + eval('menuarray' + i + '[' + j + '].par') + ', submenuhighlight);" onmouseout="menuTimer1 = setTimeout(\'hidesubmenu(' + i + ', ' + eval('menuarray' + i + '[' + j + '].par') + ')\', 250);menuTimer = setTimeout(\'hidemenu(' + i + ')\', 250);changesubBG(' + i + ', ' + j + ', ' + eval('menuarray' + i + '[' + j + '].par') + ', submenubackground);"><img src="images/spacer.gif" height="25" width="450" border="0"></a></td>\n\n</tr>';



					clipsubheight[i][j] = j_offset * 25;

				}

			}



			haschildren = false;

			lastfinishedmenu = -1;



			for ( j = 0; j < eval('menuarray' + i + '.length'); j++ )

			{

				for ( k = 0; k < eval('menuarray' + i + '.length'); k++ )

				{

					if ( ( eval('menuarray' + i + '[' + k + '].par') == j ) && ( lastfinishedmenu != j ) )

					{

						menusubarrays[i][j] += '<tr>\n\n<td height="1">';

						menusubarrays[i][j] += '<table border="0" width="100%" cellpadding="0" cellspacing="0">\n';

						menusubarrays[i][j] += '<tr>\n\n<td height="1"><img src="images/spacer.gif" name="widthtester' + i + 'sub' + j + '" height="1" width="100%" border="0"></td>\n\n</tr>\n';

						menusubarrays[i][j] += '</table>';

						menusubarrays[i][j] += '</td>\n\n</tr>\n';

						menusubarrays[i][j] += '</table></div>';

						menusubarraysback[i][j] += '</table></div>';

						menusubarraysfront[i][j] += '</table></div>';

						lastfinishedmenu = j;

					}

				}

			}



			menuarrays[i] = '<div id="menu' + i + '"><table border="0" width="180" cellspacing="0" cellpadding="0">' + menuarrays[i] + '</table></div>';

			menuarraysback[i] = '<div id="menu' + i + 'back"><table border="0" width="180" cellspacing="0" cellpadding="0">' + menuarraysback[i] + '</table></div>';

			menuarraysfront[i] = '<div id="menu' + i + 'front"><table border="0" width="180" cellspacing="0" cellpadding="0">' + menuarraysfront[i] + '</table></div>';



			styletag += '#menu' + i + 'top { position: absolute; top: ' + vertpos + 'px; left: ' + xpos[i] + 'px; z-index: 75; visibility: visible; }\n';

			styletag += '#menu' + i + ' { position: absolute; top: ' + ( vertpos + 21 ) + 'px; left: ' + xpos[i] + 'px; z-index: 75; visibility: hidden; }\n';

			styletag += '#menu' + i + 'back { position: absolute; top: ' + ( vertpos + 21 ) + 'px; left: ' + xpos[i] + 'px; z-index: 74; visibility: hidden; }\n';

			styletag += '#menu' + i + 'front { position: absolute; top: ' + ( vertpos + 21 ) + 'px; left: ' + xpos[i] + 'px; z-index: 76; visibility: hidden; }\n';

		}



		styletag += '\n</style>';



		document.write(styletag);



		for ( i = 0; i < c; i++ )

		{

			document.write(menutops[i]);

		}



		for ( i = 0; i < menuarrays.length; i++ )

		{

			document.write(menuarrays[i]);

		}

		for ( i = 0; i < menuarraysback.length; i++ )

		{

			document.write(menuarraysback[i]);

		}

		for ( i = 0; i < menuarraysfront.length; i++ )

		{

			document.write(menuarraysfront[i]);

		}



		for ( i = 0; i < menusubarrays.length; i++ )

		{

			for ( j = 0; j < menusubarrays[i].length; j++ )

			{

				if ( menusubarrays[i][j] != '' )

				{

					document.write(menusubarrays[i][j]);

				}

			}

		}

		for ( i = 0; i < menusubarrays.length; i++ )

		{

			clipsubwidth[i] = new Array();

			for ( j = 0; j < menusubarrays[i].length; j++ )

			{

				if ( menusubarrays[i][j] != '' )

				{

					clipsubwidth[i][j] = eval('cb_getImage("menu' + i + 'sub' + j + 'sub", "widthtester' + i + 'sub' + j + '").width');

				}

			}

		}

		for ( i = 0; i < menusubarraysback.length; i++ )

		{

			for ( j = 0; j < menusubarraysback[i].length; j++ )

			{

				if ( menusubarraysback[i][j] != '' )

				{

					document.write(menusubarraysback[i][j]);

					if ( document.layers )

					{

						eval('cb_getElementStyle("menu' + i + 'sub' + j + 'subback").clip.width = clipsubwidth[' + i + '][' + j + ']');

					}

					else

					{

						eval('cb_getElementStyle("menu' + i + 'sub' + j + 'subback").clip = "rect(0, ' + clipsubwidth[i][j] + ', 1000, 0)";');

					}

				}

			}

		}

		for ( i = 0; i < menusubarraysfront.length; i++ )

		{

			for ( j = 0; j < menusubarraysfront[i].length; j++ )

			{

				if ( menusubarraysfront[i][j] != '' )

				{

					document.write(menusubarraysfront[i][j]);

					if ( document.layers )

					{

						eval('cb_getElementStyle("menu' + i + 'sub' + j + 'subfront").clip.width = clipsubwidth[' + i + '][' + j + ']');

					}

					else

					{

						eval('cb_getElementStyle("menu' + i + 'sub' + j + 'subfront").clip = "rect(0, ' + clipsubwidth[i][j] + ', 1000, 0)";');

					}

				}

			}

		}

	}

	else

	{

		styletag = '<style>\n\n';

		styletag += 'A.menuClass {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }';

		styletag += 'A.menuClass:link {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }';

		styletag += 'A.menuClass:alink {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }';

		styletag += 'A.menuClass:vlink {  color: ' + menuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }';

		styletag += 'A.menuSubClass {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }';

		styletag += 'A.menuSubClass:link {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }';

		styletag += 'A.menuSubClass:alink {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }';

		styletag += 'A.menuSubClass:vlink {  color: ' + submenuforeground + '; FONT-FAMILY: arial, helvetica; FONT-SIZE: 12px; TEXT-DECORATION: none;  }';



		if ( ( optmenu == true ) && ( optmenuarray.length != 0 ) && ( optimgname != "" ) )

		{

			var menuarray3 = optmenuarray;

			imgname[3] = optimgname;

			c = 4;

		}

		else

		{

			c = 3;

		}



		for ( i = 0; i < c; i++ )

		{

			menutops[i] = '<div id="menu' + i + 'top">';

			menutops[i] += '<table border="0" width="180" cellspacing="0" cellpadding="0">';

			menutops[i] += '<tr>';

			menutops[i] += '<td width="180" height="21"><a href="#" onmouseover="clearTimeout(menuTimer);showmenu(' + i + ');hidesubmenu(' + i + ', lastmenuitem);lastmenuitem = -1;" onmouseout="menuTimer = setTimeout(\'hidemenu(' + i + ')\', 250);"><img src="' + imgname[i] + '" height="21" width="180" border="0"></a></td>';

			menutops[i] += '</tr>';

			menutops[i] += '</table>';

			menutops[i] += '</div>';



			j_offset = 0;



			menuarrays[i] = "";



			menusubarrays[i] = new Array();



			clipsubheight[i] = new Array();



			for ( j = 0; j < eval('menuarray' + i + '.length'); j++ )

			{

				clipsubheight[i][j] = -1;

				haschildren = false;



				for ( k = 0; k < eval('menuarray' + i + '.length'); k++ )

				{

					if ( eval('menuarray' + i + '[' + k + '].par') == j )

					{

						haschildren = true;

					}

				}



				if ( haschildren == true )

				{

					styletag += '#menu' + i + 'sub' + j + 'sub { position: absolute; top: ' + ( ( ( j - j_offset ) * 25 ) + vertpos + 21 ) + 'px; left: ' + ( xpos[i] + 180 ) + 'px; visibility: hidden; z-index: 75; }\n';



					menusubarrays[i][j] = '<div id="menu' + i + 'sub' + j + 'sub"><table border="0" cellpadding="0" cellspacing="0">\n';

				}

				else

				{

					menusubarrays[i][j] = '';

				}



				if ( eval('menuarray' + i + '[' + j + '].par') == -1 )

				{

					styletag += '#menu' + i + 'sub' + j + ' { position: absolute; top: ' + ( ( j - j_offset ) * 25 ) + 'px; left: 0px; height: 25px; width: 180px; z-index: 75; }\n';



					menuarrays[i] += '<tr>\n\n<td height="25" width="180" style="background-image: url( ' + menubackground + ' );" onmouseover="menuitemover(' + i + ', ' + j + ', ' + haschildren + ');this.style.backgroundImage = \'url( ' + menuhighlight + ' )\';" onmouseout="menuitemout(' + i + ', ' + j + ', ' + haschildren + ');this.style.backgroundImage = \'url( ' + menubackground + ' )\';"><a href="';



					if ( eval('menuarray' + i + '[' + j + '].url') != "" )

					{

						if ( eval('menuarray' + i + '[' + j + '].linktype') > 0 )

						{

							menuarrays[i] += 'javascript:popupURL(' + i + ', ' + j + ');';

						}

						else

						{

							menuarrays[i] += eval('menuarray' + i + '[' + j + '].url');

						}

					}

					else

					{

						menuarrays[i] += '#';

					}



					menuarrays[i] += '" class="menuClass"><nobr><img src="';



					if ( haschildren == true )

					{

						menuarrays[i] += 'images/arr_rgt.gif';

					}

					else

					{

						menuarrays[i] += 'images/spacer.gif';

					}



					menuarrays[i] += '" height="21" width="15" border="0" align="right">&nbsp;&nbsp;' + eval('menuarray' + i + '[' + j + '].txt') + '&nbsp;&nbsp;</nobr></a></td>\n\n</tr>';

				}

				else

				{

					j_offset++;



					menusubarrays[i][eval('menuarray' + i + '[' + j + '].par')] += '<tr>\n\n<td height="25" style="background-image: url( ' + submenubackground + ' );" onmouseover="clearTimeout(menuTimer);clearTimeout(menuTimer1);this.style.backgroundImage = \'url( ' + submenuhighlight + ' )\';" onmouseout="menuTimer1 = setTimeout(\'hidesubmenu(' + i + ', ' + eval('menuarray' + i + '[' + j + '].par') + ')\', 250);menuTimer = setTimeout(\'hidemenu(' + i + ')\', 250);this.style.backgroundImage = \'url( ' + submenubackground + ' )\';"><a href="';



					if ( eval('menuarray' + i + '[' + j + '].url') != "" )

					{

						if ( eval('menuarray' + i + '[' + j + '].linktype') > 0 )

						{

							menusubarrays[i][eval('menuarray' + i + '[' + j + '].par')] += 'javascript:popupURL(' + i + ', ' + j + ');';

						}

						else

						{

							menusubarrays[i][eval('menuarray' + i + '[' + j + '].par')] += eval('menuarray' + i + '[' + j + '].url');

						}

					}

					else

					{

						menusubarrays[i][eval('menuarray' + i + '[' + j + '].par')] += '#';

					}



					menusubarrays[i][eval('menuarray' + i + '[' + j + '].par')] += '" class="menuSubClass"><nobr>&nbsp;&nbsp;' + eval('menuarray' + i + '[' + j + '].txt') + '&nbsp;&nbsp;</nobr></a></td>\n\n</tr>\n';



					clipsubheight[i][j] = j_offset * 25;

				}

			}



			haschildren = false;

			lastfinishedmenu = -1;



			for ( j = 0; j < eval('menuarray' + i + '.length'); j++ )

			{

				for ( k = 0; k < eval('menuarray' + i + '.length'); k++ )

				{

					if ( ( eval('menuarray' + i + '[' + k + '].par') == j ) && ( lastfinishedmenu != j ) )

					{

						menusubarrays[i][j] += '</table></div>';

						lastfinishedmenu = j;

					}

				}

			}



			menuarrays[i] = '<div id="menu' + i + '"><table border="0" width="180" cellspacing="0" cellpadding="0">' + menuarrays[i] + '</table></div>';



			styletag += '#menu' + i + 'top { position: absolute; top: ' + vertpos + 'px; left: ' + xpos[i] + 'px; z-index: 75; visibility: visible; }\n';

			styletag += '#menu' + i + ' { position: absolute; top: ' + ( vertpos + 21 ) + 'px; left: ' + xpos[i] + 'px; z-index: 75; visibility: hidden; }\n';

		}



		styletag += '\n</style>';



		document.write(styletag);



		for ( i = 0; i < c; i++ )

		{

			document.write(menutops[i]);

		}



		for ( i = 0; i < menuarrays.length; i++ )

		{

			document.write(menuarrays[i]);

		}



		for ( i = 0; i < menusubarrays.length; i++ )

		{

			for ( j = 0; j < menusubarrays[i].length; j++ )

			{

				if ( menusubarrays[i][j] != '' )

				{

					document.write(menusubarrays[i][j]);

				}

			}

		}

	}

}




