// JavaScript Document
<!--[CDATA[
		   var time1=new Date();
		   var strkey="";
		   function $(id)
		   {
			   return document.getElementById(id);
		}
		function cg(obj)
		{
			obj.style.background='#CCCCCC';
			obj.onmouseout=function()
			{
				obj.style.background="url(img/shopDot.gif) no-repeat 5px 8px";
				obj.setAttribute("style","background-repeat:no-repeat;background-position:5px 8px;");
			}
			obj.onclick=function()
			{
			obj.getAttribute("value")!=""?window.open(obj.getAttribute("value")):"";	
			}
		}
		function setfont(size)
		{
			switch(size)
			{
								case "1":
				$("newscontent").className="content_s";
				break;
								case "2":
				$("newscontent").className="content_z";
				break;
								case "3":
				$("newscontent").className="content_b";
				break;
			}
		}
		function showbnr(obj)
		{
		    var tag=obj.getElementsByTagName("ul");
		    if(tag.length>0)
		    {
		        var DropListID="ul"+Math.random();
		        tag[0].setAttribute("id",DropListID);
		        tag[0].style.zIndex="999";
		        tag[0].style.visibility="visible";		        
		        setOffsets(obj,DropListID);  
		        obj.style.background="#FFB56A";
		        obj.onmouseout=function()
		        {
		            tag[0].style.zIndex="-999";
		            tag[0].style.visibility="hidden";
		            obj.style.background="transparent";
		        }
		    }
		}
		//计算显示位置
function calculateOffset(field,attr) {
      var offset = 0;
      while(field) {
          offset += field[attr];
          field = field.offsetParent;
      }
      return offset;
}
function setOffsets(obj,id)
{
	  strkey=obj;
	  AddLiOnMouse();//添加鼠标移动上去的效果
      $(id).style.width =strkey.offsetWidth-2;
	  $(id).style.height=strkey.offsetHeight-2;
	  var Swidth=document.body.clientWidth;
      var left = calculateOffset(strkey, "offsetLeft");
      var top = calculateOffset(strkey, "offsetTop")+strkey.offsetHeight;;
      $(id).style.left = left + "px";
      $(id).style.top = top + "px";
}
function AddLiOnMouse()
{
	var li=strkey.getElementsByTagName("li");
	if(li<=0)
	{
	return;
	}
	for(var i=0;i<li.length;i++)
	{
		li[i].onmouseover=function(){this.style.background='#DCF1FA';}
		li[i].onmouseout=function(){this.style.background='#ffffff';}
	}
}