﻿ // 小寒 参考自6KBBS 05.03.20
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -10;
 var space = 1;
var isvisible;
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array
function HideMenu() 
{
 var mX;
 var mY;
 var vDiv;
 var mDiv;
	if (isvisible == true)
{
		vDiv = document.all("menuDiv1");
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
			vDiv.style.visibility = "hidden";
			isvisible = false;
		}
}
}

function ShowMenu(vMnuCode,tWidth) {
	vSrc = window.event.srcElement;
    vMnuCode = "<table id='submenu' cellpadding=1 cellspacing=1 style='width:"+tWidth+"' class=bg_d onmouseout='HideMenu()'><tr><td class=bg_d align=center valign=top width=12>M<br>E<br>N<br>U</td><td class=bg_l valign=top><p style='margin:4px'>" + vMnuCode + "</p></td></tr></table>";
	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+4;
	t = vSrc.offsetTop + topMar + h + space+3;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}
	menuDiv1.innerHTML = vMnuCode;
	menuDiv1.style.top = t;
	menuDiv1.style.left = l;
	menuDiv1.style.visibility = "visible";
	isvisible = true;
}



//改变图片大小
function resizepic(thispic)
{
if(thispic.width>650) thispic.width=650;
}
function resizepic1(thispic)
{
if(thispic.width>180) thispic.width=180;
}
//无级缩放图片大小
function bbimg(o)
{
  var zoom=parseInt(o.style.zoom, 10)||100;
  zoom+=event.wheelDelta/12;
  if (zoom>0) o.style.zoom=zoom+'%';
  return false;
}


function killErrors() {
return true;
}

window.onerror = killErrors;
dd



