// 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/20120219/' target='_blank'><img src='/usaindeximages/djgz640.jpg' alt='2012美国200所顶尖高中教育巡回展' width='640' height='90' border='0' /></a>",
							  "<a href='http://www.usastudy.com.cn/zhuanti/2012app/' target='_blank'><img src='/usanewsimages/2012chun.jpg' alt='2012春季入学申请冲刺' width='640' height='90' border='0' /></a>",
							 "<a href='http://www.usastudy.com.cn/zhuanti/2013bird/' target='_blank'><img src='/usanewsimages/13bird02.jpg' alt='2013美国本科、研究生申请早起鸟计划' width='640' height='90' border='0' /></a>",
							 "<a href='http://www.usastudy.com.cn/gaozhong' target='_blank'><img src='/usanewsimages/2012gz02.jpg' alt='美国高中申请' width='640' height='90' border='0' /></a>",
							 "<a href='http://www.usastudy.com.cn/zhuanti/ivy/' target='_blank'><img src='/usanewsimages/cqt02.jpg' alt='美国常青藤大学招募计划' width='640' height='90' border='0' /></a>",
							  "<a href='/paiming/2012/index1.html' target='_blank'><img src='/usanewsimages/2012paiming1.jpg' alt='2012美国大学研究生专业排名' 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()",8000);
}
