function popupimage(picurl) {
	newpopup=window.open('','','height=10,width=10');
	var tmp = newpopup.document;
	tmp.write("<HTML><HEAD><TITLE></TITLE>");
	tmp.write("<script language='javascript'>");
	tmp.write('var NS = (navigator.appName=="Netscape")?true:false;');

	tmp.write('function fitPic() {');
	tmp.write('iWidth = (NS)?window.innerWidth:document.body.clientWidth;');
	tmp.write('iHeight = (NS)?window.innerHeight:document.body.clientHeight;');
	tmp.write('iWidth = document.images[0].width - iWidth;');
	tmp.write('iHeight = document.images[0].height - iHeight;');
	tmp.write('window.resizeBy(iWidth, iHeight-1);');
	tmp.write('self.focus();');
	tmp.write('};');

	tmp.write('</script>');
	tmp.write('</HEAD>');
	tmp.write("<BODY bgcolor='#FFFFFF' onload='fitPic();' topmargin=0 marginheight=0 leftmargin=0 marginwidth=0>");
		tmp.write("<script language='javascript'>");
		tmp.write('document.write( \'<img src="' +picurl +'" border=0>\');');
		tmp.write("</script>");
	tmp.write("</BODY></HTML>");
	tmp.close();
return true;
}


/* gallery part */
function GrayClose() {
//parent;
	d = parent.document.body;
	imghold = parent.document.getElementById('imgholder');
		while (imghold.firstChild) {  imghold.removeChild(imghold.firstChild);	}
  	d.removeChild(imghold);
	olddiv = parent.document.getElementById('grayer');
  	d.removeChild(olddiv);
	return true;     
}

function GrayOut(Pic) {
	//create transparent fiv
	newdiv = document.createElement('div');
	newdiv.setAttribute('id', 'grayer');
    newdiv.className='graypannel';
	document.body.appendChild(newdiv);
	
	//create image div placeholder
	newdiva = document.createElement('div');
	newdiva.setAttribute('id', 'imgholder');
    newdiva.className='imgplace';
	document.body.appendChild(newdiva);
	//insert the image on center page

		newimg = document.createElement('img');
		newimg.setAttribute('id','overimg');
		newimg.src=Pic;
		newimg.onclick=GrayClose;
    newimg.className='overimage';
	//insert all on stage	
//	document.body.appendChild(newimg);	
	newdiva.appendChild(newimg);	
	return true;
} 
/* gallery part */


function hidestatus(){
	window.status=''
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus
