function findPosX(obj)
{
	var curleft = 0;

	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (document.layers)
		curleft += obj.x;	
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (document.getElementById || document.all)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (document.layers)
		curtop += obj.y;
	return curtop;
}
	
	function changemenu(arrayname,title){
	title='<FONT COLOR=\'#003366\' FACE=\'Arial\' SIZE=-1><B>' + title + '</B></FONT>'
	var titleup=20;
	var upto = 7;
	if (navigator.platform !="Win32" && document.all) {upto = 5; titleup=7}
	else if (navigator.platform !="Win32" && navigator.appName == 'Netscape' ){
		upto = 5; titleup=20;
		if ( parseInt(navigator.appVersion.charAt(0)) < 5 ) {upto = 5; titleup=18;}
	}
	else if (navigator.platform =="Win32"
				 && navigator.appName == 'Netscape' 
				 && parseInt(navigator.appVersion.charAt(0)) < 5 ){
		titleup=18;
	}
	
	var obj = eval (arrayname);
		var x;
		var y;
		var z;
		
            if (document.getElementById){
                    x = document.getElementById("menubar");
					y= document.getElementById("topmenubar");
					z= document.getElementById("pagetitle");
					y.style.left =findPosX(x);
					y.style.top =findPosY(x)-upto;
					z.style.left =parseInt(y.style.left)+20;
					z.style.top=parseInt(y.style.top) - titleup;
					z.style.zIndex = 2;
					z.style.position ='absolute';
            }
            else  if (document.all){
                    x = document.all["menubar"];
					y= document.all["topmenubar"];
					z= document.all["pagetitle"];
					
                    y.style.left =findPosX(x);
					y.style.top =findPosY(x)-upto;
					z.style.left =parseInt(y.style.left)+20;
					z.style.top=parseInt(y.style.top) - titleup;
					z.style.zIndex = 2;
					z.style.position ='absolute';
	        }
			else if (document.layers){
					for( f=0; f<document.images.length; f++){
						if (document.images[f].name =="menubar")
							obj =document.images[f];
					}	
                    x = document.layers["topmenubar"];
					z = document.layers["pagetitle"];
					x.x =parseInt(findPosX(obj));
					x.y =findPosY(obj) - upto;
					z.x =parseInt(x.x)+20;
					z.y=parseInt(x.y) - titleup;
            }
	}
