function zoomPic(dir, pic) {
	zoomed = window.open("zoompic.php?d="+dir+"&f="+pic ,"zoomed", "width=450,height=480,resizable=no,scrollbars=no,status=no,location=no,menubar=no,toolbar=no,");
	if (window.zoomed) {
		window.zoomed.focus();
	}
}
function popupElement(element_id, w, h) {
	zoomed = window.open("popupElement.php?"+element_id ,"popupElement", "width="+w+",height="+h+",resizable=no,scrollbars=no,status=no,location=no,menubar=no,toolbar=no,");
	if (window.popupElement) {
		window.popupElement.focus();
	}
}
function setRowBgColor(sRow, newColor) {
	sCells = sRow.cells;
	for(i=0; i<sCells.length; i++) {
		sCells[i].style.backgroundColor = newColor;
	}
}

var gm_loaded = false;
function showGoogleMap() {
	var l = document.getElementById('map_layer');
	if(l.style.visibility=='hidden') {
		l.style.visibility = '';
		l.style.display = '';
		if(gm_loaded==false) {
			loadGMap();
			gm_loaded = true;
		}
	} else {
		l.style.visibility = 'hidden';
		l.style.display = 'none';
	}
}

function mapHl(area) {
	var img = "";
	if(area=="") {
		img = "map.gif";
	} else {
		img = "map_"+area+".gif";
	}
	document.getElementById('map_img').src = "images/map_small/"+img;
}

preloaded_images = new Array();
function preloadImg() {
	var image_list = preloadImg.arguments;
	for(var i=0; i < image_list.length; i++) {
		preloaded_images[i] = new Image;
		preloaded_images[i].src = image_list[i];
	}
}
