var defOver = '#005500', defBack = '#669966';
var defLength = 22;
var defHLength = 100;

var menu = new Array();
menu[0] = new Array();
menu[0][0] = new Menu(false, '', 7, 87, 18, defOver, '', '', 'itemText');


var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
function getRef(id) {
if (isDOM) return document.getElementById(id);
if (isIE4) return document.all[id];
if (isNS4) return document.layers[id];
}
function getSty(id) {
return (isNS4 ? getRef(id) : getRef(id).style);
} 
// Hide timeout.
var popTimer = 0;
// Array showing highlighted menu items.
var litNow = new Array();

function popOver(menuNum, itemNum)
{
	clearTimeout(popTimer);
	hideAllBut(menuNum);
	litNow = getTree(menuNum, itemNum);
	changeCol(litNow, true);
	targetNum = menu[menuNum][itemNum].target;
	if (targetNum > 0) {
		thisX = parseInt(menu[menuNum][0].ref.left) + parseInt(menu[menuNum][itemNum].ref.left);
		thisY = parseInt(menu[menuNum][0].ref.top) + parseInt(menu[menuNum][itemNum].ref.top);
		with (menu[targetNum][0].ref) {
			left = parseInt(thisX + menu[targetNum][0].x);
			top = parseInt(thisY + menu[targetNum][0].y);
			visibility = 'visible';
	     }
   }
}

function popOut(menuNum, itemNum) {
if ((menuNum == 0) && !menu[menuNum][itemNum].target)
hideAllBut(0)
else
popTimer = setTimeout('hideAllBut(0)', 500);
}
function getTree(menuNum, itemNum) {

// Array index is the menu number. The contents are null (if that menu is not a parent)
// or the item number in that menu that is an ancestor (to light it up).
itemArray = new Array(menu.length);

while(1) {
itemArray[menuNum] = itemNum;
// If we've reached the top of the hierarchy, return.
if (menuNum == 0) return itemArray;
itemNum = menu[menuNum][0].parentItem;
menuNum = menu[menuNum][0].parentMenu;
   }
}

// Pass an array and a boolean to specify colour change, true = over colour.
function changeCol(changeArray, isOver) {
for (menuCount = 0; menuCount < changeArray.length; menuCount++) {
if (changeArray[menuCount]) {
newCol = isOver ? menu[menuCount][0].overCol : menu[menuCount][0].backCol;
// Change the colours of the div/layer background.
with (menu[menuCount][changeArray[menuCount]].ref) {
if (isNS4) bgColor = newCol;
else backgroundColor = newCol;
         }
      }
   }
}

function hideAllBut(menuNum) {
var keepMenus = getTree(menuNum, 1);
for (count = 0; count < menu.length; count++)
{
	if (!keepMenus[count])
	{
		menu[count][0].ref.visibility = 'hidden';
	}
}
changeCol(litNow, false);
}

// *** MENU CONSTRUCTION FUNCTIONS ***

function Menu(isVert, popInd, x, y, width, overCol, backCol, borderClass, textClass) {
// True or false - a vertical menu?
this.isVert = isVert;
// The popout indicator used (if any) for this menu.
this.popInd = popInd
// Position and size settings.
this.x = x;
this.y = y;
this.width = width;
// Colours of menu and items.
this.overCol = overCol;
this.backCol = backCol;
// The stylesheet class used for item borders and the text within items.
this.borderClass = borderClass;
this.textClass = textClass;
// Parent menu and item numbers, indexed later.
this.parentMenu = null;
this.parentItem = null;
// Reference to the object's style properties (set later).
this.ref = null;
}

function Item(text, href, frame, length, spacing, target) {
this.text = text;
this.href = href;
this.frame = frame;
this.length = length;
this.spacing = spacing;
this.target = target;
// Reference to the object's style properties (set later).
this.ref = null;
}

function writeMenus() {
if (!isDOM && !isIE4 && !isNS4) return;

for (currMenu = 0; currMenu < menu.length; currMenu++) with (menu[currMenu][0]) {
// Variable for holding HTML for items and positions of next item.
var str = '', itemX = 0, itemY = 0;

// Remember, items start from 1 in the array (0 is menu object itself, above).
// Also use properties of each item nested in the other with() for construction.
for (currItem = 1; currItem < menu[currMenu].length; currItem++) with (menu[currMenu][currItem]) {
var itemID = 'menu' + currMenu + 'item' + currItem;

// The width and height of the menu item - dependent on orientation!
var w = (isVert ? width : length);
var h = (isVert ? length : width);

// Create a div or layer text string with appropriate styles/properties.
// Thanks to Paul Maden (www.paulmaden.com) for helping debug this in IE4, apparently
// the width must be a miniumum of 3 for it to work in that browser.
if (isDOM || isIE4) {
str += '<div id="' + itemID + '" style="position: absolute; left: ' + itemX + '; top: ' + itemY + '; width: ' + w + '; height: ' + h + '; visibility: inherit; ';
if (backCol) str += 'background: ' + backCol + '; ';
str += '" ';
}
if (isNS4) {
str += '<layer id="' + itemID + '" left="' + itemX + '" top="' + itemY + '" width="' +  w + '" height="' + h + '" visibility="inherit" ';
if (backCol) str += 'bgcolor="' + backCol + '" ';
}
if (borderClass) str += 'class="' + borderClass + '" ';

// Add mouseover handlers and finish div/layer.
str += 'onMouseOver="popOver(' + currMenu + ',' + currItem + ')" onMouseOut="popOut(' + currMenu + ',' + currItem + ')">';

// Add contents of item (default: table with link inside).
// In IE/NS6+, add padding if there's a border to emulate NS4's layer padding.
// If a target frame is specified, also add that to the <a> tag.

str += '<table width="' + (w - 8) + '" border="0" cellspacing="0" cellpadding="' + (!isNS4 && borderClass ? 3 : 0) + '"><tr><td align="left" height="' + (h - 7) + '">' + '<a class="' + textClass + '" href="' + href + '"' + (frame ? ' target="' + frame + '">' : '>') + text + '</a></td>';
if (target > 0) {

// Set target's parents to this menu item.
menu[target][0].parentMenu = currMenu;
menu[target][0].parentItem = currItem;

// Add a popout indicator.
if (popInd) str += '<td class="' + textClass + '" align="right">' + popInd + '</td>';
}
str += '</tr></table>' + (isNS4 ? '</layer>' : '</div>');
if (isVert) itemY += length + spacing;
else itemX += length + spacing;
}
if (isDOM) {
var newDiv = document.createElement('div');
document.getElementsByTagName('body').item(0).appendChild(newDiv);
newDiv.innerHTML = str;
ref = newDiv.style;
ref.position = 'absolute';
ref.visibility = 'hidden';
}

// Insert a div tag to the end of the BODY with menu HTML in place for IE4.
if (isIE4) {
document.body.insertAdjacentHTML('beforeEnd', '<div id="menu' + currMenu + 'div" ' + 'style="position: absolute; visibility: hidden">' + str + '</div>');
ref = getSty('menu' + currMenu + 'div');
}

// In NS4, create a reference to a new layer and write the items to it.
if (isNS4) {
ref = new Layer(0);
ref.document.write(str);
ref.document.close();
}

for (currItem = 1; currItem < menu[currMenu].length; currItem++) {
itemName = 'menu' + currMenu + 'item' + currItem;
if (isDOM || isIE4) menu[currMenu][currItem].ref = getSty(itemName);
if (isNS4) menu[currMenu][currItem].ref = ref.document[itemName];
   }
}
with(menu[0][0]) {
ref.left = x;
ref.top = y;
ref.visibility = 'visible';
   }
}

var popOldWidth = window.innerWidth;
nsResizeHandler = new Function('if (popOldWidth != window.innerWidth) location.reload()');


// This is a quick snippet that captures all clicks on the document and hides the menus
// every time you click. Use if you want.

if (isNS4) document.captureEvents(Event.CLICK);
document.onclick = clickHandle;

function clickHandle(evt)
{
 if (isNS4) document.routeEvent(evt);
 hideAllBut(0);
}

// This is just the moving command for the example.

function moveRoot()
{
 with(menu[0][0].ref) left = ((parseInt(left) < 100) ? 100 : 5);
}

function makeHome(intArray)
{
	menu[0][intArray] = new Item('&nbsp;&nbsp;HOME&nbsp;&nbsp;|', '/index.asp', '', 50, 1, 0);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 140, defOver, defBack, 'itemBorder', 'itemText');
}

function makeMessage(intArray)
{
	menu[0][intArray] = new Item('&nbsp;MESSAGE CENTER |', '/callcentercontact.asp', '', 108, 1, 0);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 140, defOver, defBack, 'itemBorder', 'itemText');
}

function makeCallID(intArray)
{
	menu[0][intArray] = new Item('&nbsp;RECORD NUMBER LOOKUP |', '/recordnumber.asp', '', 152, 1, 0);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 140, defOver, defBack, 'itemBorder', 'itemText');
}

function makeFAQ(intArray)
{
	menu[0][intArray] = new Item('&nbsp;FAQ |', '/faq.asp', '', 42, 1, 0);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 140, defOver, defBack, 'itemBorder', 'itemText');
}

function makeMenu(intArray, access)
{
	var intnum;
	intnum = 1;
	
	if(access == "Dealer")
	{
		menu[0][intArray] = new Item('&nbsp;&nbsp;MAIN MENU&nbsp;&nbsp;|', '.', '', 85, 1, intArray);
	}else if(access == "SalesRep"){
		menu[0][intArray] = new Item('&nbsp;&nbsp;MAIN MENU&nbsp;&nbsp;|', '/sales_login.asp', '', 85, 1, intArray);
	}else if(access != "Partner"){
		menu[0][intArray] = new Item('&nbsp;&nbsp;MAIN MENU&nbsp;&nbsp;|', '/frx_login.asp', '', 85, 1, intArray);
	}else{
		menu[0][intArray] = new Item('&nbsp;&nbsp;MAIN MENU&nbsp;&nbsp;|', '', '', 85, 1, intArray);
	}
	
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(false, '>', 0, 17, 20, defOver, defBack, 'itemBorder', 'itemText');
	if(access != "Dealer" && access != "SalesRep" && access != "Partner")
	{
		//menu[intArray][intnum] = new Item('Handbook', '/manual2.pdf', '', 70, 0, 0);
		//intnum = intnum + 1;
	}
	if(access == "Manager")
	{
		menu[intArray][intnum] = new Item('SetUp Menu', '/frx_su_menu.asp', '', 100, 0, 0);
		intnum = intnum + 1;
	}else if(access == "Admin"){
		menu[intArray][intnum] = new Item('SetUp Menu', '/search.asp', '', 100, 0, 0);
		intnum = intnum + 1;
	}
	if(access == "Admin" || access == "CallCenter")
	{
		menu[intArray][intnum] = new Item('Transaction Menu', '/trans_search.asp', '', 130, 0, 0);
		intnum = intnum + 1;
	}else if(access == "Manager"){
		menu[intArray][intnum] = new Item('Transaction Menu', '/ListOfBranch.asp', '', 130, 0, 0);
		intnum = intnum + 1;
	}else if(access == "Agent"){
		menu[intArray][intnum] = new Item('Transaction Menu', '/ListOfBranch.asp', '', 130, 0, 0);
		intnum = intnum + 1;
	}else if(access != "Dealer" && access != "SalesRep" && access != "Partner"){
		menu[intArray][intnum] = new Item('Transaction Menu', '/frx_tran_menu.asp', '', 130, 0, 0);
		intnum = intnum + 1;
	}
	if(access == "Admin")
	{	
		menu[intArray][intnum] = new Item('Report Menu', '/rpt_search.asp', '', defHLength, 0, 0);
		intnum = intnum + 1;
	}else if(access == "Manager" || access == "Agent"){
		menu[intArray][intnum] = new Item('Report Menu', '/frx_rpt_menu.asp', '', defHLength, 0, 0);
		intnum = intnum + 1;
	}
	if(access == "Admin")
	{
		menu[intArray][intnum] = new Item('AIM Search', '/ezmailer/searchadmin.asp', '', defHLength, 0, 0);
		intnum = intnum + 1;
	}else if(access != "Dealer" && access != "SalesRep" && access != "Partner"){
		menu[intArray][intnum] = new Item('AIM Search', '/ezmailer/searchclient.asp', '', defHLength, 0, 0);	
		intnum = intnum + 1;
	}
	if(access == "Admin" || access == "Manager" || access == "Agent")
	{
		menu[intArray][intnum] = new Item('Security Check', 'https://www.ezforex.com/https/ofac_check.asp', '', defHLength, 0, 0);
		intnum = intnum + 1;
	}
	if(access != "Dealer" && access != "SalesRep" && access != "Partner")
	{
		menu[intArray][intnum] = new Item('Client Lookup', '/consumer/client_login.asp', '', defHLength, 0, 0);
		intnum = intnum + 1;
		//menu[intArray][intnum] = new Item('Consumer Log Out', '/echeck/logout.asp', '', defHLength, 0, 0);
		//intnum = intnum + 1;
	}
}


function makeOrder(intArray)
{
	menu[0][intArray] = new Item('&nbsp;ORDER ONLINE&nbsp;&nbsp;|', 'https://www.ezforex.com/login.asp?Affiliate=2067&WebUser=8656', '', 102, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 180, defOver, defBack, 'itemBorder', 'itemText');
	//menu[intArray][1] = new Item('Foreign Currency', 'https://www.ezforex.com/login.asp?Affiliate=2067&WebUser=8656', '', defLength, 0, 0);

}

function makeTool(intArray)
{
	menu[0][intArray] = new Item('&nbsp;&nbsp;TOOLS&nbsp;&nbsp;|', '#', '', 53, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(false, 'V', 0, 18, 20, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('WebSite Tools', '/calculator/installcalcticker.asp', '', defHLength, 0, 12);
	menu[intArray][2] = new Item('fxRateTrends', '/fxflux.asp', '', defHLength, 0, 0);
	menu[intArray][3] = new Item('Applications', '/tools/application/selectpayment.asp', '', defHLength, 0, 10);
	menu[intArray][4] = new Item('Demos', '/tools/demo.asp', '', defHLength, 0, 11);
	menu[intArray][5] = new Item('Schedule Training', '/company/training.asp', '', defHLength, 0, 0);
	menu[intArray][6] = new Item('Suspicious Activity Report', '/sar.asp', '', defHLength, 0, 0);
	makeApplication(10)
	makeDemo(11)
	makeWebsiteTool(12)
}


function makeProduct(intArray)
{
	menu[0][intArray] = new Item('&nbsp;&nbsp;PRODUCTS&nbsp;&nbsp;|', '#', '', 68, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(false, '>', 0, 18, 20, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('Buy Now/Later Button', '/caar/dualproduct.asp', '', 130, 0, 0);
	menu[intArray][2] = new Item('Currency Reminder', '/caar/caarproduct.asp', '', 130, 0, 0);
	menu[intArray][3] = new Item('Currency Buy Button', '/caar/cbbproduct.asp', '', 130, 0, 0);
	menu[intArray][4] = new Item('Currency Converter', '/calculator/calculatorproduct.asp', '', 130, 0, 0);
	
}
function makeSignup(intArray)
{
	// Reopen menu
menu[intArray] = new Array();
// This is across but not down... a horizontal popout ...
menu[intArray][0] = new Menu(true, '>', 120, 0, 162, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[intArray][1] = new Item('Credit Union / Bank Signup', 'https://www.ezforex.com/https/signup/cutype.asp', '', defLength, 0, 0);
//menu[intArray][2] = new Item('Travel Agency Signup', 'https://www.ezforex.com/https/signup/referralsignup.asp', '', defLength, 0, 0);
//menu[intArray][3] = new Item('Corporate Affiliate Signup', 'https://www.ezforex.com/https/signup/corporatesignup.asp', '', defLength, 0, 0);
}
function makePartner(intArray)
{
	menu[0][intArray] = new Item('&nbsp;&nbsp;AFFILIATES&nbsp;&nbsp;|', '/company/contactsignup.asp', '', 80, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 120, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('Affiliate Signup', '/company/contactsignup.asp', '', defLength, 0, intArray+5);
	menu[intArray][2] = new Item('Affiliate Login', 'https://www.ezforex.com/login.asp', '', defLength, 0, 0);
	makeSignup(intArray+5)
}

function makeInfo(intArray)
{
	menu[0][intArray] = new Item('&nbsp;&nbsp;ABOUT US&nbsp;&nbsp;|', '/company/company.asp', '', 77, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 160, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('eZforex.com Story', '/company/company.asp', '', defLength, 0, 0);
	menu[intArray][2] = new Item('Who\'s Who', '/company/members.asp', '', defLength, 0, intArray+3);
	menu[intArray][3] = new Item('Privacy Policy', '/company/privacy.asp', '', defLength, 0, 0);
	menu[intArray][4] = new Item('Security Policy', '/company/security.asp', '', defLength, 0, 0);
	menu[intArray][5] = new Item('Refund Policy', '/company/refund.asp', '', defLength, 0, 0);
	menu[intArray][6] = new Item('In The News', '/company/news.asp', '', defLength, 0, 0);
	menu[intArray][7] = new Item('Contact Us', '/company/contact.asp', '', defLength, 0, 0);
	makeMembers(intArray+3);
}

function makeHortInfo(intArray)
{
	menu[0][intArray] = new Item('&nbsp;&nbsp;ABOUT US&nbsp;&nbsp;|', '/company/company.asp', '', 77, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(false, 'V', -80, 18, 20, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('Our Story', '/company/company.asp', '', defHLength, 0, 0);
	menu[intArray][2] = new Item('Who\'s Who', '/company/members.asp', '', defHLength, 0, intArray+3);
	menu[intArray][3] = new Item('Our Policys', '/company/privacy.asp', '', defHLength, 0, intArray+4);
	menu[intArray][4] = new Item('In The News', '/company/news.asp', '', defHLength, 0, 0);
	menu[intArray][5] = new Item('Contact Us', '/company/contact.asp', '', defHLength, 0, 0);
	makeHortMembers(intArray+3);
	makePolicy(intArray+4);
}

function makePolicy(intArray)
{
	// Reopen menu
menu[intArray] = new Array();
// This is across but not down... a horizontal popout ...
menu[intArray][0] = new Menu(true, '>', 0, 20, 130, defOver, defBack, 'itemBorder', 'itemText');
menu[intArray][1] = new Item('Privacy Policy', '/company/privacy.asp', '', defLength, 0, 0);
menu[intArray][2] = new Item('Security Policy', '/company/security.asp', '', defLength, 0, 0);
menu[intArray][3] = new Item('Refund Policy', '/company/refund.asp', '', defLength, 0, 0);
}

function makeHortMembers(intArray)
{
	// Reopen menu
menu[intArray] = new Array();
// This is across but not down... a horizontal popout ...
menu[intArray][0] = new Menu(true, '>', 0, 20, 130, defOver, defBack, 'itemBorder', 'itemText');
menu[intArray][1] = new Item('Evan Shelan', '/company/evan_bio.asp', '', defLength, 0, 0);
menu[intArray][2] = new Item('Robert Crandall', '/company/crandall_bio.asp', '', defLength, 0, 0);
menu[intArray][3] = new Item('Eric Green', '/company/eric_bio.asp', '', defLength, 0, 0);
menu[intArray][4] = new Item('Rachel Smith', '/company/rachel_bio.asp', '', defLength, 0, 0);
}

function makeLogin(intArray, blnClient)
{
	var i;
	menu[0][intArray] = new Item('TRAVELERS&nbsp;&nbsp;|', '/traveler/index.asp', '', 76, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '<', 0, 18, 120, defOver, defBack, 'itemBorder', 'itemText');
	//menu[intArray][1] = new Item('Register Here', 'https://www.ezforex.com/https/regClient.asp', '', defLength, 0, 0);
	menu[intArray][1] = new Item('Consumer Login', '/consumer/client_login.asp', '', defLength, 0, 0);
	i = 2;
	if(blnClient == true)
	{
		menu[intArray][i] = new Item('Edit Profile', 'https://www.ezforex.com/https/editregClient.asp', '', defLength, 0, 0);
		i++;
		menu[intArray][i] = new Item('My Transaction Report', '/consumer/clienttransrptmenu.asp', '', defLength, 0, 0);
		i++;
		menu[intArray][i] = new Item('fxRateTrends', '/fxflux.asp', '', defLength, 0, 0);
		i++;
		menu[intArray][i] = new Item('My Buy Later', '/ezmailer/client_reminder.asp', '', defLength, 0, 0);
		i++;
	}
	menu[intArray][i] = new Item('Consumer Log Out', '/echeck/logout.asp', '', defLength, 0, 0);
}

function makeHelp(intArray, strfile)
{
	menu[0][intArray] = new Item('HELP&nbsp;&nbsp;', 'javascript:openhelp('+ "'" + strfile + "'" + ')', '', 10, 10, 0);
	menu[intArray] = new Array();
// Leftwards popout with a negative x and y relative to its trigger.
menu[intArray][0] = new Menu(true, '<', 0, 20, 120, defOver, defBack, 'itemBorder', 'itemText');
}

function makeFAQ(intArray)
{
	menu[0][intArray] = new Item('FAQ&nbsp;&nbsp;', 'javascript:openFAQ()', '', 10, 10, 0);
	menu[intArray] = new Array();
// Leftwards popout with a negative x and y relative to its trigger.
menu[intArray][0] = new Menu(true, '<', 0, 20, 120, defOver, defBack, 'itemBorder', 'itemText');
}

function makeApplication(intArray)
{
	// Reopen menu
menu[intArray] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[intArray][0] = new Menu(true, '>', 0, 20, 150, defOver, defBack, 'itemBorder', 'itemText');
menu[intArray][1] = new Item('Online Check Application', '/tools/application/selectpayment.asp', '', defLength, 0, 0);
menu[intArray][2] = new Item('SafeKeeping Application', '/tools/application/safekeeping.doc', '', defLength, 0, 0);
}

function makeDemo(intArray)
{
	// Reopen menu
menu[intArray] = new Array();
// This is across but not down... a horizontal popout ...
menu[intArray][0] = new Menu(true, '>', 0, 20, 130, defOver, defBack, 'itemBorder', 'itemText');
// These items are lengthier than normal, and have extra spacing due to the fancy borders.
menu[intArray][1] = new Item('eZforex Demo', '/tools/demo.asp', '', defLength, 0, 0);
menu[intArray][2] = new Item('Online Presentation', '/tools/webinar1.ppt', '', defLength, 0, 0);
menu[intArray][3] = new Item('Agent Training 101', 'http://209.196.52.36/publicrecorder/webuser.asp?TYPE=User&SID=1&UID=drice', '', defLength, 0, 0);
}

function makeWebsiteTool(intArray)
{
menu[intArray] = new Array();
menu[intArray][0] = new Menu(true, '>', 0, 20, 210, defOver, defBack, 'itemBorder', 'itemText');
menu[intArray][1] = new Item('Buy Now/Later Button Setup', '/caar/installdual.asp', '', defLength, 0, 0);
menu[intArray][2] = new Item('Currency Auto Reminder Setup', '/caar/installcaar.asp', '', defLength, 0, 0);
menu[intArray][3] = new Item('Currency Buy Button Setup', '/caar/installcbb.asp', '', defLength, 0, 0);
menu[intArray][4] = new Item('Currency Converter Setup', '/calculator/installcalcticker.asp', '', defLength, 0, 0);
}

function makeMembers(intArray)
{
	// Reopen menu
menu[intArray] = new Array();
// This is across but not down... a horizontal popout ...
menu[intArray][0] = new Menu(true, '>', 160, 0, 130, defOver, defBack, 'itemBorder', 'itemText');
menu[intArray][1] = new Item('Evan Shelan', '/company/evan_bio.asp', '', defLength, 0, 0);
menu[intArray][2] = new Item('Robert Crandall', '/company/crandall_bio.asp', '', defLength, 0, 0);
menu[intArray][3] = new Item('Eric Green', '/company/eric_bio.asp', '', defLength, 0, 0);
menu[intArray][4] = new Item('Tom Abbott', '/company/tom_bio.asp', '', defLength, 0, 0);
menu[intArray][5] = new Item('Rachel Smith', '/company/rachel_bio.asp', '', defLength, 0, 0);
}

function makeBusiness(intArray)
{
	menu[0][intArray] = new Item('&nbsp;BUSINESS&nbsp;&nbsp;|', '/business/index.asp', '', 68, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 130, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('Learn More', '/business/index.asp', '', defLength, 0, 0);
	menu[intArray][2] = new Item('Travel Money', '/business/travel_money.asp', '', defLength, 0, 0);
	menu[intArray][3] = new Item('Compliance', '/business/regulatory.asp', '', defLength, 0, 0);
	//menu[intArray][4] = new Item('eZ-Business Signup', 'https://www.ezforex.com/https/signup/corporatesignup.asp', '', defLength, 0, 0);
	//menu[intArray][5] = new Item('eZ-Business Login', 'https://www.ezforex.com/login.asp', '', defLength, 0, 0);
}

function makeMyEzforex(intArray)
{
	menu[0][intArray] = new Item('&nbsp;&nbsp;MYEZFOREX&nbsp;&nbsp;|', '/consumer/client_login.asp', '', 100, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 130, defOver, defBack, 'itemBorder', 'itemText');
}


function makeServices(intArray)
{
	menu[0][intArray] = new Item('&nbsp;&nbsp;SERVICES&nbsp;&nbsp;|', '/company/contactsignup.asp', '', 80, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 200, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('Foreign Currency', 'services.asp', '', defLength, 0, 0);
	menu[intArray][2] = new Item('Foreign Travelers Cheques', 'services.asp', '', defLength, 0, 0);
	menu[intArray][3] = new Item('Domestic Travelers Cheques', 'services.asp', '', defLength, 0, 0);
	menu[intArray][4] = new Item('Foreign Draft/Cheque', 'services.asp', '', defLength, 0, 0);
	menu[intArray][5] = new Item('Foreign Wire', 'services.asp', '', defLength, 0, 0);
	
}

function makeCollege(intArray)
{
	menu[0][intArray] = new Item('&nbsp;COLLEGE&nbsp;&nbsp;|', '/college/index.asp', '', 60, 1, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '>', 0, 18, 130, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('College Signup', 'https://www.ezforex.com/https/signup/corptype.asp', '', defLength, 0, 0);
	menu[intArray][2] = new Item('College Login', 'https://www.ezforex.com/login.asp', '', defLength, 0, 0);
}

function makeWiki(intArray)
{
	menu[0][intArray] = new Item('&nbsp;WIKI&nbsp;&nbsp;|', 'javascript:openwiki()', '', 35, 10, intArray);
	menu[intArray] = new Array();
	menu[intArray][0] = new Menu(true, '<', 0, 18, 150, defOver, defBack, 'itemBorder', 'itemText');
	menu[intArray][1] = new Item('Forexpedia', 'javascript:openwikiForex()', '', defLength, 0, 0);
	menu[intArray][2] = new Item('Share Your Experience', 'javascript:openwikiShare()', '', defLength, 0, 0);
	menu[intArray][3] = new Item('FAQ', 'javascript:openFAQ()', '', defLength, 0, 0);
}

function openwiki()
{
win = window.open("http://ezforex.wetpaint.com/page/Home", "wiki", "width=900, height=600, scrollbars=yes, resizable=yes")
}
function openwikiForex()
{
win = window.open("http://ezforex.wetpaint.com/page/Forexpedia", "wiki", "width=900, height=600, scrollbars=yes, resizable=yes")
}
function openwikiShare()
{
win = window.open("http://ezforex.wetpaint.com/page/Share+Your+Experiences", "wiki", "width=900, height=600, scrollbars=yes, resizable=yes")
}

function openFAQ()
{
	win = window.open("http://ezforex.wetpaint.com/page/Consumer+FAQs", "wiki", "width=900, height=600, scrollbars=yes, resizable=yes")
}
