function subscribeEmail(id){
	var mail = $("#"+id).val();
	var params = {};
	var reg = new RegExp("^\\w+(\\.\\w+)*@\\w+(\\.\\w+)+$");
	params["mail"] = $("#"+id).val();
	if( mail=="" || !reg.test(mail) ){
		alert("请输入正确的E-Mail地址！");
		$("#"+id).val("");
	}else{
		$.post("./edm_subscribe.do",params,function(data){
			alert(data);
		});
	}
}

	function getDom(id) {
		return document.getElementById(id);
	}

	function showDiv(index){
		if(index=="1"){
			getDom("mobileSoftDiv").style.display = "";
			getDom("mobileGameDiv").style.display = "none";
			//getDom("clickAdDiv").style.display = "none";
			getDom("otherDiv").style.display = "none";
			getDom("mobileSoftLi").className = "index_ad_on";
			getDom("mobileGameLi").className = "index_ad_off";
			//getDom("clickAdLi").className = "index_ad_off";
			getDom("otherLi").className = "index_ad_off";
		}else if(index=="2"){
			getDom("mobileSoftDiv").style.display = "none";
			getDom("mobileGameDiv").style.display = "";
			//getDom("clickAdDiv").style.display = "none";
			getDom("otherDiv").style.display = "none";
			getDom("mobileSoftLi").className = "index_ad_off";
			getDom("mobileGameLi").className = "index_ad_on";
			//getDom("clickAdLi").className = "index_ad_off";
			getDom("otherLi").className = "index_ad_off";
		}else if(index=="99"){
			getDom("mobileSoftDiv").style.display = "none";
			getDom("mobileGameDiv").style.display = "none";
			//getDom("clickAdDiv").style.display = "none";
			getDom("otherDiv").style.display = "";
			getDom("mobileSoftLi").className = "index_ad_off";
			getDom("mobileGameLi").className = "index_ad_off";
			//getDom("clickAdLi").className = "index_ad_off";
			getDom("otherLi").className = "index_ad_on";
		}else if(index=="100"){
			getDom("mobileSoftDiv").style.display = "none";
			getDom("mobileGameDiv").style.display = "none";
			//getDom("clickAdDiv").style.display = "";
			getDom("otherDiv").style.display = "none";
			getDom("mobileSoftLi").className = "index_ad_off";
			getDom("mobileGameLi").className = "index_ad_off";
			//getDom("clickAdLi").className = "index_ad_on";
			getDom("otherLi").className = "index_ad_off";
		}
	}

    /* 首页广告展现层
     * @param content 内容对象{id,adName等};
     */
	function adPop(content){
	    var pattern=/\*\^\~/g;//属性中广告语分隔符替换
	    content['adLanguage']=content['adLanguage'].replace(pattern,"，");

	    var PopWindow=PopUtils.createPop({title:'详细内容',show:true});
		PopWindow.show();
		PopWindow.setContent("<font size='2' ><table width='400px'  height='180px' style='line-height:20px'><tr><td align='right'>广告图片：</td><td><img class='image1' src='"+content['imageUrl']+"'></td></tr>"+
							  "<tr><td align='right' width='100px'>广告名称：</td><td width='300px'>"+content['adName']+"</td></tr>"+
							  "<tr><td align='right'>计费方式：</td><td>"+content['balanceTypeName']+"</td></tr>"+
							  "<tr><td align='right'>推荐广告语：</td><td>"+content['adLanguage']+"</td></tr>"+
							  "<tr><td align='right'>广告说明：</td><td>"+content['adDescription']+"</td></tr>"+
							  "<tr><td align='right'>申请审核：</td><td>"+content['webMasterCheck']+"</td></tr>"+
							  "<tr><td align='right'>广告链接：</td><td><span class=\"btn_left\" onclick=\"window.location.href='./user_adlist.do'\"></span><span class=\"btn_mid\" onclick=\"window.location.href='./user_adlist.do'\">立即申请</span><span class=\"btn_right\" onclick=\"window.location.href='./user_adlist.do'\"></span></td></tr></table></font>");
		PopUtils.moveCenter(PopWindow);
	}

	//填充首页联系我们
	function fillContact(){
       var contact_content = "";
		contact_content +='<p>客服专线：QQ　<a target=blank href=tencent://message/?uin=904832241&Site=http://www.taogao.net&Menu=yes>904832241<img border="0" SRC=http://wpa.qq.com/pa?p=1:904832241:4 ></a></p>';
		contact_content +='<p>广告投放：QQ　<a target=blank href=tencent://message/?uin=178168483&Site=http://www.taogao.net&Menu=yes>178168483<img border="0" SRC=http://wpa.qq.com/pa?p=1:178168483:4 ></a></p>';
		contact_content +='<p>商务合作：QQ　<a target=blank href=tencent://message/?uin=754611530&Site=http://www.taogao.net&Menu=yes>754611530<img border="0" SRC=http://wpa.qq.com/pa?p=1:754611530:4 ></a></p>';
		contact_content +='<p style="line-height:180%;margin-top:3px">淘告群1 ：QQ　33350342</p>';
		contact_content +='<p style="line-height:180%">淘告群2 ：QQ　60487789</p>';
		contact_content +='<p style="line-height:180%">客服电话：021-63460205-171</p>';
		contact_content +='<p style="line-height:180%">商务电话：021-63460205-175</p>';
		$("#contact_us").html(contact_content);
	}

