function Defined(Value)
{
	Value = ""+Value
	
	if(Value == "null" || Value == "" || Value == "undefined" || Value == "unknown" || Value == "NaN")
		return false;
	else
		return true;
}
function IsBrowserIE()
{
	return (window.navigator.appName == "Microsoft Internet Explorer" ? true : false);
}
function Get(id)
{
	return document.getElementById(id);
}
function CreateTopNavigation(Parent, CurrentLocation)
{
	var NavigationTable = document.createElement("table");
	var MainRow = NavigationTable.insertRow(-1);
	var MainCell = MainRow.insertCell(-1);
	MainCell.align = "right";
	MainCell.style.paddingRight = "35px";
	
	var table = document.createElement("table");
	table.style.width = "auto";
	MainCell.appendChild(table);
	
	var row = table.insertRow(-1);
	var cell = null;
	
	var Locations = new Array("Home", "About", "Products", "Partners", "Contact");
	var Hrefs = new Array("default.htm", "About.htm", "Products.htm", "Partners.htm", "Contact.htm");
	
	for(var i=0; i<Locations.length; ++i)
	{
		if(Locations[i] != "Home")
		{
			cell = row.insertCell(-1);
			cell.appendChild(CreateNavigationDivider());
		}
		cell = row.insertCell(-1);
		cell.appendChild(CreateNavigationLink("Navigation", Hrefs[i], Locations[i], (CurrentLocation == Locations[i] ? true : false)));
	}
	Parent.appendChild(NavigationTable);
}
function CreateNavigationLink(Class, Href, Text, Selected)
{
	var a = document.createElement("a");
	a.className = Class;
	a.href = Href;
	
	if(Selected)
	{
		var span = document.createElement("span");
		span.className = "SelectedLocation";
		span.innerHTML = Text;
		a.appendChild(span);
	}
	else
	{
		a.innerHTML = Text;
	}
	
	return a;
}
function CreateNavigationDivider()
{
	var span = document.createElement("span");
	span.className = "NavigationDivider";
	span.innerHTML = "|";
	
	return span;
}