var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (checkIt('safari')) 
{
	browser = "Safari";
	version = detect.charAt(8);
}
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

function init() {
  setTimeout("window.onresize = redo", 1000);
}

function redo() {
  window.location.reload();
}

if (version == "4" && browser == "Netscape Navigator") { 
	if (OS == "Windows") {
		//enlarge small fonts!
		document.write("<LINK REL=stylesheet HREF=\"js/ns4pc.css\" TYPE=\"text/css\">");
	} else {
		document.write("<LINK REL=stylesheet HREF=\"js/ns4mac.css\" TYPE=\"text/css\">");
	}
} else {
	document.write("<LINK REL=stylesheet HREF=\"js/main.css\" TYPE=\"text/css\">");
}

if (version == "4" && browser == "Netscape Navigator") { 
	window.onload = init();
}

if (version < 5) { 
	location='upgrade.html';
}

function external() {
	extWindow = window.open('','second','toolbar=yes,status=yes,scrollbars=yes,location=yes,menubar=yes,directories=yes,resizable=yes');
	extWindow.focus();
}

function pop(width,height) {
	var args = 'width='+width+',height='+height+',resizable=yes,scrollbars=auto';
	popWindow = window.open('','popup',args);
	window.name = 'main';
	popWindow.focus();
}

if(document.images) {
n_home_off=new Image();
n_home_on=new Image();
n_bio_off=new Image();
n_bio_on=new Image();
n_resume_off=new Image();
n_resume_on=new Image();
n_audio_off=new Image();
n_audio_on=new Image();
n_photos_off=new Image();
n_photos_on=new Image();
n_lyrics_off=new Image();
n_lyrics_on=new Image();
n_contact_off=new Image();
n_contact_on=new Image();
n_home_off.src="images/n_home_off.gif";
n_home_on.src="images/n_home_on.gif";
n_bio_off.src="images/n_bio_off.gif";
n_bio_on.src="images/n_bio_on.gif";
n_resume_off.src="images/n_resume_off.gif";
n_resume_on.src="images/n_resume_on.gif";
n_audio_off.src="images/n_audio_off.gif";
n_audio_on.src="images/n_audio_on.gif";
n_photos_off.src="images/n_photos_off.gif";
n_photos_on.src="images/n_photos_on.gif";
n_lyrics_off.src="images/n_lyrics_off.gif";
n_lyrics_on.src="images/n_lyrics_on.gif";
n_contact_off.src="images/n_contact_off.gif";
n_contact_on.src="images/n_contact_on.gif";
}