navPreLoaded = false;
imageBox = new Object();

function PreLoad() {
	imageBox.btn = new Array();

	imageBox.btn['gallery'] = new Array();
	imageBox.btn['gallery']['on'] = new Image();
	imageBox.btn['gallery']['on'].src = 'http://www.marcusfabrics.com/_borders/left/gallery_over.gif';
	imageBox.btn['gallery']['off'] = new Image();
	imageBox.btn['gallery']['off'].src = 'http://www.marcusfabrics.com/_borders/left/gallery_up.gif';
	
	imageBox.btn['features'] = new Array();
	imageBox.btn['features']['on'] = new Image();
	imageBox.btn['features']['on'].src = 'http://www.marcusfabrics.com/_borders/left/features_over.gif';
	imageBox.btn['features']['off'] = new Image();
	imageBox.btn['features']['off'].src = 'http://www.marcusfabrics.com/_borders/left/features_up.gif';
	
	imageBox.btn['makeit'] = new Array();
	imageBox.btn['makeit']['on'] = new Image();
	imageBox.btn['makeit']['on'].src = 'http://www.marcusfabrics.com/_borders/left/makeit_over.gif';
	imageBox.btn['makeit']['off'] = new Image();
	imageBox.btn['makeit']['off'].src = 'http://www.marcusfabrics.com/_borders/left/makeit_up.gif';
	
	imageBox.btn['quilt'] = new Array();
	imageBox.btn['quilt']['on'] = new Image();
	imageBox.btn['quilt']['on'].src = 'http://www.marcusfabrics.com/_borders/left/quilt_over.gif';
	imageBox.btn['quilt']['off'] = new Image();
	imageBox.btn['quilt']['off'].src = 'http://www.marcusfabrics.com/_borders/left/quilt_up.gif';
	
	imageBox.btn['designers'] = new Array();
	imageBox.btn['designers']['on'] = new Image();
	imageBox.btn['designers']['on'].src = 'http://www.marcusfabrics.com/_borders/left/designers_over.gif';
	imageBox.btn['designers']['off'] = new Image();
	imageBox.btn['designers']['off'].src = 'http://www.marcusfabrics.com/_borders/left/designers_up.gif';
	
	imageBox.btn['retailers'] = new Array();
	imageBox.btn['retailers']['on'] = new Image();
	imageBox.btn['retailers']['on'].src = 'http://www.marcusfabrics.com/_borders/left/retailers_over.gif';
	imageBox.btn['retailers']['off'] = new Image();
	imageBox.btn['retailers']['off'].src = 'http://www.marcusfabrics.com/_borders/left/retailers_up.gif';
	
	imageBox.btn['company'] = new Array();
	imageBox.btn['company']['on'] = new Image();
	imageBox.btn['company']['on'].src = 'http://www.marcusfabrics.com/_borders/left/company_over.gif';
	imageBox.btn['company']['off'] = new Image();
	imageBox.btn['company']['off'].src = 'http://www.marcusfabrics.com/_borders/left/company_up.gif';
	
	imageBox.btn['blog'] = new Array();
	imageBox.btn['blog']['on'] = new Image();
	imageBox.btn['blog']['on'].src = 'http://www.marcusfabrics.com/_borders/left/blog_over.gif';
	imageBox.btn['blog']['off'] = new Image();
	imageBox.btn['blog']['off'].src = 'http://www.marcusfabrics.com/_borders/left/blog_up.gif';
	
	imageBox.btn['contact'] = new Array();
	imageBox.btn['contact']['on'] = new Image();
	imageBox.btn['contact']['on'].src = 'http://www.marcusfabrics.com/_borders/left/contact_over.gif';
	imageBox.btn['contact']['off'] = new Image();
	imageBox.btn['contact']['off'].src = 'http://www.marcusfabrics.com/_borders/left/contact_up.gif';
	
	imageBox.btn['experts'] = new Array();
	imageBox.btn['experts']['on'] = new Image();
	imageBox.btn['experts']['on'].src = 'http://www.marcusfabrics.com/_borders/left/experts_over.gif';
	imageBox.btn['experts']['off'] = new Image();
	imageBox.btn['experts']['off'].src = 'http://www.marcusfabrics.com/_borders/left/experts_up.gif';
	
	imageBox.btn['calendar'] = new Array();
	imageBox.btn['calendar']['on'] = new Image();
	imageBox.btn['calendar']['on'].src = 'http://www.marcusfabrics.com/_borders/left/calendar_over.gif';
	imageBox.btn['calendar']['off'] = new Image();
	imageBox.btn['calendar']['off'].src = 'http://www.marcusfabrics.com/_borders/left/calendar_up.gif';
	
	imageBox.btn['guild'] = new Array();
	imageBox.btn['guild']['on'] = new Image();
	imageBox.btn['guild']['on'].src = 'http://www.marcusfabrics.com/_borders/left/guild_over.gif';
	imageBox.btn['guild']['off'] = new Image();
	imageBox.btn['guild']['off'].src = 'http://www.marcusfabrics.com/_borders/left/guild_up.gif';
	
	imageBox.btn['friends'] = new Array();
	imageBox.btn['friends']['on'] = new Image();
	imageBox.btn['friends']['on'].src = 'http://www.marcusfabrics.com/_borders/left/friends_over.gif';
	imageBox.btn['friends']['off'] = new Image();
	imageBox.btn['friends']['off'].src = 'http://www.marcusfabrics.com/_borders/left/friends_up.gif';
	
	imageBox.btn['share'] = new Array();
	imageBox.btn['share']['on'] = new Image();
	imageBox.btn['share']['on'].src = 'http://www.marcusfabrics.com/_borders/left/share_over.gif';
	imageBox.btn['share']['off'] = new Image();
	imageBox.btn['share']['off'].src = 'http://www.marcusfabrics.com/_borders/left/share_up.gif';
	
	imageBox.btn['media'] = new Array();
	imageBox.btn['media']['on'] = new Image();
	imageBox.btn['media']['on'].src = 'http://www.marcusfabrics.com/_borders/left/media_over.gif';
	imageBox.btn['media']['off'] = new Image();
	imageBox.btn['media']['off'].src = 'http://www.marcusfabrics.com/_borders/left/media_up.gif';
	
	imageBox.btn['trends'] = new Array();
	imageBox.btn['trends']['on'] = new Image();
	imageBox.btn['trends']['on'].src = 'http://www.marcusfabrics.com/_borders/left/trends_over.gif';
	imageBox.btn['trends']['off'] = new Image();
	imageBox.btn['trends']['off'].src = 'http://www.marcusfabrics.com/_borders/left/trends_up.gif';
	
	imageBox.btn['charity'] = new Array();
	imageBox.btn['charity']['on'] = new Image();
	imageBox.btn['charity']['on'].src = 'http://www.marcusfabrics.com/_borders/left/charity_over.gif';
	imageBox.btn['charity']['off'] = new Image();
	imageBox.btn['charity']['off'].src = 'http://www.marcusfabrics.com/_borders/left/charity_up.gif';
	
	imageBox.btn['press'] = new Array();
	imageBox.btn['press']['on'] = new Image();
	imageBox.btn['press']['on'].src = 'http://www.marcusfabrics.com/_borders/left/press_over.gif';
	imageBox.btn['press']['off'] = new Image();
	imageBox.btn['press']['off'].src = 'http://www.marcusfabrics.com/_borders/left/press_up.gif';
	
	imageBox.btn['distributor'] = new Array();
	imageBox.btn['distributor']['on'] = new Image();
	imageBox.btn['distributor']['on'].src = 'http://www.marcusfabrics.com/_borders/left/distributor_over.gif';
	imageBox.btn['distributor']['off'] = new Image();
	imageBox.btn['distributor']['off'].src = 'http://www.marcusfabrics.com/_borders/left/distributor_up.gif';
	
	imageBox.btn['representatives'] = new Array();
	imageBox.btn['representatives']['on'] = new Image();
	imageBox.btn['representatives']['on'].src = 'http://www.marcusfabrics.com/_borders/left/representatives_over.gif';
	imageBox.btn['representatives']['off'] = new Image();
	imageBox.btn['representatives']['off'].src = 'http://www.marcusfabrics.com/_borders/left/representatives_up.gif';
	
	imageBox.btn['international'] = new Array();
	imageBox.btn['international']['on'] = new Image();
	imageBox.btn['international']['on'].src = 'http://www.marcusfabrics.com/_borders/left/international_over.gif';
	imageBox.btn['international']['off'] = new Image();
	imageBox.btn['international']['off'].src = 'http://www.marcusfabrics.com/_borders/left/international_up.gif';

	// nav rollovers top section
	
	imageBox.btn['store_directory'] = new Array();
	imageBox.btn['store_directory']['on'] = new Image();
	imageBox.btn['store_directory']['on'].src = 'http://www.marcusfabrics.com/_borders/top/store_directory.gif';
	imageBox.btn['store_directory']['off'] = new Image();
	imageBox.btn['store_directory']['off'].src = 'http://www.marcusfabrics.com/_borders/top/store_directory.gif';
	
	imageBox.btn['domestic_stores'] = new Array();
	imageBox.btn['domestic_stores']['on'] = new Image();
	imageBox.btn['domestic_stores']['on'].src = 'http://www.marcusfabrics.com/_borders/top/domestic_stores_over.gif';
	imageBox.btn['domestic_stores']['off'] = new Image();
	imageBox.btn['domestic_stores']['off'].src = 'http://www.marcusfabrics.com/_borders/top/domestic_stores_up.gif';
	
	imageBox.btn['international_stores'] = new Array();
	imageBox.btn['international_stores']['on'] = new Image();
	imageBox.btn['international_stores']['on'].src = 'http://www.marcusfabrics.com/_borders/top/international_stores_over.gif';
	imageBox.btn['international_stores']['off'] = new Image();
	imageBox.btn['international_stores']['off'].src = 'http://www.marcusfabrics.com/_borders/top/international_stores_up.gif';
	
	imageBox.btn['online_stores'] = new Array();
	imageBox.btn['online_stores']['on'] = new Image();
	imageBox.btn['online_stores']['on'].src = 'http://www.marcusfabrics.com/_borders/top/online_stores_over.gif';
	imageBox.btn['online_stores']['off'] = new Image();
	imageBox.btn['online_stores']['off'].src = 'http://www.marcusfabrics.com/_borders/top/online_stores_up.gif';
	
	imageBox.btn['add_store'] = new Array();
	imageBox.btn['add_store']['on'] = new Image();
	imageBox.btn['add_store']['on'].src = 'http://www.marcusfabrics.com/_borders/top/add_store_over.gif';
	imageBox.btn['add_store']['off'] = new Image();
	imageBox.btn['add_store']['off'].src = 'http://www.marcusfabrics.com/_borders/top/add_store_up.gif';
	
	navPreLoaded = true;	
}

function ImageOn (name,tabFlag) {
	if (!navPreLoaded) return;
	if (!tabFlag) document.images[name].src = imageBox.btn[name]['on'].src;
}

function ImageOff (name,tabFlag) {
	if (!navPreLoaded) return;
	if (!tabFlag) document.images[name].src = imageBox.btn[name]['off'].src;
}


if (navigator.appName.indexOf("Mic") != -1) {
		var menus = [
		new ypSlideOutMenu("menu1", "down", 171, 102, 120, 59*5.5),
		new ypSlideOutMenu("menu2", "right", 150, 227, 150, 40*6.5),
		new ypSlideOutMenu("menu3", "right", 150, 327, 150, 97),
		new ypSlideOutMenu("menu4", "right", 150, 327, 150, 97)
	]
	}
	else {
		var menus = [
		new ypSlideOutMenu("menu1", "down", 171, 102, 120, 59*5.5),
		new ypSlideOutMenu("menu2", "right", 150, 227, 150, 40*6.5),
		new ypSlideOutMenu("menu3", "right", 150, 327, 150, 97),
		new ypSlideOutMenu("menu4", "right", 150, 327, 150, 97)
	]
	}
	
	for (var i = 0; i < menus.length; i++) {
		menus[i].onactivate = new Function("document.getElementById('act" + i + "').className='active';");
		menus[i].ondeactivate = new Function("document.getElementById('act" + i + "').className='';");
	}

  ypSlideOutMenu.writeCSS();