<!--

//Function to check/compare string, find browser and find version located 2 characters after it
function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

//Drop userAgent to all lower case
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
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('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else 
{
browser = "An unknown type browser";
version = "Unkown version";
}
//Get the version
if (!version) version = detect.charAt(place + thestring.length);
//Get the Operating system
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";
}

if (OS == "Windows") {
	if (browser == "Internet Explorer") {
		document.write('<link rel="stylesheet" href="http://the.honoluluadvertiser.com/inc/lib/css_honadv/wie_style.css" type="text/css">');
		var layer = '<DIV ID="VertAdSpace">';
		var endlayer = '</DIV>';
	} else if (browser == "Netscape Navigator" && version < "5") {
		document.write('<link rel="stylesheet" href="http://the.honoluluadvertiser.com/inc/lib/css_honadv/wnc_style.css" type="text/css">');
		var layer = '<layer id="mylayer" left=620px top=98px bgColor="#666666">';
		var endlayer = '</layer>';
	} else if (browser == "Netscape Navigator" && version >= "5"){
		document.write('<link rel="stylesheet" href="http://the.honoluluadvertiser.com/inc/lib/css_honadv/wnc_style.css" type="text/css">');
		var layer = '<DIV ID="VertAdSpace">';
		var endlayer = '</DIV>';
	} else {
		document.write('<link rel="stylesheet" href="http://the.honoluluadvertiser.com/inc/lib/css_honadv/wie_style.css" type="text/css">');
		var layer = '<DIV ID="VertAdSpace">';
		var endlayer = '</DIV>';
	}
} else {
	if (browser == "Internet Explorer" && version >= "5") {
		document.write('<link rel="stylesheet" href="http://the.honoluluadvertiser.com/inc/lib/css_honadv/mie_style.css" type="text/css">');
		var layer = '<DIV ID="VertAdSpace">';
		var endlayer = '</DIV>';
	} else if (browser == "Netscape Navigator" && version < "5"){
		document.write('<link rel="stylesheet" href="http://the.honoluluadvertiser.com/inc/lib/css_honadv/mnc_style.css" type="text/css">');
		var layer = '<layer id="mylayer" left=620px top=98px bgColor="#666666">';
		var endlayer = '</layer>';
	} else if (browser == "Netscape Navigator" && version >= "5"){
		document.write('<link rel="stylesheet" href="http://the.honoluluadvertiser.com/inc/lib/css_honadv/mns_style.css" type="text/css">');
		var layer = '<DIV ID="VertAdSpace">';
		var endlayer = '</DIV>';
	} else {
		document.write('<link rel="stylesheet" href="http://the.honoluluadvertiser.com/inc/lib/css_honadv/mie_style.css" type="text/css">');
		var layer = '<DIV ID="VertAdSpace">';
		var endlayer = '</DIV>';
	}
}


function makewin (targurl, width, height, winopts) {
  if (navigator.userAgent.indexOf("MSIE 3.0") == -1 && navigator.appVersion.indexOf("2.0") == -1)
    {
      if (window.sidebars == null)
	{
	  sidebars = new Object;
	  sidebars.length = 5;
	}
      allopts = "width=" + width + ",height=" + height + "," + winopts;
      var tempref = window.open(targurl, "sidebar2" + sidebars.length, allopts);      
      sidebars[sidebars.length] = tempref;
      sidebars.length++;
    }
  else
    {
      self.location.href = targurl;
    }
}
function killwins() {
  if (navigator.userAgent.indexOf("MSIE 3.0") != -1 && window.sidebars != null)
    {
      for (i = 1; i < sidebars.length; i++)
	{
	  sidebars[i].close();
	}
    }
}

var gt = unescape('%3e');

function go(input) {
  var form = input.form;
  form.take.value = form.desc.value;
}

function se(input) {
  var form = input.form;
  form.take.value = "null";
}

function search(form) {
  if (form.take.value == form.desc.value) {
    take = form.take.value;
    window.location.href = take;
 }  else {
    pre = form.pre.value;
    pre += escape(form.query.value);
    pre += escape(form.post.value);
    window.location.href = pre;
 }
}

function jump(url) {
  window.location.href = url;
}

function a(input) {
  var form = input.form;
  form.pre.value = "http://advertiser.prasso.com/?query=";
  form.post.value = "";
  form.desc.value = "http://advertiser.prasso.com/";
}

function b(input) {
  var form = input.form;
  form.pre.value = "http://nl.newsbank.com/nl-search/we/Archives?s_site=honoluluadvertiser&p_product=HNAB&p_theme=gannett&p_action=search&p_field_base-0=&Search=Search&p_text_base-0=";
  form.post.value = "";
  form.desc.value = "http://nl.newsbank.com/nl-search/we/Archives?s_site=honoluluadvertiser&p_product=HNAB&p_theme=gannett&p_action=keyword";
}

function c(input) {
  var form = input.form;
  form.pre.value = "http://classifieds.honoluluadvertiser.com/osform/MVCCService?osform_template=%2Fstandard%2Fquery.oft&lastMessage=defaultInstructions&sortAttribute=summary&branding=honolulu&fastSearchHelp=&fullTextHelp=&adDescription_regex=";
  form.post.value = "";
  form.desc.value = "http://classifieds.honoluluadvertiser.com/";
}

var gnsSite="honoluluadvertiser";

function clear_textbox()
{
if (document.form.query.value == "keywords")
document.form.query.value = "";
}

function reset_textbox()
	{
		if (document.SearchBox.keywords.value == " Search")
			document.SearchBox.keywords.value = "";
	}

//-->
