function openMenuWindow(page) {
	window.open(page, "menuWindowResizable");
}

function MM_displayStatusMsg(msgStr)  {
	status = msgStr;
	document.MM_returnValue = true;
}

function MM_swapImage() {
	var i, j=0, x, a = MM_swapImage.arguments;
	document.MM_sr = new Array;
	for (i = 0; i < (a.length - 2); i += 3) {
	if ((x = MM_findObj(a[i])) != null) {
		document.MM_sr[j++] = x;
		if(!x.oSrc) x.oSrc = x.src;
		x.src = a[i+2];
		}
	}
}

function MM_swapImgRestore() {
	var i, x, a = document.MM_sr;
	for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function MM_preloadImages() { //v3.0
	var d = document;
	if(d.images) {
		if(!d.MM_p) {
			d.MM_p=new Array();
		}
	}

	var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
	for (i = 0; i < a.length; i++) {
		if (a[i].indexOf("#") != 0) {
			d.MM_p[j] = new Image; d.MM_p[j++].src = a[i];
		}
	}
}

function fwLoadMenus() {
	var textFont = "Arial, Helvetica, sans-serif";
	var textSize = 11;
	var textOffCol = "#CC0000";
	var textOnCol = "#ffffff";
	var bgOffCol = "#ffffff";
	var bgOnCol = "#CC0000";

	if (window.fw_menu_0) return;

	// home
	window.fw_menu_0 = new Menu("root",160,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_0.addMenuItem("xxx","location='xxx'");
	fw_menu_0.hideOnMouseOut=true;

	// household needs
	window.fw_menu_1 = new Menu("root",160,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_1.addMenuItem("Household Storage Ideas","location='household_english.htm'");
	fw_menu_1.addMenuItem("Online Storage Tips","location='tips_english.htm'");
	fw_menu_1.hideOnMouseOut=true;

	// commercial needs
	window.fw_menu_2 = new Menu("root",160,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_2.addMenuItem("Commerical Storage Ideas","location='commerical_english.htm'");
	fw_menu_2.addMenuItem("Self Storage Convenience","location='commerical_english.htm#convenience'");
	fw_menu_2.addMenuItem("Business Storage Uses","location='commerical_english.htm#business'");
	fw_menu_2.addMenuItem("Online Storage Tips","location='tips_english.htm'");
	fw_menu_2.hideOnMouseOut=true;

	// storage calculator
	window.fw_menu_3 = new Menu("root",160,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_3.addMenuItem("xxx","location='xxx'");
	fw_menu_3.hideOnMouseOut=true;

	// reserve space
	window.fw_menu_4 = new Menu("root",160,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_4.addMenuItem("xxx","location='xx.htm'");
	fw_menu_4.hideOnMouseOut=true;
	
	// locations
	window.fw_menu_5 = new Menu("root",185,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_5.addMenuItem("Halifax, NS - Brunswick","location='halifax_b_english.htm'");
	fw_menu_5.addMenuItem("Halifax, NS - Chebucto","location='halifax_c_english.htm'");
	fw_menu_5.addMenuItem("Dartmouth, NS - Tacoma Dr.","location='dartmouth_english.htm'");
	fw_menu_5.addMenuItem("Dieppe, NB - Adelard-Savoie Blvd.","location='dieppe_english.htm'");
	fw_menu_5.addMenuItem("Fredericton, NB - Acorn St.","location='fredericton_english.htm'");
	fw_menu_5.addMenuItem("Moncton, NB - Mountain Rd.","location='moncton_english.htm'");
	fw_menu_5.addMenuItem("Saint John, NB - Fairville Blvd.","location='stjohn_f_english.htm'");
	fw_menu_5.addMenuItem("Saint John, NB - Thorne Ave.","location='stjohn_t_english.htm'");
	fw_menu_5.addMenuItem("Apple Self Storage - Newmarket","location='http://applestorage.com/default.asp?pageID=398'");
	fw_menu_5.addMenuItem("Apple Self Storage - Toronto","location='http://applestorage.com/default.asp?pageID=309'");
	fw_menu_5.addMenuItem("Apple Self Storage - Waterloo","location='http://applestorage.com/default.asp?pageID=391'");
	fw_menu_5.hideOnMouseOut=true;
	
	// contact us (french / englsih)
	window.fw_menu_6 = new Menu("root",185,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_6.addMenuItem("Halifax, NS - Brunswick","location='mailto:rene.aucoin@storagepartners.ca?subject=To Halifax NS Brunswick St. from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Halifax, NS - Chebucto","location='mailto:rene.aucoin@storagepartners.ca?subject=To Halifax NS Chebucto Rd. from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Dartmouth, NS - Tacoma Dr.","location='mailto:rene.aucoin@storagepartners.ca?subject=To Dartmouth NS from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Dieppe, NB - Adelard-Savoie Blvd.","location='mailto:rene.aucoin@storagepartners.ca?subject=To Dieppe NB from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Fredericton, NB - Acorn St.","location='mailto:rene.aucoin@storagepartners.ca?subject=To Fredericton NB from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Moncton, NB - Mountain Rd.","location='mailto:rene.aucoin@storagepartners.ca?subject=To Moncton NB from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Saint John, NB - Fairville Blvd.","location='mailto:rene.aucoin@storagepartners.ca?subject=To Saint John, Fairvale Blvd. NB from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Saint John, NB - Thorne Ave.","location='mailto:rene.aucoin@storagepartners.ca?subject=To Saint John, Thorne Ave. NB from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Apple Self Storage - Newmarket","location='mailto:davis@applestorage.com?subject=To Newmarket ON from ATCAN Website Customer'");
	fw_menu_6.addMenuItem("Apple Self Storage - Toronto","location='mailto:adelaide@applestorage.com?subject=To Toronto ON from Apple Self Storage Website Customer'");
	fw_menu_6.addMenuItem("Apple Self Storage - Waterloo","location='mailto:marsland@applestorage.com?subject=To Waterloo ON from Apple Self Storage Website Customer'");
	fw_menu_6.hideOnMouseOut=true;
	
	// FRENCH MENUS - home
	window.fw_menu_7 = new Menu("root",160,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_7.addMenuItem("xxx","location='xxx'");
	fw_menu_7.hideOnMouseOut=true;
	
	// FRENCH MENUS - household needs
	window.fw_menu_8 = new Menu("root",225,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_8.addMenuItem("Idees d'entreposage pour les proprietaires","location='household_french.htm'");
	fw_menu_8.addMenuItem("Conseil d'entreposage","location='tips_french.htm'");
	fw_menu_8.hideOnMouseOut=true;

	// FRENCH MENUS - commercial needs
	window.fw_menu_9 = new Menu("root",220,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_9.addMenuItem("Suggestions d'entreposage commercial","location='commerical_french.htm'");
	fw_menu_9.addMenuItem("L'entreposage personnel","location='commerical_french.htm#convenience'");
	fw_menu_9.addMenuItem("Utilites d'entreposage commercial","location='commerical_french.htm#business'");
	fw_menu_9.addMenuItem("Conseils d'entreposage","location='tips_french.htm'");
	fw_menu_9.hideOnMouseOut=true;
	
	// FRENCH MENUS - storage calculator
	window.fw_menu_10 = new Menu("root",160,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_10.addMenuItem("xxx","location='xxx'");
	fw_menu_10.hideOnMouseOut=true;

	// FRENCH MENUS - reserve space
	window.fw_menu_11 = new Menu("root",160,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_11.addMenuItem("xxx","location='xx.htm'");
	fw_menu_11.hideOnMouseOut=true;
	
	// FRENCH locations
	window.fw_menu_12 = new Menu("root",185,17,textFont,textSize,textOffCol,textOnCol,bgOffCol,bgOnCol);
	fw_menu_12.addMenuItem("Halifax, NS - Brunswick","location='halifax_b_french.htm'");
	fw_menu_12.addMenuItem("Halifax, NS - Chebucto","location='halifax_c_french.htm'");
	fw_menu_12.addMenuItem("Dartmouth, NS - Tacoma Dr.","location='dartmouth_french.htm'");
	fw_menu_12.addMenuItem("Dieppe, NB - Adelard-Savoie Blvd.","location='dieppe_french.htm'");
	fw_menu_12.addMenuItem("Fredericton, NB - Acorn St.","location='fredericton_french.htm'");
	fw_menu_12.addMenuItem("Moncton, NB - Mountain Rd.","location='moncton_french.htm'");
	fw_menu_12.addMenuItem("Saint John, NB - Fairville Blvd.","location='stjohn_f_french.htm'");
	fw_menu_12.addMenuItem("Apple Self Storage - Newmarket","location='http://www.applestorage.com/default?pageID=398'");
	fw_menu_12.addMenuItem("Apple Self Storage - Toronto","location='http://applestorage.com/default.asp?pageID=309'");
	fw_menu_12.addMenuItem("Apple Self Storage - Waterloo","location='http://applestorage.com/default.asp?pageID=368'");
	fw_menu_12.hideOnMouseOut=true;

	fw_menu_12.writeMenus();
}

function MM_findObj(n, d) {
	var p, i, x;
	if (!d) d=document;
	if((p = n.indexOf("?")) > 0 && parent.frames.length) {
		d = parent.frames[n.substring(p+1)].document;
		n = n.substring(0,p);
	}
	if (!(x = d[n]) && d.all) x=d.all[n];
	for (i = 0; !x && i < d.forms.length; i++) x=d.forms[i][n];
	for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n,d.layers[i].document);
	if (!x && document.getElementById) x = document.getElementById(n); return x;
}
