var win;

function popup(mylink, windowname)
{
	if (! window.focus)return true;
	//var href;
	//if (typeof(mylink) == 'string')
	 //  var href=mylink;
	//else
	//   href=mylink.href;
	mylink = new String( mylink );
	
	//window.open(href, windowname, 'width=400,height=600,scrollbars=yes,resizable=yes');
	win = window.open(mylink, windowname, 'fullscreen=no,toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=yes,width=424,height=624');
	
	win.focus();
	
	return false;
}

function popupimage(mylink, windowname)
{
	if (! window.focus)return true;
	//var href;
	//if (typeof(mylink) == 'string')
	 //  var href=mylink;
	//else
	//   href=mylink.href;
	mylink = new String( mylink );
	
	//window.open(href, windowname, 'width=400,height=600,scrollbars=yes,resizable=yes');
	win = window.open(mylink, windowname, 'fullscreen=no,toolbar=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,directories=no,location=yes,width=800,height=635');
	
	win.focus();
	
	return false;
}

function testFormInput(){
	var error_msg = "";
	if (document.hcontactform.name.value=="") {error_msg += "-You must provide a NAME\n";}
	if (document.hcontactform.email.value=="") {error_msg += "-You must provide an EMAIL\n";}
	if (document.hcontactform.phone.value=="") {error_msg += "-You must provide a PHONE NUMBER\n";}
	
	if (error_msg!="") {
		error_msg="Please fix the following mistakes in the form:\n\n" + error_msg;
		alert(error_msg);
		return false;
	}else {return true;}			
	
}

var rolovers = new Array('img/navbg_red.gif');
	function preloadImages() {
		for(var i=0; i<rolovers.length; i++) {
			(new Image()).src = rolovers[i];
		}
	}




/*******************************************************************************\
 FUNCTION: showToolTip
 PARAMETERS:	tipItem - the item ID to show
 RETURNS: 	none
 Shows the tool tip associated with the item that calls this method
\*******************************************************************************/
function showToolTip( tipItem ) {
	if( currentTip != "") document.getElementById( currentTip ).style.display="none";
	document.getElementById( tipItem ).style.display="block";
	currentTip = tipItem;
}

/*******************************************************************************\
 FUNCTION: hideToolTip
 PARAMETERS:	tipItem - the item ID to hide
 RETURNS: 	none
 Hides the tool tip associated with the item that calls this method
\*******************************************************************************/
function hideToolTip( tipItem ) {
	if( currentTip != "" ){
		document.getElementById( currentTip ).style.display="none";
		currentTip = "";
	}
}