window._ready=new Array();
window.onload=function(){
	for(var i=0;i<window._ready.length;i++){
		try{window._ready[i](this);}catch(e){}}}
var onready=function(f){
	window._ready.push(f);}
registerImages=function(){
	for(var j=0;j<document.images.length;j++){
		ti=document.images[j];
		if(ti.className=="chimg"){
			try{ti.movr=new Image(ti.width,ti.height);
				ti.movr.src=ti.src.replace(/(\.[a-z]{2,5})$/i, ".ovr$1");
				ti.mout=new Image(ti.width,ti.height);
				ti.mout.src=ti.src;
				ti.mhld=false;
				ti.fovr=function(e){
					if(!this.mhld){this.src=this.movr.src;}}
				ti.fout=function(e){
					if(!this.mhld){this.src=this.mout.src};}
				ti.fclk=function(e){
					if(!this.mhld){
						for(k=0;k<document.images.length;k++){
							if(typeof(document.images[k].mhld)=="boolean"){
								if(document.images[k].mhld){
									document.images[k].mhld=false;
									document.images[k].fout(e);}}}
						this.mhld=true;
						this.src=this.movr.src;}}
				ti.onmouseover=function(e){
					this.fovr(e);}
				ti.onmouseout=function(e){
					this.fout(e);}
				ti.onclick=function(e){
					this.fclk(e);}}
			catch(e){}}}
	return true;}
try{setChimgActive=function(n){
		if(typeof(document.images[n])=="object"){
			if(typeof(document.images[n].fclk)=="function"){
				document.images[n].fclk(null);}}}}
catch(e){}
onready(function(){registerImages();});
