
var dropShow=false
	var currentID
	function dropdown(el)
	{
		if(dropShow)
		{
			dropFadeOut()
			}else{
			currentID=el
			el.style.visibility="visible"
			dropFadeIn()
		}
	}
	function dropFadeIn()
	{
		//选单淡入的效果
		if(currentID.filters.alpha.opacity<100)
		{
		currentID.filters.alpha.opacity+=20
		fadeTimer=setTimeout("dropFadeIn()",50)
		}else{
		dropShow=true
		clearTimeout(fadeTimer)
		}
	}
	function dropFadeOut()
	{
		//选单淡出的效果
		if(currentID.filters.alpha.opacity>0){
		clearTimeout(fadeTimer)
		currentID.filters.alpha.opacity-=20
		fadeTimer=setTimeout("dropFadeOut()",50)
		}else{
		dropShow=false
		currentID.style.visibility="hidden"
		}
	}
	function dropdownHide()
	{
		if(dropShow){
		dropFadeOut()
		dropShow=false
		}
	}
	function hiLight(el)
	{
		//高亮度显示指标位置
		if(dropShow){
		for(i=0;i<el.parentElement.childNodes.length;i++){
		el.parentElement.childNodes(i).className="link_record0"
		}
		el.className="link_record1"
		}
	}
	function CheckMe(el)
	{
		//替换显示内容
		document.all.link_text.innerText=el.innerText
	}
	document.onclick=dropdownHide
	
// 滚动脚本 Begin ================================================
// 该脚本实现水平方向和垂直方向的无缝滚动功能
//
//第一步在头:<script type="text/javascript" language="javascript" src="JScript/function.js"></script>
//第二步在最后body前需要引用<script type="text/javascript" language="javascript">StartRollV();StartRollH();</script>

//-- 垂直滚动 ------------------------------------------------------------
function MarqueeV()
{
	if(oRollV2.offsetTop - oRollV.scrollTop <= 0)
	{
		oRollV.scrollTop -= oRollV1.offsetHeight;
	}
	else
	{
		oRollV.scrollTop++;
	}
}

function StartRollV()
{
	var rollspeed = 120;
	var MyMar;

	if (typeof(oRollV) == "undefined")
	{
		return;
	}
	else
	{
		
	}
	
	if (parseInt(oRollV.style.height) >= oRollV2.offsetTop)
	{
		oRollV.style.height = oRollV2.offsetTop;
		return;
	}
	oRollV2.innerHTML = oRollV1.innerHTML;	
	MyMar=setInterval(MarqueeV,rollspeed)
	oRollV.onmouseover=function() {clearInterval(MyMar)}
	oRollV.onmouseout=function() {MyMar=setInterval(MarqueeV,rollspeed)}
}

//-- 垂直滚动 -----------------------------------------------------------------
function MarqueeVLn()
{
	if(oRollVLn2.offsetTop - oRollVLn.scrollTop <= 0)
	{
		oRollVLn.scrollTop -= oRollVLn1.offsetHeight;
	}
	else
	{
		oRollVLn.scrollTop++;
	}
}

function StartRollVLn()
{
	var rollspeed = 120;
	var MyMar;

	if (typeof(oRollVLn) == "undefined")
	{
		return;
	}
	else
	{
		
	}
	
	if (parseInt(oRollVLn.style.height) >= oRollVLn2.offsetTop)
	{
		oRollVLn.style.height = oRollVLn2.offsetTop;
		return;
	}
	oRollVLn2.innerHTML = oRollVLn1.innerHTML;	
	MyMar=setInterval(MarqueeVLn,rollspeed)
	oRollVLn.onmouseover=function() {clearInterval(MyMar)}
	oRollVLn.onmouseout=function() {MyMar=setInterval(MarqueeVLn,rollspeed)}
}

//-- 水平滚动 -----------------------------------------------------------------
function MarqueeH()
{
	if(oRollH2.offsetLeft - oRollH.scrollLeft <= 0)
	{
		oRollH.scrollLeft -= oRollH1.offsetWidth;
	}
	else
	{
		oRollH.scrollLeft++;
	}
}
function StartRollH()
{
	var rollspeed = 40;
	var myInter;

	if (typeof(oRollH) == "undefined")
	{
		return;
	}
	else
	{
		
	}
	if (parseInt(oRollH.style.width) >= oRollH2.offsetLeft)
	{
		oRollH.style.width = oRollH2.offsetLeft;
		return;
	}
	oRollH2.innerHTML = oRollH1.innerHTML;
	myInter = setInterval(MarqueeH,		rollspeed);
	oRollH.onmouseover = function() {clearInterval(myInter)};
	oRollH.onmouseout = function() {myInter = setInterval(MarqueeH, rollspeed)};
}
//-- 水平滚动 --

// 滚动脚本 End =================================================

//============================================
// 查看公告：打开一个自定义的窗口
// url		: 路径
// width	: 窗口的宽度
// height	: 窗口的高度
// condition: 对窗口属性的限制条件
//============================================
function openScript(url, width, height, condition)
{
	var newWindow = window.open(url,"openScript","width=" + width + ",height=" + height + "," + condition);
}



//============================================
// 查看公告：打开一个新的自定义窗口
//============================================
function ViewAnn(id) {
	var annWindow = window.open("../News/BulletinView.aspx?BLTID=" + id, "ViewAnn","width=550,height=400,left=0,top=0,scrollbars=1,status=1,resizable=0");
	
	annWindow.focus();
}

function ViewAnn2(id) {
	var annWindow = window.open("msgView.aspx?MSGID=" + id, "ViewAnn","width=550,height=400,left=0,top=0,scrollbars=1,status=1,resizable=0");
	
	annWindow.focus();
}

function ViewAnn3() {
	var annWindow = window.open("UserWeb/ssUserEdit.aspx", "ViewAnn","width=550,height=400,left=0,top=0,scrollbars=1,status=1,resizable=0");
	
	annWindow.focus();
}

function ViewAnn4() {
	var annWindow = window.open("../UserWeb/ssUserEdit.aspx", "ViewAnn","width=550,height=400,left=0,top=0,scrollbars=1,status=1,resizable=0");
	
	annWindow.focus();
}

function ViewAnn5(id) {
	var annWindow = window.open("ViewManInfo.aspx?ManID=" + id, "ViewAnn","width=500,height=550,left=0,top=0,scrollbars=1,status=1,resizable=0");
	
	annWindow.focus();
}




//============================================
// 打开本窗口的视频：
// path		: 地址
//============================================
function OpenMediea(path)
{
	window.document.all.MediaPlayer.Filename=path;

}


//============================================
// 查看投票：打开一个新的自定义窗口
// id		: 投票ID
//============================================
function ViewVote(id) {
	var voteWindow = window.open("Vote.aspx?action=view&id=" + id, "Vote","width=500,height=400,left=0,top=0,scrollbars=1,status=1,resizable=0");
	
	voteWindow.focus();
}


//============================================
// 输出图片新闻列表(有缩微图)
// img		: 缩微图地址
// url		: 新闻路径
// alt		: 新闻标题全称
// blank	: 是否新窗口打开
// highlight: 是否高亮
//============================================
function WriteThumb(img, url, alt, blank, highlight)
{
	if (blank == null) blank = false;
	
	if (highlight == null) highlight = false;
	
	with(document){
		write("<table class='thumbnail'>");
		write("<tr><td>");
		if(url != null)
		{
			write("<a href='");
			write(url);
			if (blank)
				write("' target='_blank'>");
			else
				write("'>");
		}
		write("<img src='");
		write(img);
		write("' alt='");
		write(alt);
		write("' ");
		if (highlight)
		{
			if (thumbHWidth>0){
				write(" width='");
				write(thumbHWidth);
				write("' ");
			}
			if (thumbHHeight>0){
				write(" height='");
				write(thumbHHeight);
				write("' ");
			}
		}
		else
		{
			if (thumbWidth>0){
				write(" width='");
				write(thumbWidth);
				write("' ");
			}
			if (thumbHeight>0){
				write(" height='");
				write(thumbHeight);
				write("' ");
			}
		}
		write("></a></td></tr></table>");
	}

}
