<!-----------------------------------------------------------------------
/***************************************************************
Navigation and Setting Hidden Values.
***************************************************************/
//homepage flash calls this
function popup()
{
	OTW('/Tour/default.aspx');
};

function Quote()
{
	var q = GetElementById("quoteDiv");
	if(q)
	{
		q.innerHTML = '"' + headerQuoteString + '"<div id="quoteAuthor" class="CustomerQuoteAuthor" style="margin:0px 0px 0px 0px;"> -' + headerQuoteAuthor + '</div>';
	}
};


/**********************************************************
Image Changing Functions
**********************************************************/

//STW 2003-04-27 override the previous one, which does not work on Tree's for whatever reason.  
function ChangeImage(sImageId, sImageName)
{
	if(document.images && document[sImageId] && eval("window."+sImageName))
	{
		document[sImageId].src = eval(sImageName + ".src");
	}
}
function ChangeInputImage(inputImage,imgObjName)
{
	//If the browser supports rollovers then change the image.
	if (document.getElementById)
	{
		inputImage.src = eval(imgObjName + ".src");
	}
}
//swaps an image inside a hyperlink
function HyperLinkSwapImage(element, imageUrl)
{
	if(element)
	{
		element.src = imageUrl;
	}
}

function CancelLink()
{
	return false;
}




function FocusOnElement(elementToFocusName)
{

	if(elementToFocusName)
	{
		if(elementToFocusName != "")
		{
			var focusElement = GetElementById(elementToFocusName);
			if(focusElement)
			{
				if(focusElement.style)
				{
					if(focusElement.style.display != "none")
					{
						focusElement.focus();
					}
				}
			}
		}
	}
}




//----------------------------------------------------------------------->

function IsNetscape()
{
	
	if(IsSafari())
	{
		return false;
	}
	else
	{
		if(navigator.appName.toLowerCase().indexOf("netscape") > -1)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}
function IsSafari()
{
	if(navigator.userAgent.toLowerCase().indexOf("safari") > -1)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function ClearSearchOnFocus(element)
{
	if(element)
	{
		if(element.value == "Quick Search")
		{
			element.value = "";
		}
	}
}


//open feature window
function OFW(link)
{
	var newwindow = window.open(link, 'FeaturesWindow', 'toolbars=yes, width=801, height=695, resizable=no');
	if (window.focus) {newwindow.focus()};
	return false;
}

//open tour window
function OTW(link)
{
	var newwindow = window.open(link, 'TourWindow', 'toolbars=no, statusbar=no, scrollbars=yes, width=1012, height=695, resizable=yes');
	if (window.focus) {newwindow.focus()};
	return false;
}

