var imginfo = document.getElementById("imginfo");
var gg = imginfo.getElementsByTagName("img");
var ei = document.getElementById("enlarge_images");
var image=new Image(); 
var widths,heights;
for(i=0; i<gg.length; i++){
	var ts = gg[i];
	ts.style.cursor='hand';
	//ts.onmousemove = function(event){
		//event = event || window.event;
		//ei.style.display = "block";
		//image.src = this.src; 
		//widths=500;
		//heights=500;
	   // if(image.width>widths)
	  //   	{heights=(image.height*widths)/image.width;}
		//else
		//{heights=image.height;}
	   // if(image.height>heights)
	   //  	{widths=(image.width*heights)/image.height;}
		//else
		//{widths=image.width;}

		//ei.innerHTML = '<img src="' + this.src + '" width=' + widths + ' height=' + heights + '  />';
		//if(window.screen.availHeight-document.body.scrollTop - event.clientY<window.screen.availHeight/2)
		//{ei.style.top = document.body.scrollTop + event.clientY - heights -15 + "px";}
		//else
		///{ei.style.top  = document.body.scrollTop + event.clientY + 10 + "px";}
		//if(window.screen.availWidth-document.body.scrollLeft - event.clientX<window.screen.availWidth/2)
		//{	ei.style.left = document.body.scrollLeft + event.clientX - widths - 15 + "px";}
		//else
		//{ei.style.left = document.body.scrollLeft + event.clientX + 10 + "px";}
	//}
	//ts.onmouseout = function(){
		//ei.innerHTML = "";
		//ei.style.display = "none";
	//}
	ts.onclick = function(){
		image.src = this.src; 
		window.showModelessDialog(this.src,'','dialogHeight:' + (image.height + 46) + 'px;dialogWidth:' + (image.width + 7) + 'px;resizable:no;scroll:no;status:no;center=yes;help=no')
		//+ "?Rnd="+Math.random()
	}
}
