// JavaScript Document

function PopupPic(sPicURL) { 
	window.open("popup.html?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200");
}

window.onload = function(){
	ConvertRowsToLinks("diamonds");
}

function ConvertRowsToLinks(xTableId){
	if(document.getElementById(xTableId)) {
		var rows = document.getElementById(xTableId).getElementsByTagName("tr");
		for(i=0;i<rows.length;i++){
			var link = rows[i].getElementsByTagName("a")
			if(link.length == 1){
				rows[i].onclick = new Function("document.location.href='" + link[0].href + "'");
				rows[i].onmouseover = new Function("this.className = 'hover';window.status = '" + link[0].href + "'");
				rows[i].onmouseout = new Function("this.className = '" + link[0].name + "';window.status = ''");
			}
		}
	}
}
