// constants
_blank = "_blank"


// js functions

function openPopup(iSID) {
    var sPath = 'popup.asp?SID='+iSID;
    myPopup = window.open(sPath,'popup','width=500,height=600');
}

function openPopupByKWD(sKWD) {
    var sPath = 'popup.asp?KWD='+sKWD;
    void(window.open(sPath,'popup','width=500,height=600'));
}

function PopupNoBar (W, H, Url){
  var Position;
  var Browser = navigator.appName;
  var Version = parseInt(navigator.appVersion);
  if ((Browser == "Netscape" & Version >= 4) ||
      (Browser == "Microsoft Internet Explorer" & Version >= 4)){
    ScrH = screen.height;
    ScrW = screen.width;
  } else {
    ScrH = 0;
    ScrW = 0;
  }
  var Border = 20;
  if ((ScrH > 0) && (ScrW > 0)) Position = ",left="+(ScrW - W - Border)+",top="+(Border);
  else Position = "";
  var NewWin = window.open(Url, '_blank', "toolbar=no,location=no,width="+W+",height="+H+",directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes"+Position);
  if (NewWin) return (false);
  else return (true);
}


// redirect browser to the selected value from the List (where you must set: onchange="GoToValue(this)")
function GoToValue(List){
  if (List.selectedIndex >= 0){
    var ValueURL = List.options[List.selectedIndex].value;
    // if value is not set, do nothing
    if (ValueURL){
      if (GoToValue.arguments.length > 1){
        PopupNoBar (770, 500, ValueURL);
        return true;
      } else {
        top.location.href=ValueURL;
        return true;
      }
    }
  }
}

// Change the content of the tag with entered id to the string str
function ChangeInnerHTML (id, str){
  if (document.all) {
    document.all(id).innerHTML = str;
  }
  else if (document.getElementById) {
    document.getElementById(id).innerHTML = str;
  }
}


// HOME navigation button
var imgHomeOver = new Image()
var imgJobSeekersOver = new Image()

imgHomeOver.src="../images/menu/menuitemhomeh.gif";
var imgHomeOutSrc = "../images/menu/menuitemhome.gif";
imgJobSeekersOver.src="../images/menu/menuitemhjobseekers.gif";
var imgJobSeekersOutSrc = "../images/menu/menuitemjobseekers.gif";

function mitem_over(what){
  document.images[what].src=eval('img'+what+'Over.src');
}

function mitem_out(what){
  document.images[what].src=eval('img'+what+'OutSrc');
}
	
