function ChangeImg(id){
	this.id = id;
	this.images = new Array();
	this.ix = 0;
}
ChangeImg.prototype.addImage = function (url){
	this.images.push(url);
}
ChangeImg.prototype.rollover = function(){
	if(this.ix >= this.images.length){
		this.ix = 0;
	}
	var url = this.images[this.ix];
	++this.ix;
	var img = document.getElementById(this.id);
	if(img){
		img.src = url;
	}
}
ChangeImg.prototype.preload = function(){
	for(i = 0; i < this.images.length; ++i){
		var m = new Image();
		m.src = this.images[i];
	}
}
function showHide(id,show_clazz){
	var el = document.getElementById(id);
	if(! el){
		return;
	}
	if(el.getAttribute('class') == 'hide'){
		el.setAttribute('class',show_clazz);
		el.className = show_clazz;
	}else{
		el.setAttribute('class','hide');
		el.className = 'hide';
	}
}
