function showarticle(sid)
{
window.open("go.asp?id="+sid);
}
function gosearch()
{
	window.location='search.asp?openmenu='+openmenu;
}
function showbulletin(sid)
{
window.open("bulletin.asp?id="+sid,"","location=0,directories=0,scrollbars=yes,status=0,menubar=0,width=500,height=400");
}
function changelocate(sid)
{
window.location="subclass.asp?subclass="+sid+"&openmenu="+openmenu;
}
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
MenuTitle=eval("menuTitle"+sid);
if (whichEl.style.display == "none")
{
closeall();
eval("submenu" + sid + ".style.display=\"\";");
MenuTitle.background="Pic/title_bg_show.gif";
openmenu=sid;
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
MenuTitle.background="Pic/title_bg_quit.gif";
openmenu=0;
}
}
function closeall()
{
for(i=0;i<= mclassid.length-1;i++)
{
eval("submenu"+mclassid[i]+".style.display=\"none\";");
eval("menuTitle"+mclassid[i]+".background=\"Pic/title_bg_quit.gif\";");
}
}
function look(i,obj){
	var b;
	var url;
	var a = obj.lid.value;
	if (i=="look"){
		var len = obj.elements.length;
    	for(i=0;i<len;i++){
		  	if (obj.elements[i].type=="radio" && obj.elements[i].checked==true )
			{	b = obj.elements[i].value;
				//alert(b);
				}
    	}
		url = "vote.asp?id="+a+"&value="+b;
	}else{
		url = "vote.asp?id="+a;
	}
	window.open(url,'view',"width=350,height=200,scrollbars=no,directories=no,status=no,menubar=no,resizable=no");
	return false;
}
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -5;
 var space = 1;
 var isvisible;
 var MENU_SHADOW_COLOR='#999999';
 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("menuDiv");
		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' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' style='width:97%;border: 1px; background-color: #6595D6;' onmouseout='HideMenu()'><tr height=23><td nowrap align=left style='background-color: #FFFFFF;' valign=top >" + vMnuCode + "</td></tr></table>";

	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+4;
	t = vSrc.offsetTop + topMar + h + space-2;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menuDiv.innerHTML = vMnuCode;
	menuDiv.style.top = t;
	menuDiv.style.left = l;
	menuDiv.style.visibility = "visible";
	isvisible = true;
    makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}
function makeRectangularDropShadow(el, color, size)
{
	var i;
	for (i=size; i>0; i--)
	{
		var rect = document.createElement('div');
		var rs = rect.style
		rs.position = 'absolute';
		rs.left = (el.style.posLeft + i) + 'px';
		rs.top = (el.style.posTop + i) + 'px';
		rs.width = el.offsetWidth + 'px';
		rs.height = el.offsetHeight + 'px';
		rs.zIndex = el.style.zIndex - i;
		rs.backgroundColor = color;
		var opacity = 1 - i / (i + 1);
		rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
		el.insertAdjacentElement('afterEnd', rect);
		global.fo_shadows[global.fo_shadows.length] = rect;
	}
}