/** * JavaScript Common Scripts - common.js * Copyright (c) Comrax Ltd., 1999-2003. All rights reserved. * Unauthorized duplication prohibited. */ /** * General values. */ var comraxHrefBase = ''; var comraxHrefImages = comraxHrefBase + 'multimedia/images/'; var comraxHrefMovies = comraxHrefBase + 'multimedia/movies/'; var comraxFlashHomepage = 'home-060201.swf'; var crlf = "\r\n"; var comraxArrayStack = new Array( ); var imageCount = 0; // color link in menu when over td var charL = "l"; /** * Refresh to a specific URI/URN. */ function comraxRefresh( url ) { if( url.substring( 0, 7 ) != 'http://' ) { if( url.substring( 0, 1 ) != '/' ) { url = '/' + url; } self.location = 'http://www.comrax.com' + url; } else { self.location = url; } } /** * Change images in menu "inner top" */ function changeImgOn(id) { document.getElementById(id).className = "td-menu-inner-on"; document.getElementById(charL+id).className = "link-menu-inner-on1"; } function changeImgOff(id) { document.getElementById(id).className = "td-menu-inner-off"; document.getElementById(charL+id).className = "link-menu-inner-off"; } function changeImgOn1(id) { document.getElementById(id).className = "td-menu-inner-off"; document.getElementById(charL+id).className = "link-menu-inner-off"; } function changeImgOff1(id) { document.getElementById(id).className = "td-menu-inner-on1"; document.getElementById(charL+id).className = "link-menu-inner-on"; } function changeImgOnRound(id) { document.getElementById(charL+id).className = "link-menu-inner-on1"; document.getElementById(id).className = "td-menu-inner-on-round"; } function changeImgOffRound(id) { document.getElementById(id).className = "td-menu-inner-off-round"; document.getElementById(charL+id).className = "link-menu-inner-off"; } /** * Common functions used throughout the site. */ function comraxImagePreload( imgHref ) { if( document.images ) { imageCount = comraxArrayStack.length; comraxArrayStack[ imageCount ] = new Image( ); comraxArrayStack[ imageCount ].src = comraxHrefImages + imgHref; return true; } else { return false; } } function comraxHomeOver( imgId ) { if( document.images ) { document.images[ imgId ].src = comraxHrefImages + 't' + imgId + 'o.gif'; } } function comraxHomeOut( imgId ) { if( document.images ) { document.images[ imgId ].src = comraxHrefImages + 't' + imgId + '.gif'; } } function comraxClassName( clsId, clsName ) { if( clsId && clsName && document.getElementById ) { clsPtr = document.getElementById( clsId ); if( clsPtr ) { clsPtr.className = clsName; } } } function goToUrl( strPage, strCurPage ) { alert (strPage); alert (strCurPage); if (strPage != strCurPage) { document.write('location = ' + strPage ); } } /** * Break out of frames, if indeed the website is cought in one. */ if( top != self ) { top.location = self.location; }