// JavaScript Document
function rOI(iid,isrc) {
	document.getElementById(iid).src=isrc; 
}
  

function cms_showhide (did,sh) {
	document.getElementById(did).className = sh=="S"?"showcms":"hidecms";	
}
 
function show_hide_deps(obj,value,eid) {
	v=obj.value; 
	if (v == value || (v == '' && value == '!Urms!NaN!')) 
		document.getElementById(eid).className="showcms"; 
	else 
		document.getElementById(eid).className="hidecms"; 
}


function swAppear() {
	curImgId++;
	if (curImgId>3) curImgId=1;
	Effect.Appear("main-art-img-"+curImgId, { duration: 3.0 }); 
	setTimeout(swFade,5999); 
}
  
function swFade() {
	Effect.Fade("main-art-img-"+curImgId, { duration: 3.0 });  
}

function equalize() {

	if (document.getElementById("rs")) {

		rs = document.getElementById("right-wing");
		rst = document.getElementById("right-wing-top"); 
		rsb = document.getElementById("right-wing-bottom");
		mid = document.getElementById("main-content"); 
		ls = document.getElementById("left-wing");
		lst = document.getElementById("left-wing-top"); 
		lsb = document.getElementById("left-wing-bottom"); 
	
		if (rs.offsetHeight)
		{
			rh = rs.offsetHeight;
			lh = ls.offsetHeight;
			mh =  mid.offsetHeight;
		}
		else if (rs.style.pixelHeight)
		{
			rh= rs.style.pixelHeight;
			lh = ls.style.pixelHeight;
			mh = mid.style.pixelHeight;
		}
	
		mh-=105;
	
		rs.style.height=mh+"px";
		rst.style.height=mh+"px";
		rsb.style.height=mh+"px";
		ls.style.height=mh+"px";
		lst.style.height=mh+"px"; 
		lsb.style.height=mh+"px"; 
	}
}

curImgId=1;

(function(){
// if firefox 3.5+, hide content till load (or 3 seconds)
var d = document, e = d.documentElement, s = d.createElement('style');
if (e.style.MozTransform === ''){ // gecko 1.9.1 inference
s.textContent = 'body{visibility:hidden}';
e.firstChild.appendChild(s);
function f(){ s.parentNode && s.parentNode.removeChild(s); equalize(); }
addEventListener('load',f,false);
setTimeout(f,3000);
}
})(); 


window.onload=function() {
	equalize();	
}

