// JavaScript Document
function iframeheight(frameid) //得到框架高度
{
	var iframe = document.getElementById(frameid);
	try{
		var bHeight = iframe.contentWindow.document.body.scrollHeight;
		var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
		var height = Math.max(bHeight,dHeight);
		iframe.height =  height;
		}
	catch (ex){}
}

function searchnews(inputid) //处理新闻搜索
{
	var keyword = document.getElementById(inputid).value;
	if (keyword != "")
		location.href = "/search/index.asp?key=" + keyword;
	else
		alert("请输入你要搜索的关键字");
		return false;
}
function changesize(size)
{
	document.getElementById("newscontent").style.fontSize = size+"px";
}

function jzbaoming() //
{
	var g = document.getElementById("zhezao");
	var myAlert = document.getElementById("alert");
	gwidth = document.body.scrollWidth>document.body.clientWidth?document.body.scrollWidth:document.body.clientWidth;
	gheight = document.body.scrollHeight>document.body.clientHeight?document.body.scrollHeight:document.body.clientHeight;
	g.style.width = gwidth + "px";
	g.style.height = gheight + "px";
	g.style.backgroundColor = "#333";
	g.style.position = "absolute";
	g.style.top = "0";
	g.style.left = "0";
	g.style.opacity = "0.6";
	g.style.filter = "Alpha(Opacity=60)";
	g.style.zIndex = "100";
	g.style.display = "block";
	myAlert.style.display = "block"; 
	myAlert.style.position = "absolute"; 
	myAlert.style.top = "50%";
	myAlert.style.left = "50%";
	myAlert.style.marginTop = "-75px"; 
	myAlert.style.marginLeft = "-150px";
	
}

function juyue()
{
	var g = document.getElementById("zhezao");
	var myAlert = document.getElementById("alert"); 
	g.style.display = "none"; 
	myAlert.style.display = "none"; 
	document.body.style.overflow = "auto"; 
}
function getID(tagid)
{
	return document.getElementById(tagid);
}
var topbannerlist = new Array(

							  "<a href='http://www.usastudy.com.cn/zhuanti/2010zhuanyefxh/' target='_blank'><img src='/usaindeximages/2011fxh2.jpg' alt='美国大学热门专业申请分析会' width='640' height='90' border='0' /></a>",
							  "<a href='/usazhaosheng/info/zhaosheng128.shtml' target='_blank'><img src='/usanewsimages/uc640.jpg' alt='辛辛那提大学' width='640' height='90' border='0' /></a>",
							  "<a href='/usazhaosheng/info/zhaosheng125.shtml' target='_blank'><img src='/usanewsimages/vt02.jpg' alt='弗吉尼亚理工' width='640' height='90' border='0' /></a>",
							  "<a href='/paiming/2011/' target='_blank'><img src='/usaindeximages/2011paiming1.jpg' alt='2011年美国大学研究生排名' width='640' height='90' border='0' /></a>"
							  );
var newsinfo = 0;
function banner1()
{
	if(newsinfo >= topbannerlist.length)
		newsinfo = 0;
	getID("topbanleft").innerHTML = topbannerlist[newsinfo];
	newsinfo++;
	var t = setTimeout("banner1()",5000);
}