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,toolbar,menubar,resizable=1,scrollbars='+s;
        var win= window.open(theURL, winName, settings);
    }
    return true;
} 
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;
        }
    }
}

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

var i=0;
var speed=1;
function scroll(){
    i=i+speed;
    var div=document.getElementById("news");
    div.scrollTop=i;
    if(i>div.scrollHeight-160){i=0;}
    t1=setTimeout("scroll()",100);
}

