var browser_name = navigator.appName;
var browser_version = parseFloat(navigator.appVersion);
var roll = false;

if ((browser_name == "Netscape" && browser_version >= 3.0)
|| (browser_name == "Microsoft Internet Explorer" && browser_version >= 3.0)) {
	roll = true;
}
else {
	roll = false;
}

function restore(img) {
	var img2restore = document.images[img];
	if (roll && img2restore.oSrc)
		img2restore.src = img2restore.oSrc;
}

function change(img, url) {
	var img2store = document.images[img];
	if (roll) {
		if (!img2store.oSrc) {
			try {
				highlightedImage = highlightedImage ? highlightedImage : "none";
			}
			catch (ex) {
				ex = null;
				highlightedImage = "none";
			}
			
			if (img == highlightedImage) {
				img2store.oSrc = url;
			}
			else {
				img2store.oSrc = img2store.src;
			}
		}
		img2store.src = url;
	}
} 
	
function getObject(obj) {
	var theObj;
	if (typeof obj == 'string') {
		theObj = document.getElementById(obj);
		if (!theObj)
			theObj = document.images[obj];
	}
	else if (typeof obj == 'object') {
		theObj = obj;
	}
	else {
		theObj = null;
	}
	return theObj;
}

function setImages() {
	if (roll) {
//		document.images[lang].src = langImage;
		if (highlightedImage != "none")
		document.images[highlightedImage].src = highlightedImageFile;
	}
}

function setHLLink(strLinkId) {
	var oLink = getObject(strLinkId);
	if (oLink)
		oLink.style.color = "#999999";
}

function fnGo(oSelect) {
	try {
		for(var i = 0; i < oSelect.options.length; i++) {
			if (oSelect.options[i].selected) 
				self.parent.location = oSelect.options[i].value;
		}
	}
	catch(ex) {
		ex = null;
	}
}
