function ToggleImgAlpha(ImgElementID){
	// get the old element and set it to nothing
	try{
		var obj = document.getElementById(currentImgElementID);
		//obj.className="Img";
		obj.style.filter="alpha(opacity=100)";
		obj.style.opacity="1.00";
		//alert('30');
	}
	catch(e){}
	// set the new element border and color
	try{
		var obj = document.getElementById(ImgElementID);
		//obj.className="ImgSel";
		obj.style.filter="alpha(opacity=30)";
		obj.style.opacity=".30";
	}
	catch(e) {}
	// make the new element the current element
	try{
		currentImgElementID = ImgElementID
	}
	catch(e){}
}



function SwapImg(ElementID,strSrc,strWidth,strHeight){
	// swap img src
	try{
		var obj = document.getElementById(ElementID);
		obj.src=strSrc;
		obj.width=strWidth;
		obj.height=strHeight;
		obj.title='';
	}
	catch(e) {}
}



CenterBoxVertical = function() {
	try{
		var element = document.getElementById('BodyTable');
		var windowSize = document.documentElement.clientHeight;
		var newMargin = (windowSize - 430)  / 2;
		if(newMargin > 0){
			element.style.marginTop = newMargin + 'px';
		}
	}catch(e){}
}

if(window.addEventListener) window.addEventListener('load', CenterBoxVertical, false); // gecko, safari, konqueror and standard
else if(document.addEventListener) document.addEventListener('load', CenterBoxVertical, false); // opera 7
else if(window.attachEvent) { // win/ie
	window.attachEvent('onload', CenterBoxVertical);
} else { // mac/ie5
	if(typeof window.onload == 'function') {
		var existing = onload;
		window.onload = function() {
			existing();
			CenterBoxVertical();
		}
	} else {
		window.onload = function() {
			CenterBoxVertical();
		}
	}
}

if(window.addEventListener) window.addEventListener('resize', CenterBoxVertical, false); // gecko, safari, konqueror and standard
else if(document.addEventListener) document.addEventListener('resize', CenterBoxVertical, false); // opera 7
else if(window.attachEvent) { // win/ie
	window.attachEvent('onresize', CenterBoxVertical);
} else { // mac/ie5
	if(typeof window.onresize == 'function') {
		var existing = onresize;
		window.onresize = function() {
			existing();
			CenterBoxVertical();
		}
	} else {
		window.onresize = function() {
			CenterBoxVertical();
		}
	}
}

