// Google AJAX Search API Start
function LoadNewsBar()
{
  var newsBar;
  var options = {
    largeResultSet : false,
//    title : "Malaysia News",
    horizontal : false,
	linkTarget : GSearch.LINK_TARGET_TOP,
    autoExecuteList : {
      executeList : ["malaysia crime", "malaysia news"]
    }
  }
  newsBar = new GSnewsBar(document.getElementById("newsBar-bar"), options);
}
// arrange for this function to be called during body.onload
// event processing
GSearch.setOnLoadCallback(LoadNewsBar);
// Google AJAX Search API End

function toggleLayer(whichLayer)
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
    elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if (vis.display == '' && elem.offsetWidth != undefined && elem.offsetHeight != undefined)
    vis.display = (elem.offsetWidth != 0 && elem.offsetHeight != 0)?'block':'none';
  vis.display = (vis.display == '' || vis.display == 'block')?'none':'block';
}

function googleFirefoxReferAd()
{
  if (ie) {
    document.write("<div id=\"firefoxreferer\" style=\"display:block;\"><p>There is a faster and safer web browser than Internet Explorer.<br\/>Try <b>Mozilla Firefox<\/b>, click on the banner below!<br\/>\r");
document.write("<a href=\"http:\/\/www.mozilla.com\/firefox?from=sfx&uid=187103&t=306\">\r");
document.write("<img width=\"110\" height=\"32\" border=\"0\" alt=\"Get Firefox Now!\" src=\"http:\/\/sfx-images.mozilla.org\/affiliates\/Buttons\/firefox3\/110x32_get_ffx.png\" \/" + "><" + "\/a" + "><" + "\/p" + "><" + "\/div" + ">\r");
    // setTimeout('toggleLayer(\'firefoxreferer\');', 20000);
  }
}

function catGo(link)
{
  if (link != "")
    window.location.href = link;
}

function frmgsscheck()
{
  if ((document.frmgss.q.value == "") || (document.frmgss.q.value == "type here..."))
  {
    alert("Please enter search terms.");
    return false;
  }
  else
    return true;
}
