document.write('<DIV style="POSITION: absolute; DISPLAY: none; TOP: 0px; LEFT: 0px; border: 1px outset LIGHTSKYBLUE" id=floating_div></DIV>');

function viewpic(ele) {
	float_picture(ele);
}

var sml_img_title='';

function float_picture(sml_img) {
	var floating_div=getEle('floating_div');
	sml_img_title=sml_img.title;
	var src=sml_img.src; var y=src.lastIndexOf('pics/');
	if (y<0) return;
	src=src.substr(y); y=src.lastIndexOf('.'); var ext=src.substr(y); var f=src.substr(0,y);
	y=f.lastIndexOf('_'); f=f.substr(0,y);
	src=f+'_640'+ext;

 	var p = getElePosi(sml_img);
	floating_div.style.top=p.y-480;

	floating_div.style.backgroundColor='#F5F5F5';
	floating_div.innerHTML='<IMG id=pic src=pics/aniloading.gif onload=picLoaded(this);>';
	floating_div.style.display='inline';
	floating_div.style.left=(parseInt(screen.availWidth)-parseInt(floating_div.offsetWidth))/2;
	var pic=getEle('pic'); pic.src=src;
	floating_div.style.left=(parseInt(screen.availWidth)-parseInt(floating_div.offsetWidth))/2;

//	var s='<TABLE class=pics_hdr cellSpacing=0 cellPadding=0 width="'+(floating_div.offsetWidth-40)+'" height=20>';
	var s='<TABLE class=pics_hdr cellSpacing=0 cellPadding=0 width="480" height=20>';
//	s+='<TR><TD width=6></TD><TD id=img_title>'+sml_img_title+'</TD><TD width=18>';
	s+='<TR><TD width=6></TD><TD id=img_title>.. loading '+sml_img_title+' ..</TD><TD width=18>';
	s+='<A href="javascript:hide_floating_div();"><IMG title=Close border=0 alt=pics_close.gif src="pics/pics_close.gif" width=14 height=14></A></TD></TR></TABLE>';
	floating_div.innerHTML=s+floating_div.innerHTML;

	floating_div.style.zIndex=9999;
}

function picLoaded(img) {
	if (img.src.indexOf('aniloading.gif')>0) return;

	var floating_div=getEle('floating_div');
	floating_div.style.left=(parseInt(screen.availWidth)-parseInt(floating_div.offsetWidth))/2;
	try {
		img_title.width=(parseInt(floating_div.offsetWidth)-24)+'px';
		img_title.innerHTML=sml_img_title;
	} catch(e) { }
}

function hide_floating_div() { getEle('pic').src='pics/aniloading.gif'; getEle('floating_div').style.display='none'; }
