function hidepic(){
greyscr=document.getElementById('greyscreen');
greyscr.style.width=1;
greyscr.style.height=1;
greyscr.style.visibility="hidden";
box=document.getElementById("picbox");
box.style.visibility="hidden";
box.style.left="-500px";
}

function createpicbox(){
var divblock=document.createElement("div");
divblock.setAttribute("id", "picbox");
document.body.appendChild(divblock);
}



function showpic(menucontents, obj)
{
	var i=1;
	if (ie||ns6)
	{
		show_gray_bg();
		
		if (!document.getElementById("picbox")) createpicbox();
		
		dropmenuobj=document.getElementById("picbox");
		dropmenuobj.innerHTML='<table><tr><td align=right style="padding:8px 3px 0px 0px"><a href="" onclick="hidepic(); return false"><img src="/img/close.gif"></a>&nbsp;</td></tr><tr><td align=center><a href="" onclick="hidepic(); return false">'+menucontents+'</a></td></tr></table>';
		var li=document.getElementById('theimage');
		li.onload=function () {
			dropmenuobj=document.getElementById("picbox");
			dropmenuobj.style.top=document.body.scrollTop+document.body.clientHeight/2-parseInt((this.height+40)/2);
			dropmenuobj.style.left=screen.availWidth/2-this.width/2;
			dropmenuobj.style.visibility="visible";
			hidebox(1);
		}
	}
}

function go(imgsrc,ID)
{
	showbox('Loading...<br><img src="/img/loadinganim.gif">',null,220);
	showpic('<img id="theimage" style="border:1px solid #CCCCCC; padding:1px; margin:5px" src='+imgsrc+'>', document.getElementById('b'+ID));
	if(document.getElementById('bimg'+ID)) 
	{	
		document.getElementById('theimage').alt=document.getElementById('bimg'+ID).alt;
		document.getElementById('theimage').title=document.getElementById('bimg'+ID).title+' [Click to close this window]';
	}
}