// JavaScript Document
function getObjectByID(ID){  //use: var x = new getByID('ObjectID'); x.style.(color/top/visibility/etc) = (whatever);
  if (document.getElementById)  {
  	this.obj = document.getElementById(ID);
	this.style = document.getElementById(ID).style;
  }else if (document.all){
	this.obj = document.all[ID];
	this.style = document.all[ID].style;
  }else if (document.layers){
   	this.obj = document.layers[ID];
   	this.style = document.layers[ID];
  }
}

function setClass(ID,newClass){
	//alert('changing '+ID+' to '+newClass);
	var object = document.getElementById(ID);
	object.className = newClass;
	
	/*var x = new getObjectByID(ID);
	x[className] = newClass;*/
}



function change_style(ID,style_name,value){ //style_name(visibility/fontStyle/fontFamily/etc)
	if(style_name == 'backgroundColor' || style_name == 'bgColor'){ //account for multiple backgroundColor names:
	if(value == 'transparent') value = null;
		if (document.layers)
			style_name = 'bgColor'; //document[id].bgColor = color == 'transparent' ? null : color;
		  else if (document.all)
			style_name = 'backgroundColor'; //document.all[id].style.backgroundColor = color;
		  else if (document.getElementById)
			style_name = 'backgroundColor'; //document.getElementById(id).style.backgroundColor = color;
	}
	var x = new getObjectByID(ID);
	x.style[style_name] = value;
}

function get_content(ID){
	content = document.getElementById(ID).innerHTML;
	return content;
}

function swap_content(ID,content){
	document.getElementById(ID).innerHTML = content;
}