if (top.location !== self.location) {top.location=self.location;}
function SHome(obj){try{obj.style.behavior='url(#default#homepage)';obj.setHomePage('http://www.060s.com/');}catch(e){if(window.netscape){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");}catch(e){alert("抱歉，此操作被浏览器拒绝！\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'");}}else{alert("抱歉，您所使用的浏览器无法完成此操作。\n\n您需要手动将'http://www.060s.com/'设置为首页。");}}}
function getVar(showID,Value){var disp = document.getElementById(showID);disp.innerHTML = Value;}
function getHtml(showID,valueID){var disp = document.getElementById(showID);disp.innerHTML = document.getElementById(valueID).innerHTML;}
function addBookmark(){var title=document.title;var url=document.location.href;if (window.sidebar) window.sidebar.addPanel(title, url,"");else if( window.opera && window.print ){var mbm = document.createElement('a');mbm.setAttribute('rel','sidebar');mbm.setAttribute('href',url);	mbm.setAttribute('title',title);mbm.click();}else if( document.all ) window.external.AddFavorite(url, title);}
function SetCookie(name,value){var Days = 30;var exp  = new Date();exp.setTime(exp.getTime() + Days*24*60*60*1000);document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();}
function getCookie(name){var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr != null) return unescape(arr[2]); return null;}
function delCookie(name){var exp = new Date();exp.setTime(exp.getTime() - 1);var cval=getCookie(name);if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();}
var js_CTN;
function doPrint(){document.getElementById("header").style.display="none";document.getElementById("left_content").style.display="none";document.getElementById("footer").style.display="none";document.getElementById("ad_footer").style.display="none";document.getElementById("headermenu").style.display="none";document.getElementById("ad_top1").style.display="none";document.getElementById("ad_bottom").style.display="none";js_CTN=document.getElementById("js_CTN").innerHTML;document.getElementById("js_CTN").innerHTML='<table><tr><td align="right">此页面为打印预览页 【<a href="javascript:window.print();">打印</a>】【<a href="javascript:REdoPrint()">返回</a>】</td></tr></table>';}  
function REdoPrint(){document.getElementById("header").style.display="block";document.getElementById("left_content").style.display="block";document.getElementById("footer").style.display="block";document.getElementById("ad_footer").style.display="block";document.getElementById("headermenu").style.display="block";document.getElementById("ad_top1").style.display="block";document.getElementById("ad_bottom").style.display="block";getVar('js_CTN',js_CTN);}
function flashChecker(){var hasFlash=0;var flashVersion=0;var isIE=/*@cc_on!@*/0;if(isIE){var swf = new ActiveXObject('ShockwaveFlash.ShockwaveFlash');if(swf){hasFlash=1;VSwf=swf.GetVariable("$version");flashVersion=parseInt(VSwf.split(" ")[1].split(",")[0]);}}else{if (navigator.plugins && navigator.plugins.length > 0){var swf=navigator.plugins["Shockwave Flash"];if (swf){hasFlash=1;var words = swf.description.split(" ");for (var i = 0; i < words.length; ++i){if (isNaN(parseInt(words[i]))) continue;flashVersion = parseInt(words[i]);}}}}return {f:hasFlash,v:flashVersion};}
function changeSearchText(obj){var sNum = obj.options[obj.selectedIndex].value;if(sNum == 0){document.getElementById("MYse").action="http://www3.060s.com/forum/search.php?orderby=lastpost&ascdesc=desc&searchsubmit=yes";document.getElementById("srchtype").name="srchtxt";}else if(sNum == 1){document.MYse.action="http://www3.060s.com/forum/search.php?orderby=lastpost&ascdesc=desc&searchsubmit=yes"; document.getElementById("srchtype").name="srchuname";}else if(sNum == 3){document.MYse.action="http://new.060s.com/search/search.php"; document.getElementById("srchtype").name="word";}else if(sNum == 4){document.getElementById("MYse").action="http://new.060s.com/flash/flash_search.php"; document.getElementById("srchtype").name="name";} else {alert("    抱歉，系统错误!\n现在将自动转入按【帖子标题】搜索模式！");document.getElementById("srchtype").name="srchtxt";}}
function checkSearchData(){if(document.getElementById("srchtype").value.trim() == ""){alert("搜索的关键字不能为空！");document.getElementById("srchtype").select();return false;}}
String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g, "");}
String.prototype.ltrim=function(){return this.replace(/(^\s*)/g,"");}
String.prototype.rtrim=function(){return this.replace(/(\s*$)/g,"");}
function getCookie(name){var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));if(arr != null) return unescape(arr[2]); return null;}
function user_chck(){var cke=getCookie('uchome_loginuser_comm');var user_name='';if (cke==null){document.write('<form id="login" method="post" name="login" action="http://www3.060s.com/site/batch.login.php?action=login" target="_self">');document.write('&nbsp;用户名： ');document.write('<input type="text" name="username" id="username" style="width:120px;height:15px;border: 1px solid  #ccc;" />');document.write('&nbsp;密码： ');document.write('<input type="password" name="password" id="userpass" style="width:120px;height:15px;border: 1px solid  #ccc;" />');document.write(' <input type="submit" name="loginsubmit" id="dologin" value="登录" height="20px" style="width:40px;height:20px;background:#eeeeee;border:1px solid #dddddd;font-size:14px"> ');document.write(' <a href="http://www3.060s.com/forum/register.php?referer=http://www3.060s.com/site/index.php" target="_blank" style="color:#ffffff"><u>注册</u></a>');document.write('</form>');}
else{document.write('&nbsp;你好，'+decodeURIComponent(getCookie('uchome_loginuser_comm'))+'&nbsp;&nbsp;<a target="_blank" href="http://www3.060s.com/forum/memcp.php" style="color:#ffffff">控制面板</a>&nbsp; | &nbsp;<a href="http://www3.060s.com/site/batch.login.php?action=logout" style="color:#ffffff">退出</a>');}}
function ad_title1(){document.write('<div id="test_title"><br><h1 style="text-align:center;width:960px;line-height:100%">小精灵儿童网站</h1></div>');var timeout=setTimeout("ad_title()",5000);}
function ad_title2(){document.getElementById("test_title1").innerHTML ='<iframe name="ablank1" id="ablack1" marginwidth="0" marginheight="0"  frameborder="0" bordercolor="#000000" scrolling="no" src="http://new.060s.com/loding1a.htm?CFG" width="468" height="60"></iframe>';}
function ad_title(){var ads_468_60 = '<table border="0" cellspacing="0" cellpadding="0"><tr><td>';
ads_468_60 =ads_468_60 + '<table width=100%  border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" height=85px><tr><td width=230>';
ads_468_60 =ads_468_60 + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="227" height="80"><param name="movie" value="http://www.060s.com/images/111.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="http://www.060s.com/images/111.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="227" height="80" wmode="transparent"></embed></object>';ads_468_60 =ads_468_60 + '</td><td align=left valign=top><table width=100%  border="0" cellspacing="0" cellpadding="0"><tr height="85px"><td width=150px align=center>';ads_468_60 =ads_468_60 + '<a href="http://new.060s.com/news/mulu/315/"><img src="http://www.060s.com/images/tougao.gif" height="60px" width="130px" border="0"></a>';ads_468_60 =ads_468_60 + '</td><td width="485px">';
ads_468_60 =ads_468_60 + '<iframe name="ablank1" id="ablack1" marginwidth="0" marginheight="0"  frameborder="0" bordercolor="#000000" scrolling="no" src="http://new.060s.com/loding1a.htm?CFG" width="460" height="60"></iframe>';ads_468_60 =ads_468_60 + '</td><td style="line-height:180%;font-size:13px">';
var index_ad = Math.floor(Math.random() * 2);var ad_page = new Array(2);var ad_title= new Array(2);
ad_page[0]="http://www.ef.com.cn/englishfirst/ilab/default.aspx";
if (location.href.substr(19,9)=='/special/' || location.href.substr(19,8)=='/center/' || location.href.substr(0,11)=='http://www3')
{ads_468_60 =ads_468_60 + '<a href="http://www3.060s.com/maths/all.php" target="_blank">幼儿在线学汉字</a><br>';ads_468_60 =ads_468_60 + '<a href="http://www3.060s.com/maths/all.php" target="_blank">在线小学口算练习</a><br>';}
else{ads_468_60 =ads_468_60 + '<a href="http://www.ef.com.cn/englishfirst/courses/kids-courses.aspx" target="_blank">儿童英语培训报名</a><br>';ads_468_60 =ads_468_60 + '<a href="'+ad_page[0]+'" target="_blank">免费幼儿在线英语</a><br>';}
ads_468_60 =ads_468_60 + '<a href="http://www3.060s.com/english/" target="_blank">在线儿童英语单词</a><br>';ads_468_60 =ads_468_60 + '</td></tr></table></td></tr></table></td></tr></table>';
document.write(ads_468_60);}
function ad_title_index(){
var ads_468_60 = '<table border="0" cellspacing="0" cellpadding="0"><tr><td>';
ads_468_60 =ads_468_60 + '<table width=100%  border="0" cellspacing="0" cellpadding="0" bgcolor="#ffffff" height=85px><tr><td width=230>';
ads_468_60 =ads_468_60 + '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="227" height="80"><param name="movie" value="http://www.060s.com/images/111.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><embed src="http://www.060s.com/images/111.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="227" height="80" wmode="transparent"></embed></object>';ads_468_60 =ads_468_60 + '</td><td align=left valign=top><table width=100%  border="0" cellspacing="0" cellpadding="0"><tr height="85px"><td width=150px align=center>';ads_468_60 =ads_468_60 + '<a href="http://new.060s.com/news/mulu/315/"><img src="http://www.060s.com/images/tougao.gif" height="60px" width="130px" border="0"></a>';ads_468_60 =ads_468_60 + '</td><td width="485px">';
ads_468_60 =ads_468_60 + '<a href="http://www.060s.com/childrens/"><img src="http://new.060s.com/images_ad/jr.gif" border="0"></a>';
ads_468_60 =ads_468_60 + '</td><td style="line-height:180%;font-size:13px">';
var index_ad = Math.floor(Math.random() * 2);
var ad_page = new Array(2);var ad_title= new Array(2);
ad_page[0]="http://www.ef.com.cn/englishfirst/ilab/default.aspx";ad_title[0]="免费儿童在线英语";ad_title[1]="免费幼儿在线英语";
ads_468_60 =ads_468_60 + '<a href="http://www.ef.com.cn/englishfirst/courses/kids-courses.aspx" target="_blank">儿童英语培训报名</a><br>';
ads_468_60 =ads_468_60 + '<a href="'+ad_page[0]+'" target="_blank">免费幼儿在线英语</a><br>';
ads_468_60 =ads_468_60 + '<a href="http://www3.060s.com/english/" target="_blank">在线儿童英语单词</a><br>';ads_468_60 =ads_468_60 + '</td></tr></table></td></tr></table></td></tr></table>';
document.write(ads_468_60);}
function ad_banner(){
var how_many_ads = 3;var now = new Date();var sec = now.getSeconds();var ad = sec % how_many_ads;ad +=1;ad=3;
if (ad==3) {
if (location.href.substr(19,9)=='/special/' || location.href.substr(19,8)=='/center/'){document.write('<iframe name="ablank" id="ablack" scrolling="no" frameborder="0" marginwidth="0" style="margin:0px;padding:0px;" marginheight="0"  width="980px" height="90px" src="http://new.060s.com/baidu_special1.htm?CFG"></iframe>');}
else {document.write('<iframe name="ablank" id="ablack" scrolling="no" frameborder="0" marginwidth="0" style="margin:0px;padding:0px;" marginheight="0"  width="980px" height="90px" src="http://new.060s.com/baidu.htm?CFG"></iframe>')}
}
if (ad==3)  document.getElementById("header4").style.height="90px";
else document.getElementById("header4").style.height="60px";
document.getElementById("header4").style.display="block";}
var req060s;var req060s_state=0;var ShowDIV_name;var DebugState=0;
function createXHttp(){if (window.XMLHttpRequest){return new XMLHttpRequest();if(xmlhttp.overrideMimeType){xmlhttp.overrideMimeType("text/xml");}}else{var MSXML=['Microsoft.XMLHTTP','MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP'];for (var n  =   0 ; n  <  MSXML.length; n ++ ){try{return new ActiveXObject(MSXML[n]);}catch (e){}}}}
function getDiv(showID,path){if (req060s_state){setTimeout('getDiv("'+showID+'","'+path+'")',500);return;}req060s_state=1;ShowDIV_name=showID;req060s = createXHttp();if (req060s){req060s.onreadystatechange = handleSC;req060s.open("GET", path, true);req060s.send(null);}}
function handleSC(){if (req060s.readyState == 4){req060s_state=0;if (req060s.status == 200 ){if (DebugState)  alert("ok");document.getElementById(ShowDIV_name).innerHTML = req060s.responseText;}else if(req060s.status == 404){if (DebugState) alert("文件不存在");}else if(req060s.status == 403){if (DebugState) alert("没有权限");}else{if (DebugState) alert("status is " + XMLHttp.status);}}}
function seg(c)
{if ('eg1'!=c) {document.getElementById('eg1').style.display = 'none';document.getElementById('eg1a').style.background = '';}
if ('eg2'!=c) {document.getElementById('eg2').style.display = 'none';document.getElementById('eg2a').style.background = '';}
if ('eg3'!=c) {document.getElementById('eg3').style.display = 'none';document.getElementById('eg3a').style.background = '';}
if ('eg4'!=c) {document.getElementById('eg4').style.display = 'none';document.getElementById('eg4a').style.background = '';}
if ('eg5'!=c) {document.getElementById('eg5').style.display = 'none';document.getElementById('eg5a').style.background = '';}
document.getElementById(c).style.display = 'block';
document.getElementById(c+'a').style.background = '#fff2bf';}


