

var rimPath = null;
	var rjsPath = null;
	var rPath2Root = null;
	
	function InitRelCode() {
		var iImg;
		var jImg;
		var tObj;
		
		if(!document.layers) {
			iImg = document.images['DMBImgFiles'];
			jImg = document.images['DMBJSCode'];
			tObj = jImg;
		} else {
			tObj = document.layers['DMBRI'];
			if(tObj) {
				iImg = tObj.document.images['DMBImgFiles'];
				jImg = tObj.document.images['DMBJSCode'];
			}
		}
		if(!tObj) {
			window.setTimeout("InitRelCode()", 700);
			return false;
		}
		
		rimPath = _gp(iImg.src);
		rjsPath = _gp(jImg.src);
		rPath2Root = rjsPath + "../";
		
		return true;
	}
	
	function _purl(u) {
		return xrep(xrep(u, "%%REP%%", rPath2Root), "\\", "/");
	}
	
	function _fip(img) {
		if(img.src.indexOf("%%REL%%")!=-1)
			img.src = rimPath + img.src.split("%%REL%%")[1];
		return img.src;
	}
	
	function _gp(p) {
		return p.substr(0,p.lastIndexOf("/")+1);
	}
	
	function xrep(s, f, n) {
		if(s) s = s.split(f).join(n);
		return s;
	}
	
	InitRelCode();
	
	function LoadMenus() {if(!rjsPath){window.setTimeout("LoadMenus()", 10);return false;}document.write('<' + 'script language="JavaScript" type="text/javascript" src="' + rjsPath + 'menu.js"><\/script>');return true;}LoadMenus();
