function glow(item){item.className='active'}
function fade(item){item.className='inactive'}

function validateentryform(thisForm){
    with(thisForm){
        var items=thisForm.length;
        var alertMessage="The following required fields\nhave not been completed:\n";
        var backcolour='#f00';
        for(var i=0;i<items;i++){
            var e=elements[i];
            if(e.required){
                if(e.value==""){alertMessage += "\n"+e.required;e.style.borderColor=backcolour;}
            }
        }
        if(alertMessage!="The following required fields\nhave not been completed:\n"){
            alert(alertMessage);
            return false;
        }else{
            return true;
        }
    }
}
var win = null;
function popCenter(theURL,winName,w,h,s){
    if (window.screen) {
        var fromLeft= screen.availWidth;
        var fromTop= screen.availHeight;
        var settings='width='+w+',height='+h+',left='+Math.floor(.5*(fromLeft-w-10))+',top='+Math.floor(.5*(fromTop-h-30))+',status=0,resizable=1,scrollbars='+s;
        var win= window.open(theURL, winName, settings);
        if (win.focus)
            win.focus();
        return false;
    }
    return true;
} 

/*
getelementbyclassname - from:
http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/

To get all a elements in the document with a “info-links” class.
    getElementsByClassName(document, "a", "info-links");
To get all div elements within the element named “container”, with a “col” class.
    getElementsByClassName(document.getElementById("container"), "div", "col"); 
To get all elements within in the document with a “click-me” class.
    getElementsByClassName(document, "*", "click-me"); 
*/
function getElementsByClassName(oElm, strTagName, strClassName){
    var arrElements = (strTagName == "*" && document.all)? document.all : 
    oElm.getElementsByTagName(strTagName);
    var arrReturnElements = new Array();
    strClassName = strClassName.replace(/\-/g, "\\-");
    var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
    var oElement;
    for(var i=0; i<arrElements.length; i++){
        oElement = arrElements[i];      
        if(oRegExp.test(oElement.className)){
            arrReturnElements.push(oElement);
        }   
    }
    return (arrReturnElements)
}
Array.prototype.push = ArrayPush;
function ArrayPush(value){
    this[this.length] = value;
}


