var n = navigator;
var majorVer = parseInt(n.appVersion);
var browserMake = n.appName;
var ie4 = 0, ie5 = 0, ns4 = 0;

if(browserMake.indexOf("Netscape"))
{
	if(majorVer == 4)
		ns4 = 1;
}
else if(browserMake.indexOf("Microsoft"))
{
	if(majorVer == 4)
		ie4 = 1;
	else if (majorVer == 5)
		ie5 = 1;
}

function checkBrowser()
{
	var supported = ie4 + ie5 + ns4;

	if(!supported)
		alert("We're sorry, but this feature is not supported by your browser.\n\n(According to the latest data from Statmarket.com, this feature is supported for over 98% of Internet users.  We do not have the resources to write code that will work for a larger demographic than this.)");

	return supported;
}

function showDefinition(strTitle, strDescription)
{
	var descWindow = window.open("","descWindow","directories=no,height=250,left=150,location=no,menubar=no,resizable=yes,scrollbars=yes,status=yes,toolbar=no,top=200,width=400");
	var outputHTML;

	outputHTML = '<html><head><title>Nepthys One - Definition</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" type="text/css" href="/n1style.css"></head>'
			+ '<body link="#005F79" vlink="#6699AA" alink="#0066FF" topmargin="4" bgcolor="#FBFBF0" text="#000000">'
			+ '<p class="stdSubHeading">' + strTitle + '</p>'
			+ '<p class="textNormal">' + strDescription + '</p>'
			+ '<p class="textNormal"><a href="javascript:self.close();">Close this window</a></p>';

	with(descWindow.document)
	{
		open();
		write(outputHTML);
		close()
	}
	
}

function launchDef(strDefID)
{
	switch(strDefID.toLowerCase())
	{
		case("twink"):
			showDefinition("Twink","A new character started by a veteran player and thus equipped from the start with curiously powerful hand-me-down items, usually including very good uniques.");
		default:
			;
	}
}
