/*This file created to add site js functions */

/*===================================
-- Begin Add 'over' image support
====================================*/
var oldSrc;
var splitSrc;
var newSrc;
function overMod(onmouse, isMe){
	oldSrc = isMe.src;
	switch(onmouse){
		case 'over':
			splitSrc = oldSrc.split('.jpg');
			newSrc = splitSrc[0] + '_over.jpg';
			break;
		case 'out':
			splitSrc = oldSrc.split('_over');
			newSrc = splitSrc[0] + splitSrc[1];
			break;
	}
	isMe.src = newSrc;
}

withOver = function(){
	instances = document.getElementsByTagName('IMG');
	if(instances.length > 0){
		for(var i = 0; i < instances.length; i++){
			if(instances[i].className == 'withOver'){
				instances[i].onmouseover = function(){ overMod('over', this) }
				instances[i].onmouseout = function(){ overMod('out', this) }
			}
		}
	}
}

if(window.attachEvent) {
	window.attachEvent('onload', withOver);
} else {
	window.addEventListener('load', withOver, false);
}
/*===================================
-- End Add 'over' image support
====================================*/