// Convert news dates to date blocks
var newsdates = $$('div.date');
newsdates.each(function (item)
						 {
							 
							 // get item value. eg: 17-Sep-2007
							 var dateval = new String(item.innerHTML);
							 
							 // get day number and month and bold date number
							 dateval = dateval.replace(/(\d+)-(\w+)-\d+/g, "<div class='datebig'>$1</div>$2");
							 							 
							 // replace innervalue
							 item.update(dateval);
						 });
function emptyIf(field,defaultValue)
{
		if (field.value == defaultValue)
		{
			field.value ="";	
		}
}
function defaultIfEmpty(field,defaultValue)
{
		if (field.value.length == 0)
		{
			field.value = defaultValue;	
		}
}



$(function(){

    $("ul.dropdown li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("ul.dropdown li ul li:has(ul)").find("a:first").append(" &raquo; ");

});



