function getDirPath(URL) { var result = unescape(URL.substring(((URL.lastIndexOf("/")) + 1),((URL.lastIndexOf("m")) + 1))) return result } function doNowt() { } function getRoom() { if (window.top.loading == null) { doNowt } else { if (getDirPath(window.top.loading.location.href) == 'loader.htm') { setTimeout('window.top.location = duke + "index2.htm"',4000) } else { doNowt() } } }