    
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

function addHist(args) {
	dhtmlHistory.add( args );
	refreshTitle( args );
}
function getHist() {
	//swf.setHash( document.location.hash );
	return document.location.hash;
}
function addFavorite() {
	var ver = navigator.appName;
	var num = parseInt(navigator.appVersion);
	if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
		window.external.AddFavorite( document.location.href, document.title );
	} else {
		alert("Please use Ctrl-D or the menu to bookmark n-load.com!");
		//window.focus();
		//document.getElementById("focus_link").focus();
		
		document.getElementById("mainSWF").blur();
	}
}
function setFocus() {
	document.getElementById("mainSWF").blur();
}
function showPrivacy() {
	window.open('html/privacy.html', 'nexusWindow', 'width=650,height=365,left='+ (screen.width - 650) / 2 +',top='+ (screen.height - 365) / 2 +'scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,statusbar=1');
}
function showTerms() {
	window.open('html/terms.html', 'nexusWindow', 'width=650,height=365,left='+ (screen.width - 650) / 2 +',top='+ (screen.height - 365) / 2 +'scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,statusbar=1');
}
function showNewsletter() {
	var w = window.open('html/newsletter.php', 'nexusNewsletter', 'width=365,height=320,left='+ (screen.width - 365) / 2 +',top='+ (screen.height - 365) / 2 +'scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,statusbar=1');
}
function showRSS() {
	var w = window.open('rss-feed.xml', 'rss', 'width=365,height=365,left='+ (screen.width - 365) / 2 +',top='+ (screen.height - 365) / 2 +'scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,statusbar=1');
}
function tellFriend() {
	var w = window.open('html/friend.php', 'nexusNewsletter', 'width=365,height=365,left='+ (screen.width - 365) / 2 +',top='+ (screen.height - 365) / 2 +'scrollbars=0,resizable=0,menubar=0,toolbar=0,location=0,statusbar=1');
}
function setSwfFocus()
{
	// swf.focus();
}

function swfBlur()
{
	var s = document.getElementById("mainSWF");
	s.onBlur();
}
function swfFocus()
{
	var s = document.getElementById("mainSWF");
	s.onFocus();
}

// RegEx replace
function reReplace(str, reg, rep) {
   var s = unescape(str);
   var re = new RegExp(eval(unescape(reg)));
   return s.replace(re, unescape(rep));
}
// RegEx match
function reMatch(str, reg) {
   var s = unescape(str);
   return s.match(eval(unescape(reg)));
}
// escape the values in the array because
// ExternalInterface doesn?t escape some properly
function encodeArray(arr) {
   for (var i=0; i<arr.length;i++) {
      arr[i] = escape(arr[i]);
   }
   return arr;
}

/*if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
    document.write('<script language=\"VBScript\"\>\n');
    document.write('On Error Resume Next\n');
    document.write('Sub mainSWF_FSCommand(ByVal command, ByVal args)\n');
    document.write('	Call mainSWF_DoFSCommand(command, args)\n');
    document.write('End Sub\n');
    document.write('</script\>\n');
}*/

// document.write("<a id='focus_link' href='' onclick='return false;'></a>");

