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_auth");var user_name='';decodeURI(getCookie("cbd_loginuser"));
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;欢迎光临小精灵儿童网站!');}}
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 marginwidth="0" marginheight="0"  frameborder="0" bordercolor="#000000" scrolling="no" src="http://www5.060s.com/images/loding1.htm" 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 marginwidth="0" marginheight="0"  frameborder="0" bordercolor="#000000" scrolling="no" src="http://www.060s.com/images/loding1.htm" width="468" 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";ad_page[1]="http://www.ef.com.cn/englishfirst/ilab/default.aspx";ad_title[0]="免费儿童在线英语";ad_title[1]="免费幼儿在线英语";ads_468_60 =ads_468_60 + '<a href="'+ad_page[0]+'" target="_blank">'+ad_title[0]+'</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 + '<a href="http://www.060s.com/childrens/newsong/newsong.htm" target="_blank">新儿歌</a> <a href="http://www3.060s.com/site/action-image.html">儿童图片</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/newsong/newsong.htm"><img src="http://www.060s.com/ad/english_ad.jpg" width="468" height="60px" 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_page[1]="http://www.ef.com.cn/englishfirst/ilab/default.aspx";ad_title[0]="免费儿童在线英语";ad_title[1]="免费幼儿在线英语";ads_468_60 =ads_468_60 + '<a href="'+ad_page[0]+'" target="_blank">'+ad_title[0]+'</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 + '<a href="http://www.060s.com/childrens/newsong/newsong.htm" target="_blank">新儿歌</a> <a href="http://www3.060s.com/site/action-image.html">儿童图片</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) {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"></iframe>');}
if (ad==3)  document.getElementById("header4").style.height="90px";
else document.getElementById("header4").style.height="60px";
document.getElementById("header4").style.display="block";}