    var window1;
    ////////////////////////////////////////////////////////////////////////
    function open_window(URL,WID,HITE){
        window1 = window.open(URL,"window1",'toolbar=no,location=0,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=' + WID + ',height=' + HITE);
    }
    ////////////////////////////////////////////////////////////////////////
    function closeWindow() {
        if (window1 && !window1.closed) {
            window1.close()
        }
    }
    ////////////////////////////////////////////////////////////////////////
    //function CheckNumber(numThis,Field) {
    //	if (isNaN(numThis)) {
    //		alert("Please enter only numbers, no #, oz, ct, doz, etc.");
    //	}
    //}
    ////////////////////////////////////////////////////////////////////////
    function CheckNumber(fieldValue, fieldName) {
        if (isNaN(fieldValue) || fieldValue == "") {
            alert("Please enter only numbers, no #, oz, ct, doz, etc.");
        } else {
            if (fieldValue.indexOf('.') == -1) fieldValue += ".";
            dectext = fieldValue.substring(fieldValue.indexOf('.')+1, fieldValue.length);
            if (dectext.length > 0) {
                alert ("Oops!  Please enter a whole number, no decimal places.  Please try again.");
            } 
        }
    }
    ////////////////////////////////////////////////////////////////////////
    function OpenComments (c) {
        window.open(c,
        'comments',
        'width=480,height=480,scrollbars=yes,status=yes');
    }
    function grab(divid){
        return document.getElementById(divid);
    }
    ////////////////////////////////////////////////////////////////////////
    function OpenTrackback (c) {
        window.open(c,
        'trackback',
        'width=480,height=480,scrollbars=yes,status=yes');
    }
    ////////////////////////////////////////////////////////////////////////
    function formatStr (v) {
        if (!document.selection) return;
        var str = document.selection.createRange().text;
        if (!str) return;
        document.selection.createRange().text = '<' + v + '>' + str + '</' + v + '>';
    }
    ////////////////////////////////////////////////////////////////////////
    function insertLink () {
        if (!document.selection) return;
        var str = document.selection.createRange().text;
        if (!str) return;
        var my_link = prompt('Enter URL:', 'http://');
        if (my_link != null)
            document.selection.createRange().text = '<a href="' + my_link + '">' + str + '</a>';
    }



    function trim(str){
        return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
    }




    function is_numeric(sText){
        var ValidChars = "0123456789.";
        var IsNumber=true;
        var Char;


        for (i = 0; i < sText.length && IsNumber == true; i++) 
        { 
            Char = sText.charAt(i); 
            if (ValidChars.indexOf(Char) == -1) 
            {
                IsNumber = false;
            }
        }
        return IsNumber;

    }

    function addslashes(str) {
        str=str.replace(/\\/g,'\\\\');
        str=str.replace(/\'/g,'\\\'');
        str=str.replace(/\"/g,'\\"');
        str=str.replace(/\0/g,'\\0');
        return str;
    }
    function stripslashes(str) {
        str=str.replace(/\\'/g,'\'');
        str=str.replace(/\\"/g,'"');
        str=str.replace(/\\0/g,'\0');
        str=str.replace(/\\\\/g,'\\');
        return str;
    }


    function getHTTPObject(){
        var xmlHttp

        try{
            //Firefox, Opera 8.0+, Safari
            //xmlHttp = new XMLHttpRequest();

            xmlHttp = new window.XMLHttpRequest();

        }catch(e){
            //Internet Explorer
            try{
                xmlHttp = new ActiveXObject("MSXML2.XMLHTTP.3.0");
            }catch(e){
                try{
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                }catch(e){
                    alert("Your browser does not support AJAX!")
                    return false;
                }
            }
        }

        return xmlHttp;
    }
    
    function delquotes(str){return (str=str.replace(/["']{1}/gi,""));}
    
    function grab(divid){
        return document.getElementById(divid);
    }
    
    function pleasewait(whichdiv, text){
        grab(whichdiv).innerHTML = "<img src = \"loading.gif\" style=\"height:22px; width:30px; \">"+text;
    }
    
    function setDisplay(divname, whatitis){
        grab(divname).style.display = whatitis;
    }

    function setHeight(divname){
        grab(divname).style.height = document.getElementById(divname).scrollHeight + "px";
    }

    