function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function load(page,thisLayer) {
	if (ns4) document[thisLayer].src = page
	else if (ie4) parent[thisLayer].document.location = page
}

function doClick(ev) {
	// Test if there is a link
	if (ev.target.href) {
		//Find Layer for the target
		var layer = document.layers[ev.target.target]
		// if exists, set source, else ignore
		if (layer) {
			layer.src = ev.target.href
			return false
			}
		}
	this.routeEvent(ev)
	return true
}

function hookupEvents(el) {
	el.captureEvents(Event.CLICK)
	el.onclick = doClick
}

var ieDHTML = document.all !=null
var nsDHTML = document.layers

function checkFrames() {
	var iframes = window.frames
	var numFrames = iframes.length
	for (var i=0; i < numFrames; i++) {
		var f = iframes[i]
		if ((f.document.readyState=="complete") && (f.document.cached==null)) {
			f.document.body.style.border = "none"
			// Make sure we find the IFrame element since the layer tag also has an ID
			// the same name as the IFrames name.
			var elFrame = document.all[f.name].tags("IFRAME")[0]
			elFrame.style.height = f.document.body.scrollHeight
			f.document.cached = true
		}
	}
	setTimeout("checkFrames()",100)
}

if (nsDHTML) {
	window.captureEvents(Event.CLICK)
	window.onclick = doClick
}

if (ieDHTML)
	checkFrames()