        var popupHandle = new Array();
        var iTotalPopup = 0;

	// Input	: sStatus	(status string to be displayed on window status)
	// Output	: sStatus will be displayed on window status
	// Purpose	: Best used with <A HREF>, for example:
	//		  <A HREF="http://www.eResources.com" onMouseOver="return setStatus('eResources Site')">
	//		  So that the actual URL can be hidden
	function setStatus(sStatus)
	{
		window.status = sStatus;
		return true;
	}
	
	var dtCh= "/";
	var minYear=1900;
	var maxYear=2500;
	
	function DaysArray(n) {
		for (var i = 1; i <= n; i++) {
			this[i] = 31
			if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
			if (i==2) {this[i] = 29}
		}
		return this
	} 
	
	function isInteger(s){
		var i;
		for (i = 0; i < s.length; i++){   
			var c = s.charAt(i);
			if (((c < "0") || (c > "9"))) return false;
		}
		return true;
	}
	
	function stripCharsInBag(s, bag){
		var i;
		var returnString = "";
		for (i = 0; i < s.length; i++){   
			var c = s.charAt(i);
			if (bag.indexOf(c) == -1) returnString += c;
		}
		return returnString;
	}
	
	function daysInFebruary (year){
		return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
	}
	
	function isDate(dtStr){
		var daysInMonth = DaysArray(12)
		var pos1=dtStr.indexOf(dtCh)
		var pos2=dtStr.indexOf(dtCh,pos1+1)
		var strMonth=dtStr.substring(0,pos1)
		var strDay=dtStr.substring(pos1+1,pos2)
		var strYear=dtStr.substring(pos2+1)
		strYr=strYear
		if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
		if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
		for (var i = 1; i <= 3; i++) {
			if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
		}
		month=parseInt(strMonth)
		day=parseInt(strDay)
		year=parseInt(strYr)
		if (pos1==-1 || pos2==-1){
			alert("The date format should be : mm/dd/yyyy")
			return false
		}
		if (strMonth.length<1 || month<1 || month>12){
			alert("Please enter a valid month")
			return false
		}
		if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
			alert("Please enter a valid day")
			return false
		}
		if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
			alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
			return false
		}
		if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
			alert("Please enter a valid date")
			return false
		}
	return true
	}
	
	function GetObj(pID)
    {
        var obj = document.getElementById(pID);
        return obj;
    }
	
	// Input	: emailStr (email string to evaluate)
	// Output	: true 	-> if email has correct format
	//		  false	-> if email has wrong format
	// Purpose	: to validate an email format
	function isValidEmail (emailStr) 
	{
		
		var emailPat=/^(.+)@(.+)$/
		var specialChars="\\(\\)<>@,;:'\\\\\\\"\\.\\[\\]"
		var validChars="\[^\\s" + specialChars + "\]"
		var quotedUser="(\"[^\"]*\")"
		var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
		var atom=validChars + '+'
		var word="(" + atom + "|" + quotedUser + ")"
		var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
		var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")

		var matchArray=emailStr.match(emailPat)
		if (matchArray==null) {
			return false;
		}
		var user=matchArray[1]
		var domain=matchArray[2]

		if (user.match(userPat)==null) {    
			return false
		}

		var IPArray=domain.match(ipDomainPat)
		if (IPArray!=null) {
      			for (var i=1;i<=4;i++) {
	    			if (IPArray[i]>255) {
						return false;
	    			}
	  		}
	  		return true;
		}

		// Domain is symbolic name
		var domainArray=domain.match(domainPat)
		if (domainArray==null) {
			return false;
		}

		var atomPat=new RegExp(atom,"g");
		var domArr=domain.match(atomPat);
		var len=domArr.length;
		if (domArr[domArr.length-1].length<2 || 
			domArr[domArr.length-1].length>3) {   
			return false;
		}

		if (len<2) {
			return false;
		}

		// If we've gotten this far, everything's valid!
		return true;
  	}
  	
  	// Input  : URL		-> URL to display
  	//	        pWidth	-> Width of popup Window
  	//	        pHeight	-> Height of popup Window
  	// Output : new popup window	  	
  	// Purpose: to pop up new window with pWidth width and pHeight height and display URL
  	function popup(URL, pWidth, pHeight)
  	{       
		var iHandle = window.open(URL,'_blank','width=' + pWidth + ',height=' + pHeight + ',toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=auto,copyhistory=no,resizable=yes');
		popupHandle[ iTotalPopup++ ] = iHandle;
		return true;
  	}
  	
  	function popup2(URL, pWidth, pHeight)
  	{
		var iHandle = window.open(URL,'_blank','width=' + pWidth + ',height=' + pHeight + ',toolbar=no, top=100,left=100,scrollbars=yes,status=no,menubar=no,resizable=yes');
		popupHandle[ iTotalPopup++ ] = iHandle;
		return true;
  	}
  	
  	function popupBar(URL, pWidth, pHeight)
  	{
		var iHandle = window.open(URL,'_blank','width=' + pWidth + ',height=' + pHeight + ',toolbar=yes, top=100,left=100,scrollbars=yes,status=no,menubar=no,resizable=yes');
		popupHandle[ iTotalPopup++ ] = iHandle;
		return true;
  	}
  	
  	function destroyPopup()
  	{
  	        for (var iCount=0; iCount < iTotalPopup; iCount++) {
  	               popupHandle[ iCount ].close();
  	        }
  	}
  	
  	
	function trim(str) 
	{
	    if (str) {
            str = this != window? this : str;
            return str.replace(/^\s+/g, '').replace(/\s+$/g, '');
        } 
        else
            return str;
	}
	
	function viewFormat(pDocRecNo, pType)
	{
		popup('/include/docFormat_list.asp?docRecNo='+pDocRecNo+'&docType='+pType, 820, 400);
	}
	
	function downloadDocs(pPubkey)
	{
		popup('/include/download_list.asp?pubkey='+pPubkey, 820, 400);
	}
    	
    function center()
	{
		var leftX = (screen.width - self.document.body.offsetWidth) / 2;
		var topY  = (screen.height - self.document.body.offsetHeight) / 2;
		moveTo(leftX, topY);
	}
    	
    function sendIt()
	{
		var sEmail = document.form1.txtTo.value;
		var sArray = sEmail.split(",")
		var bSend  = true;
	
		for (iCount=0; iCount<sArray.length; iCount++) {
			if (! isValidEmail(trim(sArray[iCount]))){
				document.form1.txtTo.focus();
				bSend = false;
			}
		}
		
		if (bSend ) {
			if (! isValidEmail(document.form1.txtFrom.value)) {
				document.form1.txtFrom.focus();
				bSend = false;
			}
		}	
		
		if (bSend) document.form1.submit();	
	}
	
	function replace(string,text,by) {
        // Replaces text with by in string
            var strLength = string.length, txtLength = text.length;
            if ((strLength == 0) || (txtLength == 0)) return string;
        
            var i = string.indexOf(text);
            if ((!i) && (text != string.substring(0,txtLength))) return string;
            if (i == -1) return string;
        
            var newstr = string.substring(0,i) + by;
        
            if (i+txtLength < strLength)
                newstr += replace(string.substring(i+txtLength,strLength),text,by);
        
            return newstr;
    }
    
    function validSearchInput(pText)
	{
	    var regexpr       = /[^A-Za-z0-9]/;
	    var sChar         = "";
		var bNotValidChar = false;
		var bSearch       = false;
		
		for(var iPos=0; iPos < pText.length; iPos++) {
	        sChar         = pText.charAt(iPos);
	        bNotValidChar = regexpr.test(sChar);
	        if (!bNotValidChar) bSearch = true;
	    }
		return bSearch;
	}
	
	function validNumeric(pText)
	{
	    var regexpr       = /^\d*\.?\,?\d{0,6}$/;
	    var sChar         = "";
		var bNotValidChar = false;
		var bSearch       = true;
		
		for(var iPos=0; iPos < pText.length; iPos++) {
	        sChar         = pText.charAt(iPos);
	        bNotValidChar = regexpr.test(sChar);
	        if (!bNotValidChar) bSearch = false;
	    }
		return bSearch;
	}
	
	function alphaNumeric(alphane)
	{
		var numaric = alphane
		for(var j=0; j < numaric.length; j++)
		{
			var alphaa = numaric.charAt(j);
			var hh = alphaa.charCodeAt(0);
			// 0-9A-Za-z
			if((hh > 47 && hh < 59) || (hh > 64 && hh < 91) || (hh > 96 && hh < 123))
			{
			}
			else{
				return false;
			}
		}
	return true;
	}

	function ZIPAlphaNumeric(alphane)
	{
		var numaric = alphane
		for(var j=0; j < numaric.length; j++)
		{
			var alphaa = numaric.charAt(j);
			var hh = alphaa.charCodeAt(0);
			// Space - and 0-9A-Za-z
			if( (hh == 32) || (hh == 45) || (hh > 47 && hh < 59) || (hh > 64 && hh < 91) || (hh > 96 && hh < 123))
			{
			}
			else{
				return false;
			}
		}
	return true;
	}
	
	function isUSAZIP(alphane)
	{
		var numaric = alphane
		for(var j=0; j < numaric.length; j++)
		{
			var alphaa = numaric.charAt(j);
			var hh = alphaa.charCodeAt(0);
			// - and 0-9
			if( (hh == 45) || (hh > 47 && hh < 59) )
			{
			}
			else{
				return false;
			}
		}
	return true;
	}
	
	function PhoneAlphaNumeric(alphane)
	{
		var numaric = alphane
		for(var j=0; j < numaric.length; j++)
		{
			var alphaa = numaric.charAt(j);
			var hh = alphaa.charCodeAt(0);
			// ()+- and 0-9A-Za-z
			if( (hh == 40) || (hh == 41) || (hh == 43) || (hh == 45) || (hh > 47 && hh < 59) || (hh > 64 && hh < 91) || (hh > 96 && hh < 123))
			{
			}
			else{
				return false;
			}
		}
	return true;
	}	
	
	//--------------------------------------------------------------
		// (c) 2000-2002 eResources (http://www.eresources.com)
	//
	// Browser Detection
	//
	
	// ---- Mac Platform
	isMac 	= (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
	IEmac 	= ((document.all)&&(isMac)) ? true : false;
	
	// ---- Netscape
	NS4 	= (document.layers) ? true : false;
	NS6 	= (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;
	
	// ---- Internet Explorer
	IE4plus = (document.all) ? true : false;
	IE4 	= ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
	IE5	= ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
	IE6 	= ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
	IE5plus = IE5 || IE6;
	IEPC	= IE4 || IE5plus;
	IE	= IEPC || IEmac;
	
	IEMajor = 0;
	if (IE4plus)
	{
		var start = navigator.appVersion.indexOf("MSIE");
		var end = navigator.appVersion.indexOf(".",start);
		IEMajor = parseInt(navigator.appVersion.substring(start+5,end));
		IE5plus = (IEMajor>=5) ? true : false;
	}
	

