
function hideLayer()
{ 
 var layer = document.getElementById("popImageLayer");
 layer.style.visibility='hidden';
}



//-----------------------------  Í¼Æ¬Êó±êÔ¤ÀÀ  ---------------------------------------------------------------------
function popic(obj,img)  //ÎÞÁ´½Ó
{
 var layer = document.getElementById("popImageLayer");
 var t=obj.offsetTop;
 var l=obj.offsetLeft;
 while(obj=obj.offsetParent){
  t+=obj.offsetTop;
  l+=obj.offsetLeft;
 }
 var content = "<table border=0><tr><td align='center' valign='middle'>\n"+
 "<IMG border=0 src='"+img+"' onload='DrawImage(this,350,350);'  onMouseOut='low(this);hideLayer();' onMouseOver=high(this) style='FILTER: alpha(opacity=35)'></td></tr></table>"; // onClick='hideLayer();'

   layer.innerHTML=content;
   layer.style.left =l-100;
   layer.style.top = t-50;
   layer.style.visibility='visible';
}



function popic_a(obj,img,href)
{
 var layer = document.getElementById("popImageLayer");
 var t=obj.offsetTop;
 var l=obj.offsetLeft;
 while(obj=obj.offsetParent){
  t+=obj.offsetTop;
  l+=obj.offsetLeft;
 }
 var content = "<table border=0><tr><td align='center' valign='middle'>\n"+
 "<A href="+href+" onFocus='this.blur()'><IMG border=0 src='"+img+"' onload='DrawImage(this,300,300);'  onMouseOut='low(this);hideLayer();' onMouseOver=high(this) style='FILTER: alpha(opacity=35)'></A></td></tr></table>"; // onClick='hideLayer();'

   layer.innerHTML=content;
   layer.style.left =l-80;
   layer.style.top = t-50;
   layer.style.visibility='visible';
}




function popImage(obj,img,href)
{
 var layer = document.getElementById("popImageLayer");
 var t=obj.offsetTop;
 var l=obj.offsetLeft;
 while(obj=obj.offsetParent){
  t+=obj.offsetTop;
  l+=obj.offsetLeft;
 }
 var content = "<table border=0><tr><td align='center' valign='middle'>\n"+
 "<A href="+href+" target=_blank onFocus='this.blur()'><IMG border=0 src='"+img+"' onload='DrawImage(this,240,240);'  onMouseOut='low(this);hideLayer();' onMouseOver=high(this) style='FILTER: alpha(opacity=35)'></A></td></tr></table>"; // onClick='hideLayer();'

   layer.innerHTML=content;
   layer.style.left =l-45;
   layer.style.top = t-33;
   layer.style.visibility='visible';
}


//-----------------------------  Í¼Æ¬Êó±êÔ¤ÀÀ£¨´ó£©  ---------------------------------------------------------------------
function pop_big(obj,img,href)
{
 var layer = document.getElementById("popImageLayer");
 var t=obj.offsetTop;
 var l=obj.offsetLeft;
 while(obj=obj.offsetParent){
  t+=obj.offsetTop;
  l+=obj.offsetLeft;
 }
 var content = "<table border=0><tr><td align='center' valign='middle'>\n"+
 "<A href="+href+" target=_blank onFocus='this.blur()'><IMG border=0 src='"+img+"' onload='DrawImage(this,500,400);'  onMouseOut='low(this);hideLayer();' onMouseOver=high(this) style='FILTER: alpha(opacity=30)'></A></td></tr></table>"; // onClick='hideLayer();'

   layer.innerHTML=content;
   layer.style.left =l-110;
   layer.style.top = t-40;
   layer.style.visibility='visible';
}


function DrawImage(img,width,height){
 if(DrawImage.arguments.length <= 1)
  width=height=70;
 var image=new Image();
 image.src=img.src;
 if(image.width>0 && image.height>0)
 {
   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 high(which2){
 theobject=which2;
 highlighting=setInterval("highlightit(theobject)",10);
}
function low(which2){
 clearInterval(highlighting);
 which2.filters.alpha.opacity=10;
}
function highlightit(cur2){
 if (cur2.filters.alpha.opacity<100)
  cur2.filters.alpha.opacity+=5
 else if (window.highlighting)
  clearInterval(highlighting)
}

function delightit(cur2){
 if (cur2.filters.alpha.opacity>5)
  cur2.filters.alpha.opacity-=5;
 else if (window.highlighting)
   clearInterval(highlighting);
}

