function popImage(obj,img,href,lx) 
{ 
	var layer = document.getElementById("ImageLayer1");
	var t=obj.offsetTop;
	var l=obj.offsetLeft;
	while(obj=obj.offsetParent){
		t+=obj.offsetTop;
		l+=obj.offsetLeft;
	}
	var content = "<table border=0 width=138 height=138  style='BACKGROUND-COLOR: transparent'><tr><td align='center' valign='middle'>\n"+
	"<A href="+href+" target=_blank><IMG src='"+img+"' onload='DrawImage(this,"+ lx +");' border='0'align='absmiddle' ></A></td></tr></table>"; 
			layer.innerHTML=content;
			layer.style.left =l +40;
			layer.style.top = t -20;
			layer.style.visibility='visible';
} 
function DrawImage(img,_lx){ 
	//if(DrawImage.arguments.length < 1) 
	//width=height=180;
	var image=new Image(); 
	image.src=img.src; 
	
	
	if(image.width>0 && image.height>0)
	{
	 
	  switch (_lx)
	 {
	   case 0:
	     img.width=120;
	     img.height=120;
	     break;
	   case 1:
	     img.width=104;
	     img.height=130;
	     break;  
	  case 2:
	     img.width=120;
	     img.height=96;
	     break; 
	  case 3:
	     img.width=65;
	     img.height=130;
	     break;   
	 }
	 // if(image.width>width)
	 // {
	  	//rate=image.height/image.width;
	    //newHeight=rate*width;
	  	//img.width=width;
	  	//img.height=newHeight;
	 // } 
	}
	//if(img.height>height)
	//{
		//rate=image.width/image.height;
		//newWidth=rate*height;
		//img.height=height;
		//img.width=newWidth;
	//}
}   


function hideLayer()
{	
	var layer = document.getElementById("ImageLayer1");
	layer.style.visibility='hidden';
}
function dispear(){
	var layer = document.getElementById("ImageLayer1");
	if ((layer.style.width>0)&& (layer.style.height>0)){
		layer.style.width-=1;
		layer.style.height-=1;
	}
	else {
		layer.style.visibility='hidden';
		if (window.interval)
		clearInterval(interval);
	}
}   

function high(which2){
	theobject=which2;
	highlighting=setInterval("highlightit(theobject)",40);
}
function low(which2){
	clearInterval(highlighting);
	which2.filters.alpha.opacity=40;
}
function highlightit(cur2){
	if (cur2.filters.alpha.opacity<100)
		cur2.filters.alpha.opacity+=5
	else if (window.highlighting)
		clearInterval(highlighting)
}
