<!-- Begin


function PopWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+''
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


function GO_SEARCH(STERM){
var answer = confirm ("Your Search Term is less then 3 characters in length.\nThis may cause many search results.\nDo you still wish to continue?\n")
if (answer){
document.getElementById(myform).submit();
}
else{
return false;
}
}

function JFORM(TheForm,TheMSG){
var answer = confirm ("Are you sure you want to " + TheMSG + "?")
if (answer){
document.getElementById(TheForm).submit();
}
else{
return false;
}
}

function JFORM2(TheForm,TheMSG,TheMSG2){
var answer = confirm ("Are you sure you want to " + TheMSG + "?")
if (answer){
JFORM2_GO(TheForm,TheMSG2)
}
else{
return false;
}
}

function JFORM2_GO(TheForm2GO,TheMSG2GO){
var answer = confirm (TheMSG2GO + "\n....................................................\n....................................................\n...................... ### ......................\n...................... ### ......................\n...................... ### ......................\n...................... ### ......................\n...................... ### ......................\n...................... ### ......................\n...................... ### ......................\n...................... ### ......................\n....................................................\n...................... ### ......................\n...................... ### ......................\n....................................................\n....................................................\n......................Continue?")

if (answer){
document.getElementById(TheForm2GO).submit();
}
else{
return false;
}
}


function EXPORTCHECK(exportform){

if (document.getElementById('CHOICE1').value=="") {
alert('The 1st field must contain something in order to continue.');
} else {
document.getElementById(exportform).submit();
}

}

// SHOW OBJECT SCRIPT
function show(object) {
document.getElementById(object).style.zIndex = 100;
document.getElementById(object).style.visibility='visible';
document.getElementById(object).style.display='inline';
}

// HIDE OBJECT SCRIPT
function hide(object) {
document.getElementById(object).style.zIndex = 60;
document.getElementById(object).style.visibility='hidden';
document.getElementById(object).style.display='none';
}


// DHTML ADMIN MENU

function at_display(x)
{
  var win = window.open();
  for (var i in x) win.document.write(i+' = '+x[i]+'<br>');
}

// ----- Show Aux -----

function at_show_aux(parent, child)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child );

  var top  = (c["at_position"] == "y") ? p.offsetHeight-1 : 0;
  var left = (c["at_position"] == "x") ? p.offsetWidth-1 : 0;

  for (; p; p = p.offsetParent)
  {
    top  += p.offsetTop;
    left += p.offsetLeft;
  }

  c.style.position   = "absolute";
  c.style.top        = top +'px';
  c.style.left       = left+'px';
  c.style.visibility = "visible";
}

// ----- Show -----

function at_show()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  at_show_aux(p.id, c.id);

  clearTimeout(c["at_timeout"]);
}

// ----- Hide -----

function at_hide()
{
  var c = document.getElementById(this["at_child"]);

  c["at_timeout"] = setTimeout("document.getElementById('"+c.id+"').style.visibility = 'hidden'", 333);
}

// ----- Click -----

function at_click()
{
  var p = document.getElementById(this["at_parent"]);
  var c = document.getElementById(this["at_child" ]);

  if (c.style.visibility != "visible")
       at_show_aux(p.id, c.id);
  else c.style.visibility = "hidden";

  return false;
}

// ----- Attach -----

// PARAMETERS:
// parent   - id of visible html element
// child    - id of invisible html element that will be dropdowned
// showtype - "click" = you should click the parent to show/hide the child
//            "hover" = you should place the mouse over the parent to show
//                      the child
// position - "x" = the child is displayed to the right of the parent
//            "y" = the child is displayed below the parent
// cursor   - Omit to use default cursor or check any CSS manual for possible
//            values of this field

function at_attach(parent, child, showtype, position, cursor)
{
  var p = document.getElementById(parent);
  var c = document.getElementById(child);

  p["at_parent"]     = p.id;
  c["at_parent"]     = p.id;
  p["at_child"]      = c.id;
  c["at_child"]      = c.id;
  p["at_position"]   = position;
  c["at_position"]   = position;

  c.style.position   = "absolute";
  c.style.visibility = "hidden";

  if (cursor != undefined) p.style.cursor = cursor;

  switch (showtype)
  {
    case "click":
      p.onclick     = at_click;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
    case "hover":
      p.onmouseover = at_show;
      p.onmouseout  = at_hide;
      c.onmouseover = at_show;
      c.onmouseout  = at_hide;
      break;
  }
}


// End -->
