//Drop down menu
 var h;
 var w;
 var l;
 var t;
 var topMar = 7;
 var leftMar = -25;
 var space = 1;
 var isvisible;
 var MENU_SHADOW_COLOR='#999999';//menu shadow color
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array

function HideMenu() 
{
 	var mX;
 	var mY;
 	var vDiv;
 	var mDiv;
	if (isvisible == true)
	{
		vDiv = document.all("menuDiv");
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight))
		{
			vDiv.style.visibility = "hidden";
			isvisible = false;
		}
	}
}

function ShowMenu(vMnuCode,tWidth) 
{
	vSrc = window.event.srcElement;
	vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=tablebody1 valign=top >" + vMnuCode + "</td></tr></table>";

	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+4;
	t = vSrc.offsetTop + topMar + h + space-2;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menuDiv.innerHTML = vMnuCode;
	menuDiv.style.top = t;
	menuDiv.style.left = l;
	menuDiv.style.visibility = "visible";
	isvisible = true;
    makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}
function makeRectangularDropShadow(el, color, size)
{
	var i;
	for (i=size; i>0; i--)
	{
		var rect = document.createElement('div');
		var rs = rect.style
		rs.position = 'absolute';
		rs.left = (el.style.posLeft + i) + 'px';
		rs.top = (el.style.posTop + i) + 'px';
		rs.width = el.offsetWidth + 'px';
		rs.height = el.offsetHeight + 'px';
		rs.zIndex = el.style.zIndex - i;
		rs.backgroundColor = color;
		var opacity = 1 - i / (i + 1);
		rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
		el.insertAdjacentElement('afterEnd', rect);
		global.fo_shadows[global.fo_shadows.length] = rect;
	}
}

//Drop down End
//var multimedia0 = '<a href=\"gxsj.htm#03\">• index1</a><br><a href=\"gxsj.htm#02\">• index2</a><br><a href=\"index.html#01\">• index3</a><br><a href=\"zwjs.htm#04\">• index4</a><br><a href=\"http://www.jonahome.net/count/index.asp\" target=blank>• index5</a>'

//Home
var multimedia1 = '<a href=\"../permanent_materials.htm\">• Magnet Materials</a><br><a href=\"../flexiblelist.htm\">• Flexible Magnets</a><br><a href=\"../devicelist.htm\">• Magnetic Devices</a><br><a href=\"../hardwarelist.htm\">• Magnetic Hardware</a><br><a href=\"../educationlist.htm\">• Magnetic Education & Toys</a>'

//Magnets
var multimedia2 = '<a href=\"../products.htm\">• Products By Use</a><br><a href=\"../contact.htm\">• Custome Products</a><br><a href=\"../product_list.htm\">• Products A-Z</a><br><a href=\"#.htm\">• New Products</a>'

//Products
var multimedia3 = '<a href=\"../glossary.htm\">• Magnets Glossary</a><br><a href=\"../book.htm\">• Books</a>'

//About Us
var multimedia4 = '<a href=\"../about.htm\">• About Us</a><br><a href=\"../contact.htm\">• Online Contact</a><br><a href=\"mailto:sales@allmagnetics.com\">• E-Mail</a><br><a href=\"http://maps.yahoo.com/maps_result?ed=qdiV8.p_0Tqo4cvqFHdtJqsPO6OedDRKSQ--&csz=Anaheim%2C+CA+92806&country=us&new=1&name=&qty= \" target=blank>• Drive Direction</a><br><a href=\"../jobs.htm\">• Jobs</a>'

//Contact Us
var multimedia5 = '<a href=\"../contact.htm\">• On Line Form</a><br><a href=\"../about.htm\">• Address</a><br><a href=\"mailto:sales@allmagnetics.com\">• E-Mail To Us</a>'

//Order
var multimedia6 = '<a href=\"../order_form.htm\">• Order Form On Line</a><br><a href=\"../contact.htm\">• Get A Quote</a>'

//Catalog
var multimedia7 = '<a href=\"../cataloglist.htm\">• Download Online</a><br><a href=\"../contact.htm\">• Require On line</a><br><a href=\"../products.htm\">• Information On Line</a>'

//List1
var multimedia8 = '<a href=\"http://www.jonahome.org/bbs/index.asp\" target=blank>• ½»Á÷ÂÛÌ³</a><br><a href=\"http://www.jonahome.org/jiaoyou/index.asp\" target=blank>• ÍøÉÏ½»ÓÑ</a><br><a href=\"http://346746.chat.yinsha.com\" target=blank>• Ö÷ÄÚÁÄÌì</a><br><a href=\"http://www.jonahome.net/diary\" target=blank>• ÐÄÇéÈÕ¼Ç</a><br><a href=\"http://www.jonahome.org/bbs/card/index.asp\" target=blank>• ºØ¿¨´«Çé</a><br><a href=\"http://www.jonahome.net/qiyuan/wish.asp\" target=blank>• ÆíÔ¸×£¸£</a><br><a href=../flexible/main.js target=blank>• ¸øÎÒÁôÑÔ</a>'