//Henry 14th Nov 2k7
// When the page loads it tends to lose focus on the activated div, this focus on the active div
function _focus(div)
{
	if(document.getElementById(div))
	{
		document.getElementById(div+'-dd').focus();
	}
}
function JC_showHideMenu(menuname) {
	
		if(in_array(menuname, menulist)){
			JC_hideMenus(menuname);
		}
}
function JC_hideMenus(exception) {
	var i;
	
	for (i=0; i < menulist.length; i++) {
		if(menulist[i] != exception){
			//new Fx.Slide(exception + '-menu_contents').slideOut();
		}
		else
		{
			//new Fx.Slide(div + '-menu_contents').slideIn();
		}
				
	}
}
function in_array(stringToSearch, arrayToSearch) {
        for (s = 0; s < arrayToSearch.length; s++) {
                thisEntry = arrayToSearch[s].toString();
                if (thisEntry == stringToSearch) {
                        return true;
                }
        }
        return false;
}
var resetlist = new Array();
function JC_clearField(form, field){
        if(resetlist[field] != true){
                document.forms[form][field].value='';
                resetlist[field] = true;
        }
}


function show_options(divname, toggle){

        var mydiv = document.getElementById(divname);

        if(mydiv != undefined){

                if(toggle == 'yes'){
                        document.getElementById(divname).style.display = '';
                }else{
                        document.getElementById(divname).style.display = 'none';
                }
        }

}

