// JavaScript Document

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function openwindow(myFile, myText, myDesc, myWidth, myHeight) { 
	
	finalurl = "roomplan.php?path=images/"+myFile+"&captext="+myText+"&capdesc="+myDesc;
	window.open(finalurl,"","location=1,status=0,scrollbars=0,width="+myWidth+",height="+myHeight); 

}


var isDOM = (document.getElementById ? true : false); 

var isIE4 = ((document.all && !isDOM) ? true : false);

var isNS4 = (document.layers ? true : false);



function getRef(id)

{

	if (isDOM) return document.getElementById(id);

	if (isIE4) return document.all[id];

	if (isNS4) return document.layers[id];

}



var isNS = navigator.appName == "Netscape";



function moveRightEdge()

{

	var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

	if (isNS4)

	{

		yMenuFrom   = divMenu.top;

		yMenuTo     = windows.pageYOffset + 100;

	}

	else if (isDOM)

	{

		yMenuFrom   = parseInt (divMenu.style.top, 10);

		yMenuTo     = (isNS ? window.pageYOffset : document.body.scrollTop) + 56;

	}



	timeoutNextCheck = 500;



	if (yMenuFrom != yMenuTo)

	{

		yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);

		if (yMenuTo < yMenuFrom)

			yOffset = -yOffset;

		if (isNS4)

			divMenu.top += yOffset;

		else if (isDOM)

			divMenu.style.top = parseInt (divMenu.style.top, 10) + yOffset;

			timeoutNextCheck = 10;

	}

	setTimeout ("moveRightEdge()", timeoutNextCheck);

}
