var ie = 0;

function title(text){
	var text = text.replace('&quot;','"');
	text = text.replace('&quot;','"');
	if(text != ""){
		document.title = document.title+" » "+text;
	}
}
function message(text){
	if(text != ""){
		document.write("<font color='red'><b>"+text+"</b></font><br><br>");
	}
}
function sure(text,link){
        text = text || "";
        var answer=confirm(" "+text+"?");
        if(answer>0){
                document.location.replace(link);
        }
}


if (navigator.userAgent.indexOf ("MSIE") != -1){
	ie = 1;
} 

function hideBox(){
	document.getElementById("showTable").style.display = "none";
	document.getElementById("showBg").style.visibility = "hidden";
}

function showBox(){
	var top = 0;
	var show = "table";
        	if(ie == 1) {
		show = "list-item";
		top = document.body.scrollTop;
		//left = document.body.scrollLeft; 
	}
   	else{
		top = window.pageYOffset; 
		//left = window.pageXOffset; 
	}

	//document.getElementById("showTable").style.height = document.body.clientHeight;
	
	document.getElementById("showBg").style.visibility = "visible";
	document.getElementById("showBg").style.height = getHeight()+"px";
	
	document.getElementById("showTable").style.top = top;
	document.getElementById("showTable").style.display = show;
}

function quickOpen(id){
	var box = document.getElementById("showBox");
	box.innerHTML='<img src="photo/'+id+'.jpg" onclick="hideBox();">';
	showBox();
}

function getHeight()
{
	return (document.body.scrollHeight > document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight;
}

