﻿//获取对象的绝对位置
function getoffset(e,x){
	e.clientHeight;
	var l=e.offsetLeft;
	var t=e.offsetTop;
	while(e=e.offsetParent){
	   l += e.offsetLeft;
	   t += e.offsetTop;
	}
	var x = document.getElementById(x);
	var y = document.getElementById("apDiv1");
	x.style.left =l+"px";
	x.style.top = t+"px";
	if(x.style.display == ''){
		x.style.display = "none";
		y.style.display = "";
	}else{
		x.style.display = "";
		y.style.display = "none";
	}
}
document.write("<div id='apDiv1' style='cursor:pointer;width:180px;height:60px; position:relative;' onMouseOver='getoffset(this,\"apDiv2\")'><embed src='http://www.3c168.com/res/flash/20101/0ab58fc3-2246-417c-8755-3ff209fd5273.swf' width='180' height='60'/></div>");
document.write("<div id='apDiv2' style='display:none;cursor:pointer;width:180px;height:160px; position:absolute;' onMouseOut='getoffset(this,\"apDiv2\")'><embed src='http://www.3c168.com/res/flash/20101/6a84187f-593e-40f8-a997-1ebf7a5d4414.swf' width='180' height='160'/>");
document.write("</div>");