function Trim(){return this.replace(/\s+$|^\s+/g,"");}String.prototype.Trim=Trim;
function getObjValue(elementId){if(getObject(elementId).value!=undefined)return getObject(elementId).value.Trim();else return "";}
function ecode(str){str=(str == null ? "":encodeURIComponent(str));str=(str == null ? "":encodeURIComponent(str));return str;}
function getObjValueRadio(elementId) { var tmp=document.getElementsByName(elementId);for(var i=0;i<tmp.length;i++){if(tmp[i].checked)return tmp[i].value.Trim();}}   
function getObject(elementId){ 	if (document.getElementById) { return document.getElementById(elementId); } else if (document.all) { return document.all[elementId]; } else if (document.layers) { return document.layers[elementId];}}
function new_t(i){for(var m=1;m<6;m++){getObject("new_t_"+m).style.display='none';getObject("new_t_p_"+m).src="ttimg/new_t_"+m+"_0.gif";};getObject("new_t_"+i).style.display='';getObject("new_t_p_"+i).src="ttimg/new_t_"+i+"_1.gif";}
function xHTTP(){var a=null;if(window.ActiveXObject){a=new ActiveXObject("Msxml2.XMLHTTP");if(!a){a=new ActiveXObject("Microsoft.XMLHTTP")}}else if(window.XMLHttpRequest){a=new XMLHttpRequest()}return a}
function getList_info_text(info_url,div_id){getObject(div_id).innerHTML='<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="100%"><TR><TD ALIGN="CENTER" VALIGN="MIDDLE"><IMG SRC="ttimg/loading.gif" WIDTH="32" HEIGHT="32"></TD></TR></TABLE>';var xhr=xHTTP();xhr.open("GET", info_url, true);xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){getObject(div_id).innerHTML=xhr.responseText;}else{getObject(div_id).innerHTML='获取信息失败,请重新操作……'}}};xhr.send(null);}
function date_no(data,adiv) {getObject(adiv).style.display='';var xhr=xHTTP();if(xhr){
xhr.open("POST", "date_nologin.asp", true);xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");xhr.onreadystatechange=function(){if(xhr.readyState==4){if(xhr.status==200){
if(xhr.responseText.split(",")[0]=='ok_get_card'){popclose();showAlert(2,'为【'+xhr.responseText.split(",")[1]+'】成功充值！',null);}
else if(xhr.responseText.split(",")[0]=='reg_ok'){getObject(adiv).style.display='none';window.location.href="index_reg_ok.asp";}
else if(xhr.responseText.split(",")[0]=='login_ok'){getObject(adiv).style.display='none';window.location.href="../my";}
else if(xhr.responseText.split(",")[0]=='money_yinhang_alipay_1'){popclose();getList_info('common_service_chongzhi_alipay_2.asp?uname='+xhr.responseText.split(",")[1]+'&uemail='+xhr.responseText.split(",")[2]+'&money='+xhr.responseText.split(",")[3]+'&r='+Math.random(),'show_info');}
else if(xhr.responseText.split(",")[0]=='showyue_ling_ok'){popclose();showAlert(2,'您宝宝月龄为【'+xhr.responseText.split(",")[1]+'】！',null);}
else if(xhr.responseText==1){alert('操作成功……')}else{getObject(adiv).style.display='none';alert(xhr.responseText);}}else{getObject(adiv).style.display='none';alert('网络传输错误,请重试……');}}};xhr.send(data);}}

