function expandField(object){
	object.oldsize=object.getAttribute('size');
	object.setAttribute('size',15);
	return object.select();
}

function collapseField(object){
	object.setAttribute('size',object.oldsize);
	object.value=(object.value!=object.defaultValue && object.value!='') ? object.value : object.defaultValue;
}

function initMenu(){
if(!document.getElementsByTagName)
	return document.body.className='';

	var theList=document.getElementById('mainMenu');
	if(!theList) return false;
	if(theList.currentStyle  && document.all && !window.opera){
		var LIitems=theList.getElementsByTagName('li');
		for(var i=0; LIitems[i]; i++) {
			var submenu=LIitems[i].getElementsByTagName('ul');
			if(submenu.length>0){
				submenu[0].onmouseover=showSubMenu;
				LIitems[i].onmouseover=showSubMenu;
				submenu[0].onmouseout=hideSubMenu;
				LIitems[i].onmouseout=hideSubMenu;
			}
		}
	}
}
function showSubMenu(){
	var target=this;
	if(target.nodeName.toUpperCase()=='LI')
	target=this.getElementsByTagName('ul')[0];
	if(target.currentStyle['visibility']=='hidden'||target.currentStyle['visibility']=='inherit'){
		target.style.visibility='visible';
	}
}
function hideSubMenu(){
	var target=this;
	if(target.nodeName.toUpperCase()=='LI')
	target=this.getElementsByTagName('ul')[0];
	if(target.currentStyle['visibility']=='visible'||target.currentStyle['visibility']=='inherit'){
		target.style.visibility='hidden';
	}
}

var mainOldOnload = window.onload;
window.onload = function()
{
    if (typeof mainOldOnload == 'function')
    {
         mainOldOnload();
    }
    initMenu();
}


