    var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0 && parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
    var isMinIE4 = (document.all) ? 1 : 0;
    var objWin; // hold a reference to new window
    function openwindow(page,window_name)
    {
        var screen_height=600;
        var screen_width=590;
        var screen_left=10;
        var screen_top=100;
        screen_left=screen.availWidth;
        screen_left=screen_left-(screen_width+40);
        if (objWin && !objWin.closed)
        {
            if (isMinNS4)
            {
                screen_left=objWin.screenX;
                screen_top=objWin.screenY;
                screen_width=objWin.innerWidth;
                screen_height=objWin.innerHeight;
            }
            if (isMinIE4)
            {
                screen_left=objWin.screenLeft-4; // empirical
                screen_top=objWin.screenTop-23; // empirical
                screen_width=objWin.document.body.clientWidth;
                screen_height=objWin.document.body.clientHeight;
            }
            objWin.close();
        }
        objWin = window.open(page,window_name,"scrollbars=yes,resizable=yes,top="+screen_top+",left="+screen_left+",width="+screen_width+",height="+screen_height+"\"");
    }


//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  function opensmallwindow(page,window_name)
  {
      var screen_height=250;
      var screen_width=350;
      var screen_left=20;
      var screen_top=20;
      //screen_left=screen.availWidth;
      //screen_left=screen_left-(screen_width+40);
      if (objWin && !objWin.closed)
      {
          if (isMinNS4)
          {
              screen_left=objWin.screenX;
              screen_top=objWin.screenY;
              screen_width=objWin.innerWidth;
              screen_height=objWin.innerHeight;
          }
          if (isMinIE4)
          {
              screen_left=objWin.screenLeft-4; // empirical
              screen_top=objWin.screenTop-23; // empirical
              screen_width=objWin.document.body.clientWidth;
              screen_height=objWin.document.body.clientHeight;
          }
          objWin.close();
      }
      objWin = window.open(page,window_name,"scrollbars=yes,resizable=yes,top="+screen_top+",left="+screen_left+",width="+screen_width+",height="+screen_height+"\"");
  }

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  function submitenter(myfield,e,action_val)
  {
    var keycode;
    if (window.event) // i think this is for different browsers
        keycode = window.event.keyCode;
    else
        if (e)
            keycode = e.which;
        else return true;

    if (keycode == 13)
       {
       myfield.form.web_action.value=action_val;
       myfield.form.submit();
       return false;
       }
    else
       return true;
  }

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
// Pop up information box II (Mike McGrath (mike_mcgrath@lineone.net,  http://website.lineone.net/~mike_mcgrath))
// Permission granted to Dynamicdrive.com to include script in archive
// For this and 100's more DHTML scripts, visit http://dynamicdrive.com
    Xoffset=  0;    // modify these values to ...
    Yoffset= 20;    // change the popup position.

    var old,skn,yyy=-1000;

    var ns4=document.layers
    var ns6=document.getElementById&&!document.all
    var ie4=document.all

    if (ns4)
        skn=document.dek
    else if (ns6)
        skn=document.getElementById("dek").style
    else if (ie4)
        skn=document.all.dek.style
    if(ns4)
        document.captureEvents(Event.MOUSEMOVE);
    else{
        skn.visibility="visible"
        skn.display="none"
    }
    document.onmousemove=get_mouse;

    function popup(msg,bak,wid){
        var content="<TABLE  WIDTH="+wid+" BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+
        "BGCOLOR="+bak+"><TD ALIGN='left'><FONT COLOR=black SIZE=2>"+msg+"</FONT></TD></TABLE>";
        yyy=Yoffset;
        if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
        if(ns6){document.getElementById("dek").innerHTML=content;skn.display=''}
        if(ie4){document.all("dek").innerHTML=content;skn.display=''}
    }

    function get_mouse(e){
        var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
        skn.left=x+Xoffset;
        var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
        skn.top=y+yyy;
    }

    function kill(){
        yyy=-1000;
        if(ns4){skn.visibility="hidden";}
        else if (ns6||ie4)
        skn.display="none"
    }

//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  function autoCheck(catID) {
    // if user clicked on a main category...
    if (catID % 1000 == 0) {
      // if user checked a main category, check all sub-categories
      if (document.getElementById("cat"+catID).checked) {
        for(i=0; i<document.form.elements.length; i++) {
          if( (document.form.elements[i].name == "categories[]") && (parseInt(document.form.elements[i].value/1000) == parseInt(catID/1000)) ) {
            document.form.elements[i].checked = true;
          }
        }
      }
      else { // if user unchecked a main category, uncheck all sub-categories
        for(i=0; i<document.form.elements.length; i++) {
          if( (document.form.elements[i].name == "categories[]") && (parseInt(document.form.elements[i].value/1000) == parseInt(catID/1000)) ) {
            document.form.elements[i].checked = false;
          }
        }
      }
    }

    else { // user clicked on sub-category
      // if user checked the sub-category, make sure it's main category is checked.
      if (document.getElementById("cat"+catID).checked) {
        var mainID = parseInt(catID/1000)*1000;
        document.getElementById("cat"+mainID).checked = true;
      }
    }
  }


//------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function confirmDelete()
	{
	var agree=confirm("Are you sure you wish to delete this Tool?  The tool will be permanently removed from the database with no chance of retrieval.");
	if (agree)
			return true ;
	else
			return false ;
	}
