/* filename: hrvi-default.js
   domain:  https://secure.hudsonreporting.com/
*/ 
    
    function changeDoc(loc) {
      var str = /^((http|https):\/\/)?(\w+[-\.]?\w+[/]?)+$/		// no query string constructs supported

	if (loc.match(str)) { 

  	  if (confirmCancel("Click \'OK\' to leave this page")) {
	    if (RegExp.$1) {
	      document.location = loc
	    } else {
	      document.location = 'http://' + loc
	    }   
	  }
	}
    }


    function confirmCancel(mesg) {
      if (!mesg) mesg = "\n\Warning: ALL data will be lost!\nProceed anyway?"

      confirmed = ""
      confirmed = confirm(mesg)
      return confirmed
    }


// Focus window

    function onTop() {
      if (window.blur) setTimeout("window.focus()", 5 * 1000)
    }


// Create dynamics link depending on whether or not a window is explicitly named

      function addLink(){

        var theLinks, myName

        myName = window.name
      
        if (myName != 'glossary') { 

          theLinks = '<a href="index.html">home</a>&nbsp;&#8594;&nbsp;<a href="main/service-listing.html">our&nbsp;services</a>&nbsp;&#8594;&nbsp;'
    
        } else { 

          theLinks = ""

        }
    
         document.write(theLinks)

      } 