﻿//Search Tabs
var myTabs = new Array("TabLocation", "TabKeyword", "TabMap");

function Tab(index) {
    for (var i = 0; i < myTabs.length; i++) {
        hideTab(i);
    }
    showTab(index);    
}

function hideTab(index) {
    var obj = document.getElementById(myTabs[index]);
    var objLi = document.getElementById("li" + myTabs[index]);
    if (obj) {
        objLi.className = "";
        obj.className = "hiddenTab";
    }
}

function showTab(index) {
    var obj = document.getElementById(myTabs[index]);
    var objLi = document.getElementById("li" + myTabs[index]);
    if (obj) {
        objLi.className = "active";
        obj.className = "visibleTab";
    }
}

function newWindow(theURL,winName,width,height) {
  if (typeof(width) == "undefined") width = '659';
  if (typeof(height) == "undefined") height = '600';

  var l = (screen.width - width) / 2;
  var t = (screen.height - height) / 2;
  var newWin = window.open(theURL,winName,'scrollbars=yes,width=' + width + ',height=' + height + ',resizable=no,location=no,menubar=yes,screenX=' + l + ',screenY=' + t + ',top=' + t + ',left=' + l);
  newWin.focus();
  return false;
}