function IK_CheckEmail(email){
// Email Address
  var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,9}(?:\.[a-z]{2})?)$/i;
  if ( filter.test(email))
        return true;
  else return false;
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}
/*

===================================================
XHTML/CSS/DHTML Semantically correct drop down menu
===================================================
Author: Sam Hampton-Smith
Site: http://www.hampton-smith.com

Description:	This script takes a nested set of <ul>s
		and turns it into a fully functional
		DHTML menu. All that is required is
		the correct use of class names, and
		the application of some CSS.

Use:		Please leave this information at the
		top of this file, and it would be nice
		if you credited me/dropped me an email
		to let me know you have used the menu.
		sam AT hampton-smith.com


---------------------------------------------------
Credits: 	Inspiration/Code borrowed from Dave Lindquist (http://www.gazingus.org)
		Menu hide functionality was aided by some code I found on http://www.jessett.com/

*/
function FormOff()
{
	var selNodes = document.getElementsByTagName('select')
	var i=0;
	if (!selNodes.item(0))
		{
		return false;
		}
	else
		{
		do{/*selNodes.item(i).style.visibility = 'hidden';*/}
		while(++i < selNodes.length);
		}
}

function FormOn()
{
	var selNodes = document.getElementsByTagName('select')
	var i=0;
	if (!selNodes.item(0))
		{
		return false;
		}
	else
		{
		do{selNodes.item(i).style.visibility = 'visible';}
		while(++i < selNodes.length);
		}
}

var currentMenu = null;
var mytimer = null;
var timerOn = false;
var opera = window.opera ? true : false;

if (!document.getElementById)
	document.getElementById = function() { return null; }

function initialiseMenu(menuId, starterId) {
	var menu = document.getElementById(menuId);
	var starter = document.getElementById(starterId);

	if (menu == null)
	{

		return;
	}

	if(starter == null)
	{

		return;
	}

		currentMenu = menu;

	starter.onmouseover = function() {
		if (currentMenu) {
			currentMenu.style.visibility = "hidden";
			currentMenu = null;
			this.showMenu();
			stopTime();
			}
	}

	menu.onmouseover = function() {
		if (currentMenu) {
			currentMenu.style.visibility = "hidden";
			currentMenu = null;
			this.showMenu();
			}
	}

	starter.showMenu = function() {
		FormOff();
		if (!opera) {
			menu.style.left = this.offsetLeft + "px";
			menu.style.top = this.offsetTop + this.offsetHeight + "px";
		}
		else {
			menu.style.left = this.offsetLeft + "px";
			menu.style.top = this.offsetHeight + "px";
		}
		menu.style.visibility = "visible";
		currentMenu = menu;
	}

	starter.onfocus	 = function() {
		this.onmouseover();
	}

	starter.onblur	 = function() {
		this.onmouseout();
	}

	menu.showMenu = function() {
		FormOff();
		menu.style.visibility = "visible";
		currentMenu = menu;
		stopTime();
	}

	menu.hideMenu = function()  {
		if (!timerOn) {
			 mytimer = setTimeout("killMenu('" + menuId + "');", 250);
			timerOn = true;
			timer2On = true;
		}
	}

	menu.onmouseout = function(event) {
		this.hideMenu();
	}

	starter.onmouseout = function() {
		menu.hideMenu();
	}
}
function killMenu(amenu) {
	FormOn();
	var menu = document.getElementById(amenu);
	menu.style.visibility = "hidden";
	stopTime();

}
function stopTime() {
	if (mytimer) {
		 clearTimeout(mytimer);
		 mytimer = null;
		 timerOn = false;
	}
}

