// JavaScript Document

<!--

        if (top.frames.length != 0)
            top.location = self.document.location;

        function showDiv(s) {
            scroll(0, 0);
            document.getElementById('opaque').style.visibility = 'visible';
            document.getElementById(s).style.visibility = 'visible';
        }

        function hideDiv(s) {
            document.getElementById('opaque').style.visibility = 'hidden';
            document.getElementById(s).style.visibility = 'hidden';
        }
        
		function tblRefresh(urlqs,sortfld,sortdir,tblpg) {
		    var f = document.frm;

		    f.frmaction.value = 'page';
			f.sortfld.value = sortfld;
			f.sortdir.value = sortdir;
			f.pg.value = tblpg;
			f.action = urlqs;
			f.submit();
		}
				
		function sortBtn(s1,s2,s3) {

	    dw = document.getElementById('divWait');
	    dd = document.getElementById('divData');

	    dw.innerHTML = "<center><img src='images/spacer.gif' width=1 height=150><br><SPAN style='font-size:18px;color:#333333;'>One moment please...</SPAN><br><br><img src='/images/gears.gif' border=0></center>"

	    dw.style.visibility = 'visible';
	    dd.style.visibility = 'hidden';

	    document.frm.frmaction.value = 'sort';
	    document.frm.sorttbl.value=s1;
	    document.frm.sortfld.value=s2;
	    document.frm.sortdir.value=s3;
    	
	    document.frm.submit();

	    }
    	
		function pop(l, w, h, m) {

		var o = 'width='+w+',height='+h+',resizeable=0,scrollbars=1';
		
		if (m == true) o += ',menubar=1';
		
		window.open(l,'_pop',o);

		}

		function isEmail(s) {
			
			// added 04/28/2007, JMS
			if (s.indexOf(' ')!=-1) return false;
			
			// there must be >= 1 character before @, so we
			// start looking at character position 1 
			// (i.e. second character)
			var i = 1;
			var sLength = s.length;

			// look for @
			while ((i < sLength) && (s.charAt(i) != "@"))
			{ i++
			}

			if ((i >= sLength) || (s.charAt(i) != "@")) return false;
			else i += 2;

			// look for .
			while ((i < sLength) && (s.charAt(i) != "."))
			{ i++
			}

			// there must be at least one character after the .
			if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
			else return true;
		}

		function isURL(s) {
			// there must not be http://, so we
			// start looking at character position 0
			// (i.e. first character)
			var i = 0;
			var sLength = s.length;

			// look for :
			while ((i < sLength) && (s.charAt(i) != ":"))
			{ i++
			}

			if (i < sLength) return false;
			else i = 0;
			
			// look for .
			while ((i < sLength) && (s.charAt(i) != "."))
			{ i++
			}

			// there must be at least two characters after the .
			if ((i >= sLength - 2) || (s.charAt(i) != ".")) return false;
			else return true;
		}

	
        // ******************************************************************************
        function isNumeric(inputVal) {
        // general purpose function to see if a suspected numeric input is really numeric
	        oneDecimal = false
	        inputStr = inputVal.toString()
	        if (inputStr == ".") {
		        return false
	        }
	        for (var i = 0; i < inputStr.length; i++) {
		        var oneChar = inputStr.charAt(i)
		        if (i == 0 && oneChar == "-") {
			        continue
		        }
		        if (oneChar == "." && !oneDecimal) {
			        oneDecimal = true
			        continue
		        }
		        if (oneChar < "0" || oneChar > "9") {
			        return false
		        }
	        }
	        return true
        }

        // ******************************************************************************
        function isPosNumeric(inputVal) {
	        if (!isNumeric(inputVal)) {
		        return false
	        }
	        if (parseFloat(inputVal) < 0) {
		        return false
	        }
	        return true
        }

        // ******************************************************************************
        function isNegNumeric(inputVal) {
	        if (!isNumeric(inputVal)) {
		        return false
	        }
	        if (parseFloat(inputVal) >= 0) {
		        return false
	        }
	        return true
        }

        // ******************************************************************************
        function isInteger(inputVal) {
        // general purpose function to see if a suspected numeric input is really numeric
	        inputStr = inputVal.toString()
	        if (inputStr == ".") {
		        return false
	        }
	        for (var i = 0; i < inputStr.length; i++) {
		        var oneChar = inputStr.charAt(i)
		        if (i == 0 && oneChar == "-") {
			        continue
		        }
		        if (oneChar < "0" || oneChar > "9") {
			        return false
		        }
	        }
	        return true
        }

        // ***************************************************************
        function isPosInteger(inputVal) {
	        if (!isInteger(inputVal)) {
		        return false
	        }
	        if (parseInt(inputVal) < 0) {
		        return false
	        }
	        return true
        }

        // ***************************************************************
        function isNegInteger(inputVal) {
	        if (!isInteger(inputVal)) {
		        return false
	        }
	        if (parseInt(inputVal) < 0) {
		        return false
	        }
	        return true
        }

        // ***************************************************************


//-->



		
