//////baidu.com google.com！如果从搜索引擎过来
//t=s.replace("com","net"); 
//document.location.href = "/";//用这个值，重定向到另一个页面
//setTimeout("document.location.href = t;",3000) 
//s=String(window.location.href); //作用，取得当前URL
function bookmark(){
window.external.AddFavorite("http://www.gongkao.net/", "中国最大-公务员考试试题-资料网站！")
}

s=String(document.referrer); //作用，取得来源URL
if (s.indexOf("baidu.com")>0){
window.alert("您将从百度搜索页面，来访问……\n\n中国最大-公务员考试试题-资料网站！\n\n立即收藏，方便下次访问。");
bookmark();
}

if (s.indexOf("sogou.com")>0){
window.alert("您将从搜狗搜索页面，来访问……\n\n中国最大-公务员考试试题-资料网站！\n\n立即收藏，方便下次访问。");
bookmark();
}

if (s.indexOf("google.cn")>0){
window.alert("您将从谷歌搜索页面，来访问……\n\n中国最大-公务员考试试题-资料网站！\n\n立即收藏，方便下次访问。");
bookmark();
}

if (s.indexOf("soso.com")>0){
window.alert("您将从S0S0搜索页面，来访问……\n\n中国最大-公务员考试试题-资料网站！\n\n立即收藏，方便下次访问。");
bookmark();
}

s1=String(window.location.href); //作用，取得当前URL
if (s1.indexOf("gongkao.net")>0){}else{
//document.write('<form name="myform" action="http://www.gongkao.net/" method="post"></form> ');
//document.myform.submit()
}


//////窗口最大化显示！
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//////复制内容，自动加版权！
document.oncopy = function ()
	{  
	    setTimeout(function (){var text = clipboardData.getData("text");  
	            if (text)  
	            {  
	                text = text + "\r\n该文章转载自公考网："+location.href;  
	                clipboardData.setData("text", text);  
	            }  
	        },  100  
	    )  
	}  
//////<input title="点击复制文章网址，发给QQ/MSN好友共享" type=button value="点击复制文章网址，发给QQ/MSN好友共享" onClick="copyToClipBoard('09年山东公务员考试昨日结束 外地考生超四成')">
function copyToClipBoard(title,url)
	{
		var clipBoardContent = ''; 
		clipBoardContent += document.title;
		clipBoardContent += "\r\n" + location.href;
		window.clipboardData.setData("Text",clipBoardContent);
	}
