function open_window(url) {
	box =window.open(url, "box", "toolbar=0, location=0, directories=0, status=0, menubar=1, scrollbars=1, resizable=1, width=600, height=400");
}

//do browser detect stuff
var isNS = (navigator.appName == "Netscape");
var isMacIE = ( (navigator.userAgent.indexOf("IE 4")  > -1) && (navigator.userAgent.indexOf("Mac")  > -1) );
var layerRef = (isNS) ? "document" : "document.all";
var styleRef = (isNS) ? "" : ".style";
var isDynamic = ( (document.layers || document.all) && !isMacIE );

var activeMenu = 0;
var finalClip;


function activateMenu(menuLayerRef, offset) {

	if (isDynamic && activeMenu != menuLayerRef) {

		if (activeMenu) hideMenu("menu" + activeMenu);

		menuID = "menu" + menuLayerRef;
		activeMenu = menuLayerRef;

		if (isNS) {
			document[menuID].top = 25;
			document[menuID].left = offset;
			} else {
			document.all[menuID].style.pixelTop = 27;
			document.all[menuID].style.pixelLeft = offset + 6;
		}

		showMenu(menuID)

	}
	if (isDynamic && !isNS) window.event.cancelBubble = true;
}

function showMenu(layerID) {
	eval(layerRef + '["' + layerID + '"]' + styleRef + '.visibility = "visible"');
}

function hideMenu(layerID) {
	eval(layerRef + '["' + layerID + '"]' + styleRef + '.visibility = "hidden"');
}

function killMenu(e) {
	//check if theres a menu active
	if (activeMenu) {
		menuID = "menu" + activeMenu;
		if (isNS) {
			menuX1 = document[menuID].left;
			menuX2 = menuX1 + document[menuID].clip.right;
			menuY1 = document[menuID].top;
			menuY2 = menuY1 + document[menuID].clip.bottom;

			if (e.pageX < menuX1 || e.pageX > menuX2 || e.pageY > menuY2) {
				hideMenu(menuID);
				activeMenu = 0;
			}
			} else {
			hideMenu(menuID);
			activeMenu = 0;

		}
	}

}


function init() {
	if (isDynamic) {
		if (isNS) {
			document.captureEvents(Event.MOUSEMOVE);
			document.onmousemove = killMenu;
			} else {
			document.onmouseover = killMenu;
		}

	}
}
//This function is included just for demonstration
function popUp(moviePath, winName, xSize, Ysize) {
	window.open(moviePath, winName, "width=" + xSize + ",height=" + Ysize + ",directories=no,status=no,scrollbars=no,resize=no,menubar=no,toolbar=no,alwaysRaised=yes" );
}

if (isDynamic) {
	document.write("<DIV id=\"menu3\" class=\"menu\" onMouseover=\"activateMenu(3,46);\"><a href=\"BAHAMAS.html\">Bahamas</a><BR><a href=\"BELIZE.html\">Belize</a><BR><a href=\"BVI.html\">BVI</a><BR><a href=\"CYPRUS.html\">Cyprus</a><BR><a href=\"DELAWARE.html\">Delaware</a><BR><a href=\"HK.html\">Hong Kong</a><BR><a href=\"MAURITIUS.html\">Mauritius</a><BR><a href=\"NEVIS.html\">Nevis<br></a><a href=\"PANAMA.html\">Panama</a><BR><a href=\"Seychelles.html\">Seychelles</a><BR><a href=\"UNITED_KINGDOM.html\">United Kingdom</a><BR></DIV>");
}

if (isDynamic) {
	document.write("<DIV id=\"menu1\" class=\"menu\" onMouseover=\"activateMenu(1,282);\"><A href=\"Service_Packages.html\">Discounted Package Deals</A><BR><A href=\"Companies_Formation.html\">Companies Formation</A><BR><A href=\"Nominal_Services.html\">Nominee Services</A><BR><A href=\"Documents_Authentication.html\">Documents Authentication</A><BR><A href=\"Bank_Accounts.html\">Bank Accounts</A><BR><A href=\"Credit_Debit_Cards.html\">Credit & Debit Cards</A><BR><A href=\"Annual_Renewal_Services.html\">Annual Renewal Services</A><BR><A href=\"Offshore_Brokerage_Accounts.html\">Offshore Brokerage Accounts</A><BR><A href=\"virtual_office_s.html\">Virtual Office</A><BR><A href=\"Your_Own_Bank.html\">Your Own Bank</A><BR><A href=\"Private_Foundations.html\">Private Foundations</A><BR><A href=\"Your_Own_Re_Insurance_Company.html\">Your Own (Re)Insurance Company</A><BR><A href=\"Consulting.html\">Consulting</A><BR></DIV>");
}

if (isDynamic) {
	document.write("<DIV id=\"menu2\" class=\"menu\" onMouseover=\"activateMenu(2,429);\"><a href=\"International_Business_Companies.html\">International Business Companies</a><BR><a href=\"Limited_Liability_Companies.html\">Limited Liability Companies</a><BR><a href=\"Nominess.html\">Nominees</a><BR><a href=\"Nominal_Companies.html\">Nominee Companies</a><BR><a href=\"Bank_Accounts_ot.html\">Bank Accounts</a><BR><a href=\"Credit_Debit_Cards_ot.html\">Credit & Debit Cards</a><BR><a href=\"Offshore_Brokerage_Accounts_ot.html\">Offshore Brokerage Accounts</a><BR><A href=\"virtual_office_ot.html\">Virtual Office</A><BR><a href=\"Offshore_Banks_ot.html\">Offshore Banks</a><BR><a href=\"Private_Foundations_ot.html\">Private Foundations</a><BR><a href=\"Captive_Re_Insurance_Companies_ot.html\">Captive (Re)Insurance Companies</a><BR><a href=\"Trusts.html\">Trusts</a><BR></DIV>");
}

