/**
** Name: image_omo(image, type)
** Arguments: image - Reference to the image
**			  type - image for passinga additional parameters
**
** Function: Switches name for an image. Called for OnMouseOver and OnMouseOut for an image
** 
**/
function image_omo(image, type){

	var image_src = image.src;
	var image_type = image_src.substring((image_src.length -4),image_src.length);
	var image_name = image_src.substring(0,image_src.length-image_type.length);
	
	switch(type){
		case 0:
			var off_postfix = "_off";
			var on_postfix = "_on";
			var clicked_postfix = "_clicked";
		break;
		
		default:
			var off_postfix = "_off";
			var on_postfix = "_on";
			var clicked_postfix = "_selected";
	}
	if(image_name.search(off_postfix) !=-1){
		image_name = image_name.substring(0, (image_name.length - off_postfix.length));
		image_name += on_postfix + image_type;
	} else if (image_name.search(on_postfix) !=-1){
		image_name = image_name.substring(0, (image_name.length - on_postfix.length));
		image_name += off_postfix + image_type;
	}
	// Do not use onMouseOver of the image is clicked on
	if(image.src.search(clicked_postfix) == -1){
		image.src =  image_name;
	}
}