var initialTop = 0;
var menu1CurrHeight = 430;
var menu1Height = 430;
var menu1Delta = 4;
var menu1Status = 'hide';
var menu2CurrHeight = 240;
var menu2Height = 240;
var menu2Delta = 3;
var menu2Status = 'hide';
var menu3CurrHeight = 240;
var menu3Height = 240;
var menu3Delta = 3;
var menu3Status = 'hide';

function move(menu,iFirst) {

	var obj = document.getElementById(menu);
	var currHeight;
        var menuHeight;
        var iDelta;
	if(menu == 'menu1'){
	currHeight = menu1CurrHeight;
	menuHeight = menu1Height;
	iDelta = menu1Delta;
	}
	else if(menu == 'menu2'){
	currHeight = menu2CurrHeight;
	menuHeight = menu2Height;
	iDelta = menu2Delta;
	}
	else  if(menu == 'menu3'){
	currHeight = menu3CurrHeight;
	menuHeight = menu3Height;
	iDelta = menu3Delta;
	}
	if(iFirst==-1)
	{
	restoreAllMenuImg();
		if(menu == 'menu1'){
			if(menu1Status == 'hide'){
			menu1Status = 'show';
			menu2Status = 'hide';
			menu3Status = 'hide';	
			}
			else if(0>=currHeight){
			menu1Status = 'hide';
			}
			if(menu1Status == 'show'){
			MM_swapImage('Important Notices','',menu1MouseOverImg,1);
			}
			menu1Delta = 4;
			iDelta = menu1Delta;
			var otherObj = document.getElementById('menu2');
			otherObj.style.display = 'none';
			otherObj = document.getElementById('menu3');
			otherObj.style.display = 'none';
			}
		else if(menu == 'menu2'){
			if(menu2Status == 'hide'){
			menu1Status = 'hide';
			menu2Status = 'show';
			menu3Status = 'hide';
			}
			else if(0>=currHeight){
			menu2Status = 'hide';
			}
			if(menu2Status == 'show'){
			MM_swapImage('OCS','',menu2MouseOverImg,1);
			}
			menu2Delta = 3;
			iDelta = menu2Delta;
			var otherObj = document.getElementById('menu1');
			otherObj.style.display = 'none';
			otherObj = document.getElementById('menu3');
			otherObj.style.display = 'none';
			}
		else  if(menu == 'menu3'){
			if(menu3Status == 'hide'){
			menu1Status = 'hide';
			menu2Status = 'hide';
			menu3Status = 'show';
			}
			else if(0>=currHeight){
			menu3Status = 'hide';
			}
			if(menu3Status == 'show'){
			MM_swapImage('DiGi Search','',menu3MouseOverImg,1);
			}
			menu3Delta = 3;
			iDelta = menu3Delta;			
			var otherObj = document.getElementById('menu1');
			otherObj.style.display = 'none';
			otherObj = document.getElementById('menu2');
			otherObj.style.display = 'none';
			}
		if(0>=currHeight)
		{
			iDelta=-iDelta;
		}
		else
		{
			currHeight=menuHeight;
		}
	}
	currHeight-=iDelta;
        var movePixel = initialTop-currHeight;
        if(movePixel > 0)
        movePixel = 0;
	obj.style.top = movePixel + 'px';
	obj.style.clip = 'rect(' + currHeight + 'px, 854px, ' + menuHeight + 'px, 0px)';
	obj.style.display = 'inline-block';
	if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
	var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
	if (ffversion>=2){
	obj.style.display = 'block';
	}
	}

    if(menu == 'menu1'){
	menu1Delta = iDelta;
	menu1CurrHeight = currHeight;
        menu2Delta = -iDelta;
        menu2CurrHeight = menu2Height;
        menu3Delta = -iDelta;
        menu3CurrHeight = menu3Height;
	}
	else if(menu == 'menu2'){
	menu2Delta = iDelta;
	menu2CurrHeight = currHeight;
        menu1Delta = -iDelta;
        menu1CurrHeight = menu1Height;
        menu3Delta = -iDelta;
        menu3CurrHeight = menu3Height;
	}
	else  if(menu == 'menu3'){
	menu3Delta = iDelta;
	menu3CurrHeight = currHeight;
        menu1Delta = -iDelta;
        menu1CurrHeight = menu1Height;
        menu2Delta = -iDelta;
        menu2CurrHeight = menu2Height;
	}
	
	
	if(iDelta > 0)
	{
	if (0 < currHeight) {
		setTimeout("move('" + menu + "')", 1);
	}
	}
	else
	{
	if(menuHeight > currHeight){
		setTimeout("move('" + menu + "')", 1);	
	}
	}
}

function restoreAllMenuImg() { //v3.0
  var a=document.images[2];
  if(a.oSrc != undefined && a.oSrc != null)  
	a.src=a.oSrc;  
  a=document.images[3]; 
  if(a.oSrc != undefined && a.oSrc != null)  
	a.src=a.oSrc;
  a=document.images[4]; 
  if(a.oSrc != undefined && a.oSrc != null)  
	a.src=a.oSrc;
  a=document.images[5]; 
  if(a.oSrc != undefined && a.oSrc != null)  
	a.src=a.oSrc;
  a=document.images[6]; 
  if(a.oSrc != undefined && a.oSrc != null)  
	a.src=a.oSrc;
  a=document.images[7]; 
  if(a.oSrc != undefined && a.oSrc != null)  
	a.src=a.oSrc;
	a=document.images[8]; 
  if(a.oSrc != undefined && a.oSrc != null)  
	a.src=a.oSrc;
}

function restoreMenuImg(){
restoreAllMenuImg();
if(menu1Status=='show')
	MM_swapImage('Important Notices','',menu1MouseOverImg,1);
if(menu2Status=='show')
	MM_swapImage('OCS','',menu2MouseOverImg,1);
if(menu3Status=='show')
	MM_swapImage('DiGi Search','',menu3MouseOverImg,1);
}
