
function searchCheck(){
	if (document.SearchForm.searchType.value==0){
		alert('请选择类型');
		document.SearchForm.searchType.focus();
		return false;
	}
	if (document.SearchForm.searchType.value=="1" || document.SearchForm.searchType.value=="3"){
		if (document.SearchForm.PDType.value=='' && document.SearchForm.PDAge.value=='0'){
			alert('请选择查询条件');
			document.SearchForm.PDType.focus();
			return false;
		}
	}else{
		if (document.SearchForm.searchKey.value=='' || document.SearchForm.searchKey.value=='我想找...'){
			alert('请填写要查找的关键字');
			document.SearchForm.searchKey.value='';
			document.SearchForm.searchKey.focus();
			return false;
		}
	}
	SearchForm.submit();
}
function searchTypeChange(STypeV){
	//alert(STypeV);
	switch (STypeV) {
		case "1":
			window.SearchPD.style.display='block';
			document.SearchForm.searchKey.style.display='none';
			break;
		case "2":
			window.SearchPD.style.display='none';
			document.SearchForm.searchKey.style.display='block';
			break;
		case "3":
			window.SearchPD.style.display='block';
			document.SearchForm.searchKey.style.display='none';
			break;
	}
}

function WorkUsersearchCheck(){
	
	
		if (document.WorkUsersearch.searchKey.value=='' ){
			alert('请填写要查找的关键字');
			document.WorkUsersearch.searchKey.value='';
			document.WorkUsersearch.searchKey.focus();
			return false;
		}
	
	return true;
}

function vote_check(){
	var checkok=0;
	for (var oki=0;oki<document.Vote_form.votevalue.length;oki++){
		if (document.Vote_form.votevalue[oki].checked==true){
			checkok=1;
			break;
		}
	}
	if(checkok==1){
		document.Vote_form.submit();
	}else{
		alert('请选择调查答案');
		document.Vote_form.votevalue[0].focus();
	}
	
}
function vote_Show(voteID){
	//document.Vote_form.action='/vote/vote_show.asp?voteid=' + voteID;
	document.Vote_form.action='/vote/vote_show.asp';
	document.Vote_form.submit();
	document.Vote_form.action='/vote/votein.asp';
	//alert(voteID)
}

function transformHtml(myid){
	var TextContainer=eval(myid)
	var elementall=TextContainer.all;
	var Ttext;
	var ijs;
	for(var i=0;i < elementall.length;i++){
		if (elementall[i].tagName=='INPUT' && elementall[i].className=='Htmltext'){
			Ttext=elementall[i].value;
			ijs=0;
			for(var ni;ni<Ttext.length;ni++){
				if (elementall[i].value.charAt[ni]=="<"  && elementall[i].value.charAt[ni+1]!='/'){
					ijs++;
				}
			}
			elementall[i-1].innerHTML=elementall[i].value
			i+=ijs;
		}
	}
}

//-------------------------------------------------------------------
//submitfrm()用于用户提交评论
function submitfrm(){
	if (strlength(document.Subitmsg.message.value)>500){
		alert("评论最多500字");
		document.Subitmsg.message.focus();
		return false;
	}else if (document.Subitmsg.message.value.length==0){
		alert("请填写评论");
		document.Subitmsg.message.focus();
		return false;
	}
	document.Subitmsg.submit();
}


//------------------------------------------------------------------
//判断字符串长度，汉字算2个

function strlength(str){  
	var l=str.length;
	var n=l
	for (var i=0;i<l;i++){
		if (str.charCodeAt(i)<0||str.charCodeAt(i)>255) n++
    }
    return n
}


//-----------------------------------------------------------
//判断字符串长度，汉字算2个
function strlength(str){  
    var l=str.length;
    var n=l
    for (var i=0;i<l;i++){
        if (str.charCodeAt(i)<0||str.charCodeAt(i)>255) n++
    }
    return n
}


//-----------------------------------------------------------
//如果string中含有compare的任何一个字符返回True
//或者含有ASCII不在[49,122]返回True
//ASCII [92] 返回True
function SpecialString(string,compare)   
{ 
   for (var i=0;i<string.length;i++){ 
     if (compare.indexOf(string.charAt(i))!=-1||(string.charCodeAt(i)<48 && string.charCodeAt(i)>0)||(string.charCodeAt(i)>123&& string.charCodeAt(i)<256)||string.charCodeAt(i)==92) 
     return false;
   } 
   return true; 
} 
//-----------------------------------------------------------
function isemail(strg){ 
     if(!(strg.indexOf("@")>1 && strg.indexOf(".")>1)) return false; 
     if(strg.indexOf("@",strg.indexOf("@")+1)>0)  return false; 
     var strarray=new Array("@@" , "@." , "..") 
     for(i=0;i<strarray.length;i++) 
       if(strg.indexOf(strarray[i])>0) return false; 
     for(i=0;i<strg.length;i++) 
       if(strg.substr(i,1)<="," || strg.substr(i,1)=="/" || (strg.substr(i,1)>="["&&strg.substr(i,1)<="") || strg.substr(i,1)=="`" || (strg.substr(i,1)>=":"&&strg.substr(i,1)<="?") || strg.substr(i,1)>="{") return false; 
     return true 
}  
function openNewWindow(myurl,winname,winh,winw,winmemo){
	var ws = screen.width;
	var wintop;
	var winleft;
	if (ws>=835){
		winleft=(screen.width-winw)/2
		wintop=(screen.height-winh)/2
	}else{
		wintop=0
		winleft=0
	}
	parameter = "left="+winleft+",top="+wintop+",toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,resizable=no,width=" + winw + ",height=" + winh + winmemo ;
    var aaa=window.open(myurl,winname,parameter,true);
    aaa.focus();
}
function writeValue(WType,WT2,WStr){
	switch (WType){
		case 'div':
			if(WT2=='start'){
				document.write('<div id='+WStr+'>');
			}
			if(WT2=='end'){
				document.write('</div>');
			}
			break;
	}
	
}


//----------------learn登录-----------------------------

function login_form_new(){
	document.write ('<div id="loginB">')
		document.write ('<form method="post" action="users/login.asp">')
        document.write ('<table width="210" border="0" cellspacing="2" cellpadding="0" class="table_loginB">')
        document.write ('<tr>')
          document.write ('<td width="20%">&nbsp;</td>')
          document.write ('<td width="47%"><input name="name" type="text" class="border_login" value=":::用户名"  onfocus="this.value=\'\'"/></td>')
          document.write ('<td width="33%"><a href="/users/reg1.asp" target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'singup\',\'\',\'images/btn_signup_h.gif\',1)"><img src="images/btn_signup.gif" border="0" name="singup" id="singup" /></a></td>')
        document.write ('</tr>')
        document.write ('<tr>')
          document.write ('<td>&nbsp;</td>')
          document.write ('<td><input name="psw" type="password" class="border_login" value=":::密  码"  onfocus="this.value=\'\'"/></td>')
          document.write ('<td rowspan="3" valign="top"><input type="image"  src="images/btn_login.gif" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'btn_login_h\',\'\',\'images/btn_login_h.gif\',1)" name="btn_login" width="60" height="47" border="0" id="btn_login" /></td>')
        document.write ('</tr>')
        document.write ('<tr>')
          document.write ('<td height="14"><img src="_script/code1.asp"" /></td>')
          document.write ('<td><input name="verify" type="text" class="border_login" value=":::请输入验证码"  onfocus="this.value=\'\'"/></td>')
          document.write ('</tr>')
		 document.write ('</table>')
		document.write ('</form>')
	  document.write ('</div>')
}
function userinfo_new(loginname,jifen,chenghao,duanxin){
	document.write ('<div id="loginA">')
        document.write ('<table width="205" border="0" cellspacing="3" cellpadding="0" class="table_loginA">')
        document.write ('<tr>')
          document.write ('<td width="20%">&nbsp;</td>')
          document.write ('<td width="80%"><div id="username">'+loginname+'</div></td>')
          document.write ('</tr>')
        document.write ('<tr>')
          document.write ('<td>&nbsp;</td>')
          document.write ('<td>')
		  document.write ('<div id="information1">WaWa币: '+jifen+'</div>')
		  document.write ('<div id="information2">称号: '+chenghao+'</div>')
		  document.write ('<div id="information3"><a href="/userboard/user_receivebox.asp" target="_blank">您有'+duanxin+' 条消息</a></div>')
		  document.write ('<div id="information4"><a href="/userboard/user_modifyinfo.asp" target="_blank">控制面板</a></div>')
		  document.write ('<div id="information5"><a href="users/logout.asp">退出登录</a></div>')
		  document.write ('</td>')
          document.write ('</tr>')
		 document.write ('</table>')
	  document.write ('</div>')
}
function step_list(){
	       document.write ('<table width="208" border="0" cellpadding="0" cellspacing="0">')
             document.write ('<tr>')
               document.write ('<td height="37px" background="images/r2_top.gif"></td>')
             document.write ('</tr>')
             document.write ('<tr>')
							document.write ('<td height="232" align="center" background="images/r1_bg.gif">')
								document.write ('<a href="download.asp" target=_blank><img src="images/r2_download.gif"  border="0"></a>')
								document.write ('<img src="images/r2_ar1.gif"  border="0"> <a href="register.asp" target=_blank>')
									document.write ('<img src="images/r2_register.gif"  border="0"></a> <img src="images/r2_ar2.gif"  border="0">')
								document.write ('<a href="products.asp" target=_blank><img src="images/r2_study.gif"  border="0"></a>')
								document.write ('<img src="images/r2_ar3.gif"  border="0"> ')
									document.write ('<img src="images/r2_charge.gif"  border="0">')
							document.write ('</td>')
             document.write ('</tr>')
             document.write ('<tr>')
               document.write ('<td height="12px" background="images/r2_bot.gif"></td>')
             document.write ('</tr>')
           document.write ('</table>')
}

function List_R(){
	document.write ('<div id="R_2">')
		document.write ('<div><img src="images/bg_R_2_t.gif" /></div>')
		document.write ('<div><a href="/download.asp" target=_blank><img src="images/icon_clientd.gif" border="0" class="bb"/></a><br />')
		    document.write ('<a href="class_order_c.asp"><img src="images/icon_subscription.gif" border="0"class="bb" /></a><br /> </div>')
			
		document.write ('<div><img src="images/bg_R_2_b.gif" /></div>')
	document.write ('</div>')
	
	document.write ('<div id="R_3">')
		document.write ('<div><img src="images/bg_R_3_t.gif" /></div>')
		document.write ('<div><a href="guide.asp"><img src="images/r3_1.gif" border="0"/></a><br />')
			document.write ('<a href="guide.asp"><img src="images/r3_2.gif" border="0" /></a><br />')
			document.write ('<a href="guide.asp"><img src="images/r3_3.gif" border="0" /></a><br />')
			document.write ('<a href="guide.asp"><img src="images/r3_4.gif" border="0" /></a> </div>')
		document.write ('<div><img src="images/bg_R_3_b.gif" /></div>')
	document.write ('</div>')
			
	document.write ('<div id="R_4">')
		document.write ('<div><img src="images/bg_R_4_t.gif" /></div>')
		document.write ('<div><table border="0" cellpadding="0" cellspacing="0" class="R_4_table">')
		document.write ('<tr><td><a href="/welcome.asp" target=_blank><img src="../images/link/img_daytoday.gif" border="0" style="margin-top:5px;"/></a><br />儿童资讯&nbsp;·&nbsp;亲子空间</td></tr>')
			document.write ('<tr><td><a href="/space" target=_blank><img src="../images/link/img_space.gif" border="0" style="margin-top:5px;"/></a><br>儿童益智社区</td></tr>')
			document.write ('<tr><td><a href="/math" target="_blank"><img src="../images/link/img_math.gif" width="120" height="50" border="0"></a><br />小学数学同步与提高</td></tr>')
			document.write ('<tr><td><a href="/software" target="_blank"><img src="../images/link/img_turn.gif" width="120" height="50" border="0"></a><br />线下学习产品介绍</td></tr>')
			document.write ('<tr><td><a href="http://www.icreativekids.com/" target="_blank"><img src="../images/link/img_school.gif" width="120" height="50" border="0"></a><br />少儿英语培训</td></tr>')
			document.write ('</table>')
		document.write ('</div>')
		document.write ('<div><img src="images/bg_R_4_b.gif" /></div>')
	document.write ('</div>')
}
function List_R_order(){
	    document.write ('<div id="R_1"><a href="/userboard/deposit.asp" target=_blank><img src="images/icon_topupstation.gif" border="0" /></a></div>')
		
		document.write ('<div id="R_2">')
		  document.write ('<div><img src="images/bg_R_2_t.gif" /></div>')
		  document.write ('<div><a href="/download.asp" target=_blank><img src="images/icon_clientd.gif" border="0" class="bb"/></a><br />')
		       document.write ('<a href="#"><img src="images/icon_records.gif" border="0"class="bb" /></a><br />')
			   document.write ('<a href="#"  onclick="var aaa=window.open(\'shop/cart.asp?action=show&return_page=6\',\'cart\',\'width=616,height=540,toolbar=no, status=no, menubar=no, resizable=no, scrollbars=yes\');aaa.focus()"><img src="images/icon_shopping.gif" border="0" /></a> </div>')
		  document.write ('<div><img src="images/bg_R_2_b.gif" /></div>')
		document.write ('</div>')
		
		document.write ('<div id="R_3">')
		  document.write ('<div><img src="images/bg_R_6_t.gif" /></div>')
		  document.write ('<div><a href="/welcome.asp" target=_blank><img src="images/land120.gif" border="0" class="friendlink"/></a><br />')
			   document.write ('<a href="/space" target=_blank><img src="images/space120.gif" border="0" class="friendlink"/></a></div>')
		  document.write ('<div><img src="images/bg_R_3_b.gif" /></div>')
		document.write ('</div>')
				
		document.write ('<div id="R_logo">')
		  document.write ('<img src="images/logo_wy_sg.gif" />')
		document.write ('</div>')		
}
function cooperate(){
	document.write ('<div id="M_r_cooperate"><table width="736" border="0" cellspacing="0" cellpadding="0">')
		document.write ('<tr>')
        document.write ('<td width="15"><img src="images/2_cooper_l.gif" /></td>')
        document.write ('<td width="706" background="images/2_cooper_m.gif">')
			document.write ('<div class="cooperate"><img src="images/img_cooperate.gif" /></div>')
			document.write ('<div class="cooperate_x"><a href="http://kid.qq.com/" target=_blank><img src="images/qq.gif" border="0" /></a></div>')
		document.write ('</td>')
        document.write ('<td width="15"><img src="images/2_cooper_r.gif" /></td>')
		document.write ('</tr>')
		document.write ('</table>')
	document.write ('</div>')
}
function btn_top(){
	document.write ('<div id="btn_top"><img src="images/btn_top.gif" border="0" usemap="#Top" />')
		document.write ('<map name="Top" id="Top">')
		document.write ('<area shape="rect" coords="3,1,48,15" href="#Top"/>')
		document.write ('</map>')
	document.write ('</div>')
}
function topmenu(){
	document.write ('<div id="topmenu" style="text-align:right;"><table border="0" cellpadding="0" cellspacing="0">')
	document.write ('<tr>')
		document.write ('<td width="108"><a href="/membership/"  target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'topmenu1\',\'\',\'images/topmenu_1_h.gif\',1)"><img src="images/topmenu_1.gif" name="topmenu1" width="104" height="22" border="0" id="topmenu1" /></a></td>')
	    document.write ('<td width="108"><a href="/ols/"  target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'topmenu2\',\'\',\'images/topmenu_2_h.gif\',1)"><img src="images/topmenu_2.gif" name="topmenu2" width="104" height="22" border="0" id="topmenu2" /></a></td>')
		//document.write ('<td width="72"><a href="#"  onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'topmenu4\',\'\',\'images/topmenu_4_h.gif\',1)"><img src="images/topmenu_4.gif" name="topmenu4" width="72" height="22" border="0" id="topmenu4" /></a></td>')
		document.write ('<td width="108"><a href="/userboard/"  target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'topmenu3\',\'\',\'images/topmenu_3_h.gif\',1)"><img src="images/topmenu_3.gif" name="topmenu3" width="104" height="22" border="0" id="topmenu3" /></a></td>')
		//document.write ('<td width="71"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'topmenu3\',\'\',\'images/topmenu_3_h.gif\',1)"><img src="images/topmenu_3.gif" name="topmenu3" width="71" height="22" border="0" id="topmenu3" /></a></td>')
		//document.write ('<td width="57"><a href="#" onclick="javascript:change_url()" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(\'topmenu4\',\'\',\'images/topmenu_4_h.gif\',1)"><img src="images/topmenu_4.gif" name="topmenu4" width="57" height="22" border="0" id="topmenu4" /></a></td>')
	document.write ('</tr></table>')
	document.write ('</div>')
	
}
function change_url(){
	wa = document.location.href
	wa = wa.replace('/learn/','/learn_en/')
	//wa = wa.replace('learn','learn%5Fen%5Fnew')
	document.location = wa
}

function btm(){

document.write ('<div id="btm">')
  document.write ('<div id="btm_l">')
	document.write ('<div style="width:230px; height:auto; float:right;">')
	document.write ('<div class="fl" style="width:87px; padding-top:10px; margin-left:5px;">')
	document.write ('<a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&amp;promoid=BIOW" target="_blank"><img src="images/img_FlashPlayer.gif" width="87" height="33" border="0" /></a>')
	document.write ('</div>')
	document.write ('<div class="fr" style="width:123px; color:#ffffff; font-size:12px; line-height:18px; text-align:left; padding-top:3px;">如果您看不到上面的动画 请先下载并安装<strong>FLASH</strong>插件安装文件.</div>')
	document.write ('</div>')
	document.write ('</div>')
  document.write ('<div id="btm_r">')
    document.write ('<div id="btm_r_menus"><a href="/help/aboutus.asp" target="_blank" >关于我们</a> | <a href="/help/link.asp" target="_blank" >友情链接</a> | <a href="/help/help.asp?type=3" target="_blank" >在线客服</a> | <a href="/help/contactus.asp" target="_blank" >联系我们</a> | <a href="/help/navigation.asp" target="_blank">网站地图</a> </div>')
    document.write ('<div id="btm_r_copyright"><strong>We offer a secure Web contents and Web games as well as kids community</strong> <br />')
document.write ('本网站内容，未经书面许可，不得转载、摘编。 <a href="/help/state.asp" target="_blank" >本站声明</a><br /> ')
document.write ('版权声明 Copyright©2000-2010 Creative Knowledge Ltd. All rights reserved.<a href="http://www.miibeian.gov.cn/">京ICP证080709号</a></div>')
  document.write ('</div>')
document.write ('</div>')

//document.write ('<div id="btm">')
//  document.write ('<div id="btm_l"><a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&amp;promoid=BIOW"><img src="images/img_FlashPlayer.gif" border="0" /></a></div>')
//  document.write ('<div id="btm_r">')
    //document.write ('<div id="btm_r_menus"><a href="/help/aboutus.asp">关于我们</a>   |  <a href="/help/contactus.asp">联系我们</a>  |  <a href="站点地图">网站导航</a>  |  <a href="/help/help.asp?type=3">在线客服</a>  |  <a href="/help/zhaopin.asp">招聘信息</a>  |  <a href="/help/link.asp">友情链接</a>  |  <a href="/space/recommend.asp">推荐本站</a></div>')
    //document.write ('<div id="btm_r_copyright"><strong>We offer a secure Web contents and Web games as well as kids community</strong> <br />')
//document.write ('本网站内容，未经书面许可，不得转载、摘编。 <a href="网站声名">本站声明</a><br /> ')
//document.write ('版权声明 Copyright©2000-2007 CREATIVE FUTURE TECHNOLOGY Co.,LTD. All rights reserved.<a href="#">京ICP证080709号</a></div>')
//  document.write ('</div>')
//document.write ('</div>')

}

function PageList(PageNo, PageCount, PageType){
	document.write ('<a style=\'cursor:hand\' onclick=goPage(\'1\',\''+PageCount+'\',\''+PageType+'\')><img src=\'images/btn_trial_fB.gif\' border=\'0\' /></a>&nbsp;')
	if(PageNo != 1){
		document.write ('<a style=\'cursor:hand\' onclick=goPage(\''+(PageNo-1)+'\',\''+PageCount+'\',\''+PageType+'\')><img src=\'images/btn_trial_PB.gif\' border=\'0\' /></a>&nbsp;')
		//document.write('-'+(PageNo-1)+'-')
	}
	for(var i=1; i <= PageCount; i++){
		if(i != PageNo){
			document.write ('<a style=\'cursor:hand\' onclick=goPage(\''+i+'\',\''+PageCount+'\',\''+PageType+'\')>['+i+']</a>')
		}
		else{
			document.write ('<strong><a style=\'color:#FF0000\'>['+i+']</a></strong>')
		}
	}
	if(PageNo != PageCount){
		document.write ('<a style=\'cursor:hand\' onclick=goPage(\''+(PageNo+1)+'\',\''+PageCount+'\',\''+PageType+'\')><img src=\'images/btn_trial_NB.gif\' border=\'0\' /></a>&nbsp;')
	}
	document.write ('<a style=\'cursor:hand\' onclick=goPage(\''+PageCount+'\',\''+PageCount+'\',\''+PageType+'\')><img src=\'images/btn_trial_LB.gif\' border=\'0\' /></a>&nbsp;')
}
function flash_banner1(){
	document.write ('<div id="main_right_L_banner">')
		document.write ('<div id="banner_1"></div>')
	var so = new SWFObject("flashs/banner.swf", "flashbanner_1", "349", "157", "8", "");
	so.addParam("quality", "high"); 
	so.addParam("wmode", "transparent"); 
	so.write("banner_1");
	document.write ('</div>')
}
function flash_banner2(){
	document.write ('<div id="M_r_banner">')
	  document.write ('<div id="banner_2"></div>')
	var so = new SWFObject("flashs/banner.swf", "flashbanner_1", "349", "157", "8", "");
	so.addParam("quality", "high"); 
	so.addParam("wmode", "transparent"); 
	so.write("banner_2");
	document.write ('</div>')
}