<!--
function show_drop_menu(menu_id, link_id)
{
    if (document.getElementById(menu_id)) {
        var left = getOffsetLeft(link_id) - 1 + 'px';
        var top = getOffsetTop(link_id) + document.getElementById(link_id).offsetHeight + 'px';
        document.getElementById(menu_id).style.left = left;
        document.getElementById(menu_id).style.top = top;
        document.getElementById(link_id).style.backgroundColor = '#BBBBBB';
        document.getElementById(menu_id).style.visibility = 'visible';
    }
}

function hide_drop_menu(menu_id, link_id)
{
    if (document.getElementById(menu_id)) {
        document.getElementById(menu_id).style.visibility = 'hidden';
        document.getElementById(link_id).style.backgroundColor = '';
    }
}

function getOffsetTop(element)
{
    el = document.getElementById(element);
    xPos = el.offsetTop;
    tempEl = el.offsetParent;
    while (tempEl != null) {
        xPos += tempEl.offsetTop;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

function getOffsetLeft(element)
{
    el = document.getElementById(element);
    xPos = el.offsetLeft;
    tempEl = el.offsetParent;
    while (tempEl != null) {
        xPos += tempEl.offsetLeft;
        tempEl = tempEl.offsetParent;
    }
    return xPos;
}

function pop_up(page)
{
    var options = 'width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,copyhistory=no,resizable=yes';
    pop_up_window = window.open(page,'popup',options);
}

var time=new Date();
var year=time.getYear();

function clearField(theText) {
 theText.value="";
}

function validateForm() {
	var FieldList = "";
	 
	// First Name validation.
	if (document.insert.first.value == "")
	{
		FieldList = "First Name\n"; // Message to user.
	}

	// Last Name validation.
	if (document.insert.last.value == "")
	{
		FieldList = FieldList + "Last Name\n"; // Message to user.
	}
	
	// Phone or Email validation.
	if ((document.insert.phone.value == "") && (document.insert.email.value == ""))
	{
		FieldList = FieldList + "Phone or Email\n"; // Message to user.
	}

	// Other validations go here. Copy from above.
	var x = document.insert.email.value;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (x == "" || filter.test(x)) 
	{
		if (FieldList == "")  
			document.insert.submit();
		else
			alert("We did not get all the information we need from you.\n\n Please fill in the following field(s):\n\n" + FieldList);	
	}
	else
	{
		if (x != "") 
				{
					if (filter.test(x));
					else alert('Your email address is not in the correct format.  Please change it and hit submit again.');
				}
	}
}

function TestDataCheck() {
	var FieldList = "";
	 
	//Your Name validation.
	if (document.nominsert.name.value == "")
	{
		FieldList = "Your Name\n"; // Message to user.
	}
	
	//Your Phone validation.
	if (document.nominsert.phone.value == "")
	{
		FieldList = FieldList + "Your Phone Number\n"; // Message to user.
	}
	
	//Nom Name validation.
	if (document.nominsert.nameNom.value == "")
	{
		FieldList = "Your Name\n"; // Message to user.
	}

	//Nom Phone validation.
	if (document.nominsert.phoneNom.value == "")
	{
		FieldList = FieldList + "Your Phone Number\n"; // Message to user.
	}

	//Nom Position validation.
	if (document.nominsert.position.value == "")
	{
		FieldList = FieldList + "Position\n"; // Message to user.
	}

	if (FieldList == ""){
		document.insert.submit();
	}else{
		alert("We did not get all the information we need from you.\n\n Please fill in the following field(s):\n\n" + FieldList);	
	}
}

//-->

