var img_cache = new Object();
var this_page = "links";
var this_id = "";

function parse_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.rootsrc = im.src;				
				im.onmouseout = function () {
					this.src = this.rootsrc;
				}
				
				if(!img_cache[im.hoversrc]) {
					img_cache[im.hoversrc] = new Image();
					img_cache[im.hoversrc].src = im.hoversrc;
				}

				im.onmouseover = function () {			
					this.src = this.hoversrc;								
				}
			}
		}
	}
}

function addBookmark(title,url) {
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
	return true;
	}
}
function show_photo(window_width, window_height) {
    var window_height_new;
	window_width = window_width;
	window_height = window_height;
	if((screen.availHeight-100) < window_height) window_height_new = screen.availHeight-125;
	else window_height_new = window_height;

	var window_dimensions = "height=" + window_height_new + 
                            ",width=" + window_width + 
                            ",left=25" + 
                            ",top=50" +
                            ",toolbar=0,menubar=no,statusbar=yes,resizable=no,scrollbars=no"											
    var new_win = window.open("popup.html", "", window_dimensions);
	new_win.focus();
	return false;
}

function DisplayBlock(pid) {
	document.getElementById(pid).style.display = 'block';
}
function HideBlock(pid) {
	document.getElementById(pid).style.display = 'none';
}