﻿//引用代码示例(图片外面要有一个唯一的标签包含img标签)  <a href="1a-wet-process-resin.html"> <img src="1-pu-resin/1-1s.jpg" alt="" onmousemove="setBigPic('1-pu-resin/2-1b.jpg',200,200,-20,-20,'5','#333',this)" onmouseout="ResetPic('1-pu-resin/1-1s.jpg',this)"/></a>
function setBigPic(bigpic,width,height,moveX,moveY,borderWidth,borderColor,ob){ob.parentNode.style.cssText="position:relative;z-index:999;";ob.style.cssText="position:absolute;left:"+moveX+"px; top:"+moveY+"px;border:"+borderWidth+"px solid "+borderColor;ob.setAttribute("src",bigpic);ob.setAttribute("width",width);ob.setAttribute("height",height);}
function ResetPic(smallPic,ob){ob.setAttribute("src",smallPic);ob.removeAttribute("width");ob.removeAttribute("height");ob.removeAttribute("border");ob.style.cssText="position:inherit;";ob.parentNode.style.cssText="z-index:-999";}
var tempob=new Object();
function showlinkpic(ob,optNode,pic,picwidth,picheight)
{
	var parentob=ob.parentNode;
	var span=parentob.getElementsByTagName(optNode);
	tempob.txt=span[0].innerHTML;
	span[0].innerHTML="";
	var img=document.createElement("img");
	img.setAttribute("src",pic);
	img.setAttribute("width",picwidth);
	img.setAttribute("height",picheight);
	span[0].appendChild(img);
	}
	
function resetspan(ob,optNode)
{
	var parentob=ob.parentNode;
	var span=parentob.getElementsByTagName(optNode);
	span[0].innerHTML=tempob.txt;
	}
