function trans_link(href_shadow,href_hover,std_end,std_end_mail,show_timeout){
 var hrefs=document.links;
 for(href_i=0;href_i<hrefs.length;href_i++){
  var thref=hrefs[href_i];
  href_title=thref.title;
  if(href_title==""||href_title==null){
   href_title=thref.href;
   href_spl=location.href.split('//');
   href_spl=href_spl[1].split('/');
   href_inner=thref.innerHTML;
   if(href_inner.substring(0,7)!="http://"&&href_inner.substring(0,4)=="www."){
    href_inner="http://"+href_inner;
   }
   if(href_title.substring(href_title.length-1,href_title.length)=="/"&&href_inner.substring(href_inner.length-1,href_inner.length)!="/"){
    href_inner+="/";
   }
   if(href_title.indexOf(href_spl[0])>0||href_inner==href_title){
    href_title="";
   }
  }
  if(href_title!=""){
   thref.onmouseover=function(e){
    this.href_shadow=href_shadow;
    href_title=this.title;
    if(href_title==""){
     href_title=this.href;
    }
    if(href_title.substring(0,7)=="mailto:"){
     href_end=std_end_mail;
     href_wr_title=href_title.substring(7,href_title.length);
    }else{
     href_wr_title=href_title
     href_end=std_end;
    }
    this.title="";
    href_hover.innerHTML=href_wr_title+href_end;
    adjust_to_pos(e,1,-12,18,this.href_shadow);
    setTimeout('document.getElementById("'+this.href_shadow.id+'").style.display="";',show_timeout);
   }
   thref.onmouseout=function(){
    href_shadow.style.display="none";
    href_hover.innerHTML="";
    this.title=href_title;
   }
  }
 }
}
function trans_imgsize(maxWidth,maxHeight,maxSize,showError,allowResize){
 var images=document.images;
 if(allowResize){
  var nimagefloat=document.createElement("div");
  nimagefloat.id="nimagefloat";
  nimagefloat.style.display="none";
  nimagefloat.style.zIndex="101";
  nimagefloat.style.position="absolute";
  nimagefloat.onmouseover=function(){this.style.display="";}
  nimagefloat.innerHTML="<img id='nimagefloatimg' src='img/icon/+.gif'>";
  document.body.appendChild(nimagefloat);
 }
 for(image_i=0;image_i<images.length;image_i++){
  var timage=images[image_i];
  image_src=timage.src;
  image_width=timage.width;
  image_height=timage.height;
  if(document.fileSize){
   image_filesize=timage.fileSize/1024;
  }else{
   image_filesize=0;
  }
  if(image_width>maxWidth||image_height>maxHeight||image_filesize>maxSize){
   if(image_height>maxHeight){
    image_text="the resolution (height) of this image is too large";
    n_image_height=maxHeight;
    n_image_width=(maxHeight/image_height)*image_width;
   }else{
    n_image_height="";
   }
   if(image_width>maxWidth){
    image_text="the resolution (width) of this image is too large";
    n_image_width=maxWidth;
    n_image_height=(maxWidth/image_width)*image_height;
   }else{
    n_image_width="";
   }
   if(image_filesize>maxSize){
    image_text="the filesize of this image is too large";
   }
   var nimage=document.createElement("div");
   nimage.id=image_i;
   nimage.style.width=(n_image_width+2)+"px";
   if(showError==1){
    if(n_image_width!=""&&n_image_width!=null){
     t_width=n_image_width+2;
    }else{
     t_width=image_width+2;
    }
    if(document.fileSize){
     nimage.innerHTML="<img src='"+image_src+"' id='"+image_i+"img' style='width:"+n_image_width+"px;height:"+n_image_height+"px;border:1px dashed #FFFFFF;'/><br/><table style='border:1px solid #000000;width:"+t_width+"px;' cellspacing='0' cellpadding='0'><tr><td style='padding-left:3px;padding-right:3px;vertical-align:middle;' rowspan='3'><img src='img/icon/!.gif' border='0'/></td><td>"+image_text+"</td></tr><tr><td>resolution: "+image_width+"*"+image_height+"</td></tr><tr><td>filesize: "+Math.round(image_filesize*100)/100+"Kb</td></tr></table>";
    }else{
     nimage.innerHTML="<img src='"+image_src+"' id='"+image_i+"img' style='width:"+n_image_width+"px;height:"+n_image_height+"px;border:1px dashed #FFFFFF;'/><br/><table style='border:1px solid #000000;width:"+t_width+"px;' cellspacing='0' cellpadding='0'><tr><td style='padding-left:3px;padding-right:3px;vertical-align:middle;' rowspan='2'><img src='img/icon/!.gif' border='0'/></td><td>"+image_text+"</td></tr><tr><td>resolution: "+image_width+"*"+image_height+"</td></tr></table>";
    }
    nimage.style.background="#FF0000";
    nimage.style.color="#FFFFFF";
    nimage.style.fontSize="10px";
    nimage.style.textAlign="left";
   }else{
    nimage.innerHTML="<img src='"+image_src+"' id='"+image_i+"img' style='width:"+n_image_width+"px;height:"+n_image_height+"px;border:none;'/>";
   }
   timage.parentNode.replaceChild(nimage,timage);
   if(allowResize&&n_image_width!=""&&n_image_height!=""&&n_image_width!=null&&n_image_height!=null){
    d_image_width=image_width;
    d_image_height=image_height;
    trans_imgresize(document.getElementById(image_i+"img"),n_image_width,n_image_height,d_image_width,d_image_height);
   }
  }
 }
}
function trans_imgresize(thisid,n_image_width,n_image_height,d_image_width,d_image_height){
 document.getElementById("nimagefloatimg").src="img/icon/+.gif";
 thisid.onmouseover=function(){
  document.getElementById("nimagefloatimg").src="img/icon/+.gif";
  var thisposleft=get_elementPosition("x",thisid);
  var thispostop=get_elementPosition("y",thisid);
  document.getElementById("nimagefloat").style.left=thisposleft+n_image_width-20+"px";
  document.getElementById("nimagefloat").style.top=thispostop+n_image_height-20+"px";
  document.getElementById("nimagefloat").style.display="";
  document.getElementById("nimagefloat").onclick=function(){
   document.getElementById("nimagefloatimg").src="img/icon/-.gif";
   thisid.onmouseover=function(){
    document.getElementById("nimagefloatimg").src="img/icon/-.gif";
    document.getElementById("nimagefloat").style.left=thisposleft+d_image_width-20+"px";
    document.getElementById("nimagefloat").style.top=thispostop+d_image_height-20+"px";
    document.getElementById("nimagefloat").style.display="";
    document.getElementById("nimagefloat").onclick=function(){
     if(old_border!=null&&old_border!=""){
      thisid.style.border=old_border;
     }else{
      thisid.style.border="none";
     }
     thisid.style.width=n_image_width+"px";
     thisid.style.height=n_image_height+"px";
     thisid.style.position="";
     document.getElementById("nimagefloat").style.left=thisposleft+d_image_width-20+"px";
     document.getElementById("nimagefloat").style.top=thispostop+d_image_height-20+"px";
     document.getElementById("nimagefloat").style.display="none";
     trans_imgresize(thisid,n_image_width,n_image_height,d_image_width,d_image_height);
    }
   }
   old_border=thisid.style.border;
   thisid.style.border="1px solid #000000";
   thisid.style.position="absolute";
   thisid.style.zIndex=100;
   thisid.style.left=thisposleft-4+"px";
   thisid.style.top=thispostop-4+"px";
   thisid.style.width=d_image_width+"px";
   thisid.style.height=d_image_height+"px";
   document.getElementById("nimagefloat").style.left=thisposleft+d_image_width-20+"px";
   document.getElementById("nimagefloat").style.top=thispostop+d_image_height-20+"px";
  }
 }
 thisid.onmouseout=function(){
  document.getElementById("nimagefloat").style.display="none";
 }
}