
//彩铃定制 俱乐部
function order(mtype, songid) {
	w = 641;
	h = 447;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	wh = window.open("http://user.12530.com/new12530/?m=order&type=" + mtype + "&id=" + songid, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}

function order_price(mtype, songid,pricetype) {
	w = 641;
	h = 447;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	wh = window.open("http://user.12530.com/new12530/?m=order&type=" + mtype + "&id=" + songid+ "&p=" + pricetype, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}

//彩铃定制 12530
function order_12530(mtype, songid,logins,page,menu,sn,channel,childchannel,nodeid,type,reserve) {
	setCookie("songid", songid, null, "/", innerip);
	w = 730;
	var pl = document.getElementById("Exobud");
	h = 566;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	if(typeof(iflogin)!="undefined")
	 logins = iflogin;
	 var url = innerip + "main/"+ mtype + "/subscribe/indexall/" + logins +"/" + page + "/"  + menu   + "/" + sn + "/"+ nodeid + "/"+ type +  "/" + reserve  +"/--------------------------------------" + songid + ".html";	
	var jugeurl = innerip + "/tpl/subscribe/juge.htm?url="+url;
	wh = window.open(jugeurl, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	
	//wh = window.open(, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}

////彩玲一步定制12530
function neworder_12530(mtype, songid,logins,page,menu,sn,channel,childchannel,nodeid,type,reserve) {
	setCookie("songid", songid, null, "/", innerip);
	w = 730;
	var pl = document.getElementById("Exobud");
	h = 566;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	if(typeof(iflogin)!="undefined")
	 logins = iflogin;
	 var url = innerip + "main/"+ mtype + "/newsubscribe/index/" + logins +"/" + page + "/"  + menu   + "/" + sn + "/"+ nodeid + "/"+ type +  "/" + reserve  +"/--------------------------------------" + songid + ".html";	
	var jugeurl = innerip + "/tpl/newsubscribe/juge.htm?url="+url;
	wh = window.open(jugeurl, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	
	//wh = window.open(, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}


////专区活动定值页面。
function newordertone_12530(mtype, songid,logins,page,menu,sn,channel,childchannel,nodeid,type,reserve) {
	setCookie("songid", songid, null, "/", innerip);
	w = 730;
	var pl = document.getElementById("Exobud");
	h = 566;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	if(typeof(iflogin)!="undefined")
	 logins = iflogin;
	 var url = innerip + "main/"+ mtype + "/qqordertone/index/" + logins +"/" + page + "/"  + menu   + "/" + sn + "/"+ nodeid + "/"+ type +  "/" + reserve  +"/--------------------------------------" + songid + ".html";	
	var jugeurl = innerip + "/tpl/newsubscribe/juge.htm?url="+url;
	wh = window.open(jugeurl, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	
	//wh = window.open(, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}





function del_12530(id,mobile,key,fid,uid)
{
	
	{
		if(key=="ringlist")
		{
			var url = "?m=common&a=public&type=ringdel&mdmcid="+id;
			
		}
		else if(key=="favlist")
		{
			if(uid==0)
			{
				alert("请先登陆,谢谢");
				return false;
			}
			var url = "?m=common&a=public&type=favdel&favoriteid="+fid+"&contentid="+id;
			//alert("aaaaaaaaaaaaaaaa"+url);
		}
		
			//alert(url);
			
			var cr = confirm("确认删除?");
			if(cr)
			{
			   var http_request = GetAjaxObj();
	if (!http_request) {return false;}
	http_request.onreadystatechange = function () 
	{
		if (http_request.readyState == 4) 
		{
			if (http_request.status == 200)
			{
				var cookiestrs = http_request.responseText;
				var	cookiestr2 = cookiestrs.split("<>");
				var	cookiestr = cookiestr2[2];
				var	mes = cookiestr2[1];
				if(!mes)
				mes="删除失败";
				{
					alert(mes);
					url2 = innerip+"?m=mspace&page=inner&type="+key;
					//alert(url2);
			cajax('ilistlist',url2);
				
			urlr = innerip+'?m=mspace&page=pagesort&type='+key+'&am=1';
			cajax('pagetran',urlr);	 
					
					
				}
				
			}
		}
	};
	http_request.open("POST",url, true);
{http_request.setRequestHeader('Content-Type','application/x-www-form-urlencoded');http_request.send(null);}
			
			}
	}
	
}
function setring_12530(id,mobile,key)
{
		var url = "?m=common&a=public&type=ringset&mdmcid="+id;
	
		cajax('abc',url);
		alert("默认彩铃设置已提交,请稍后查询...");
}
//注册 12530
function register_12530(wh,cod) {
	if(!wh)
	wh="register";
	if(cod)
	code = "&type="+cod;
	else
	code="";
	w = 580;
	h = 380;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	wh = window.open(innerip + "?channel="+encodeURI(channel)+"&cchannel="+encodeURI(cchannel)+"&m="+wh+code, "register", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}
function common_12530(wh,cod,wi,hi) {
	if(!wh)
	wh="register";
	if(cod)
	code = "&type="+cod;
	else
	code="";
	if(wi==null || wi=="")
	w = 580;
	else
	w=wi;
	
	if(hi==null || hi=="")
	h = 580;
	else
	h=hi;
	
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	wh = window.open(innerip + "?m="+wh+code, "wh", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}

//搜索
function search(type, key) {
	wh = window.open("http://service.12530.com/new12530/?m=search&type=" + type + "&keyword=" + key);
}


//检查是否是中国移动手机号
function isCMCCmobile(s) {
	var patrn=/^1((3[4-9])|(5[0|4-9]))[0-9]{8}$/;
	if (patrn.exec(s)) {
		return true;
	}
	return false;
}


//检查Email地址是否符合规范
function chkEmailFormat(s) {
	var patrn=/^([a-zA-Z0-9_-]|\.)+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
	if (patrn.exec(s)) {
		return true;
	}
	return false;
}

//跳转明星展示页
function singer_show(val,type) {
	if(type=='name'){
		//wh = window.open("./?m=disc&a=singer_show&name=" + val);
		wh = window.open("http://service.12530.com/new12530/?m=search&type=singername&keyword=" + val);

	}else{
		wh = window.open("./?m=disc&a=singer_show&id=" + val);
	}
}

//跳转专辑展示页
function disc_show(val) {
	wh = window.open("./?m=disc&a=disc_show&id=" + val);
}
//全曲视听
function order_QQST(songid) {
	w = 641;
	h = 447;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	wh = window.open("./?m=order&a=play&mid=" + songid, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}

function order_QQST1(songid,a) {
	w = 641;
	h = 447;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	wh = window.open("./?m=order&a=play&crbtid="+a+"&tid=" + songid, "order", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}


function audition(id) {
	w = 580;
	h = 425;
	l = (screen.width - w) / 2;
	t = (screen.height - h) / 3;
	wh = window.open("http://www.12530.com/index/ordering/ts_1st.php?musicid=" + id, "ordering", "width="+w+",height="+h+",left="+l+",top="+t);
	wh.focus();
}

////提示密码过于简单
function pdpassalert(obj){
    if(typeof(passalert)=='function'){
	   passalert(obj);
	}
}




function passalert(obj){
    var pass = obj.value;
	var p = 0;
	for(var i=0;i<obj.value.length;i++){
	   if(pass.substring(i,i+1)!=pass.substring(i+1,i+2)){
	      p = p+1;
	   }
	}
	if(p==1){
	   alert('亲爱的用户，您的密码过于简单，请尽快到当省彩铃网站或者播打本地12530修改密码！');
	}
}


