function openNewWindow(theURL, winName, features) { newWindow = window.open(theURL, winName, features); } function openModalWindow(theURL,features) { window.showModalDialog(theURL,window,features); window.location.reload(); } function CheckUIElements(){ var menuFromY, menuToY, offsetY, timeoutNextCheck; menuFromY = parseInt(rightMenu.style.top, 10); menuToY = document.body.scrollTop + 200; timeoutNextCheck = 500; if(menuFromY != menuToY) { offsetY = Math.ceil(Math.abs(menuToY - menuFromY) / 20); if(menuToY < menuFromY) offsetY = -offsetY; rightMenu.style.top = parseInt(rightMenu.style.top, 10) + offsetY; timeoutNextCheck = 10; } setTimeout("CheckUIElements()", timeoutNextCheck); } function ScrollProc() { var y; rightMenu.style.top = document.body.scrollTop + 200; rightMenu.style.visibility = "visible"; CheckUIElements(); return true; }