var img_cache = new Object();
var this_page = ""; //current menu item (mN)

function parse_images() {

	function on_mouseout() {
		this.src = this.rootsrc;
	}
	
	function return_false() {
		return false;
	}
	
	function on_mouseover() {
		this.src = this.hoversrc;
	}	
	
	if (document.getElementById) {
		var ar = document.getElementsByTagName('img');
		for( var x = 0; ar[x]; x++ ) {
			var im = ar[x];
			if(im.getAttribute) im.hoversrc = im.getAttribute('hoversrc');
			if(im.hoversrc) {				
			
				im.rootsrc = im.src;				
				im.onmouseout = on_mouseout;
				
				if(!img_cache[im.hoversrc]) {
					img_cache[im.hoversrc] = new Image();
					img_cache[im.hoversrc].src = im.hoversrc;
				}
				
				im.onmouseover = on_mouseover;
				
			}
		}
	}		
}

function rollover_images() {
	
	if (document.getElementById) {
		var ar = document.getElementsByTagName('img');
		for( var x = 0; ar[x]; x++ ) {
			var im = ar[x];
			if(im.getAttribute) im.hoversrc = im.getAttribute('hoversrc');
			if(im.hoversrc) {

				im.onmouseout = function () {

					this.className = '';


				}

				im.onmouseover = function () {

					this.className = this.hoversrc;

				}

			}


		}
	}		
}



function hide_link(link_url,link_anchor,link_title,link_class,link_target) {
	document.write('<a h'+'r' + 'ef="' + link_url + '" class="' + link_class + '" target="' + link_target +'">' + link_anchor + '</a>');
}
