function hidealertmsg(){
	$("#alertmsg").slideUp();
}
/*
$(document).ready(function(){
//	$("body").prepend('<div id="alertmsg" style="height:25px;line-height:25px;background:#FFFE99;font-size:12px;text-align:center;color:red;border-bottom:1px #ECECEC solid;display:none;"><span style="float:right;padding-right:20px;" ><a href="javascript:hidealertmsg()">关闭</a></span><a href="http://www.51edu.com/notice/20100601.html" target="_blank" style="color:red;">关于360安全卫士对于精品学习网误报的说明</a></div>');
//	$("#alertmsg").slideDown("slow");
//	if($("#artCont p").length)
//		$("#artCont p").eq(0).after("<a href='http://www.51edu.com/mingxiaojie/' target='_blank'><img width='300' height='150' border='0' src='http://www.51edu.com/images/mxj_hzh.jpg' style='padding:10px;float:left;'/></a>");
})
*/
function copy(meintext){if(window.clipboardData){var clipBoardContent="";clipBoardContent+=document.title;clipBoardContent+="";clipBoardContent+=meintext;window.clipboardData.setData("Text", clipBoardContent)}else{var flashcopier='flashcopier';if(!document.getElementById(flashcopier)){var divholder=document.createElement('div');divholder.id=flashcopier;document.body.appendChild(divholder);}}}
function getOs(){if(navigator.userAgent.indexOf("MSIE")>0)return 1;if(navigator.userAgent.indexOf("Firefox")>0)return 2;return 0;}
function setHome(obj){obj.style.behavior='url(#default#homepage)';obj.setHomePage('http://www.51edu.com');return false;}
var url=location.href;
//alert(url);
if(url=='http://www.51edu.com/zhiye/caijing/kjzc/'){document.write("<script>window.open('http://lm.chinaacc.com/ManageCheck.asp?adsid=569&UnionID=1617&to=http%3A//www.chinaacc.com/wangxiao/gonggao/zhongji/2010zjfa_syb.htm');</script>");}


function updatecount(adsid){$.get("/51edu2.php",{id:adsid});}


/*
// JavaScript Document
//用来生成底层页文章百度i贴吧分享图标
function ibaidu(){
	//(typeof(title)=="undefined")
if(document.getElementById('bimg')==null){
	type='text';
	if(document.title){title=document.title;}
	if(document.getElementsByTagName("meta").item(2).attributes['content']){
		content=document.getElementsByTagName("meta").item(2).attributes['content'].value.substring(0,30)+"..";}
	else{content=document.getElementsByid("MainLeftTitle").substring(0,30)+"..";}}
else{
	type='picture';
	title=document.getElementById("bimg").childNodes.item(0).childNodes.item(0).attributes['alt'].value;
	content=document.getElementById("bimg").childNodes.item(0).childNodes.item(0).attributes['src'].value;}

link=document.URL;
//alert(type);
//alert(link);
//alert(title);
//alert(content);
share(type,link,title,content);
}




//百度i贴吧提供链接生成
function share(type,link,title,content){
    var itieba_share = 'http://tieba.baidu.com/i/sys/share?link=' + encodeURIComponent(link)
    +'&type=' + encodeURIComponent(type)
    +'&title=' + encodeURIComponent(title)
    +'&content=' + encodeURIComponent(content);
    if (!window.open(itieba_share, 'itieba', 'toolbar=0,resizable=1,scrollbars=yes,status=1,width=626,height=436'))
    {
        location.href = itieba_share;
    }
}
*/

function init(){
	var img = document.createElement('img');
	img.src = 'http://www.51edu.com/templates/51edu/skins/51edu/show/cet/images/btnqus.jpg';
	//img.style.paddingBottom = 10;
	
	var a = document.createElement('a');
	a.href="http://zhidao.51edu.com";
	//a.target="_blank";
	a.appendChild(img);

	//img.width = 16;
	//img.height = 16;
	//img.border = 0;
	//img.style.lineHeight = 28;
	//img.style.paddingTop = 5;
	//img.onclick = window.open("http://home.51edu.com/teacher.php");
	//if(document.getElementById('MainLeftSource'))document.getElementById('MainLeftSource').appendChild(a);
	document.getElementById('MainLeftSource').appendChild(a);
}
$(document).ready(function(){
if(document.getElementById('MainLeftSource')){init();}
});


function tab(position,sum,now){

	for(i=1;i<=sum;i++){
		$("#tab"+position+"_"+i).removeClass("hover_style");
		$("#tab"+position+"_c"+i).css("display","none");
	}
	$("#tab"+position+"_"+now).addClass("hover_style");
	$("#tab"+position+"_c"+now).css("display","block");
}




