function Highlight(ElementID){

	// get the old element and set it to nothing
	try{
		var obj = document.getElementById(currentElementID);
		obj.className="";
	}
	catch(e){}

	// set the new element border and color
	try{
		var obj = document.getElementById(ElementID);
		obj.className="Sel";
	}
	catch(e) {}

	// make the new element the current element
	try{
		currentElementID = ElementID
		document.getElementById('current').value = ElementID;
	}
	catch(e){}
}

function SwapImg(ElementID,strSrc){
	// swap img src
	try{
		var obj = document.getElementById(ElementID);
		obj.src=strSrc;
	}
	catch(e) {}
}


AttachFunction = function() {
	try{
		if(document.getElementById('Image1')) {
			Highlight('Image1');
		}
	}
	catch(e){}
}




if(window.addEventListener) window.addEventListener('load', AttachFunction, false); // gecko, safari, konqueror and standard
else if(document.addEventListener) document.addEventListener('load', AttachFunction, false); // opera 7
else if(window.attachEvent) { // win/ie
	window.attachEvent('onload', AttachFunction);
} else { // mac/ie5
	if(typeof window.onload == 'function') {
		var existing = onload;
		window.onload = function() {
			existing();
			AttachFunction();
		}
	} else {
		window.onload = function() {
			AttachFunction();
		}
	}
}