NS4 = (document.layers) ? 1 : 0;
IE4 = (document.all) ? 1 : 0;
W3C = (document.getElementById) ? 1 : 0;	

function hide ( name ) {
  if (W3C) {
    document.getElementById(name).style.visibility = 'hidden';
  } else if (NS4) {
    document.layers[name].visibility = 'hide';
  } else {
    document.all[name].style.visibility = 'hidden';
  }
}

function show ( name ) {
  if (W3C) {
    document.getElementById(name).style.visibility = 'visible';
  } else if (NS4) {
    document.layers[name].visibility = 'show';
  } else {
    document.all[name].style.visibility = 'visible';
  }
}


function changeContent ( name,text ) {
	text = "<TABLE BORDER='0' WIDTH='200' CELLPADDING='0' CELLSPACING='1'><TR><TD BGCOLOR='#000000'>"+
 "<TABLE BORDER='0' WIDTH='100%' CELLPADDING='2' CELLSPACING='1'><TR><TD BGCOLOR='#5C78CD' CLASS='calendarevent'>"+
 "<FONT COLOR='#FFFFFF'>"+text+"</FONT>"+
 "</TD></TR></TABLE>"+
 "</TD></TR></TABLE>"
	
	
 	writeto = W3C?document.getElementById(name):IE4?document.all[name]:NS4?document.layers[name].document:0;	
 	if (NS4) {
 		writeto.write(text);
 		writeto.close();
 	} else {
 		writeto.innerHTML = text;
 	}
}

function showText(text) {
	changeContent('eventinfo',text);
	show('eventinfo');
}

function hideText() {
	hide('eventinfo');
}