// JavaScript Documentfunction alertmsg(){	alert('敬爱的用户，mms网站正在测试中\n本功能暂时未能提供，敬请原谅');	return;}function showPicSony(kind,fileno,pictype){	var filesup;	if (pictype==1) filesup = '.gif';	if (pictype==2) filesup = '.jpg';	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+fileno+filesup+'); '+'background-repeat:no-repeat; background-position:center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD>');    document.write('<IMG SRC="http://images2.21cn.com/mms/images/none.gif" WIDTH="101" HEIGHT="80">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function showPicNokia(kind,fileno,pictype){	var filesup;	if (pictype==1) filesup = '.gif';	if (pictype==2) filesup = '.jpg';	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+fileno+filesup+'); '+'background-repeat:no-repeat; background-position:center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD>');    document.write('<IMG SRC="http://images2.21cn.com/mms/images/none.gif" WIDTH="174" HEIGHT="136">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function showPicPana(kind,fileno,pictype){	var filesup;	if (pictype==1) filesup = '.gif';	if (pictype==2) filesup = '.jpg';	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+fileno+filesup+'); '+'background-repeat:no-repeat; background-position:center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD>');    document.write('<IMG SRC="http://images2.21cn.com/mms/images/none.gif" WIDTH="132" HEIGHT="135">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function showPicNec(kind,fileno,pictype){	var filesup;	if (pictype==1) filesup = '.gif';	if (pictype==2) filesup = '.jpg';	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+fileno+filesup+'); '+'background-repeat:no-repeat; background-position:center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD>');    document.write('<IMG SRC="http://images2.21cn.com/mms/images/none.gif" WIDTH="162" HEIGHT="216">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function onKeycheckPicSearch(){	if (window.event.keyCode == 13) {		return checkPicSearch();	}}function checkPicSearch(){	if (document.searchfrm.keyword.value==null||document.searchfrm.keyword.value==''){		alert('请先输入查询关键字');		document.searchfrm.keyword.focus();		return;	}	document.searchfrm.condition.value = ' and binary intro like \'%'+document.searchfrm.keyword.value+'%\' ';	document.searchfrm.submit();	return;}function onKeycheckRingSearch(){	if (window.event.keyCode == 13) {		return checkRingSearch();	}}function checkRingSearch(){	if (document.searchfrm.keyword.value==null||document.searchfrm.keyword.value==''){		alert('请先输入查询关键字');		document.searchfrm.keyword.focus();		return;	}	document.searchfrm.condition.value = ' and ( binary intro like \'%'+document.searchfrm.keyword.value+'%\' ';	document.searchfrm.condition.value += ' or binary name like \'%'+document.searchfrm.keyword.value+'%\' ';		document.searchfrm.condition.value += ' or singer like \'%'+document.searchfrm.keyword.value+'%\') ';	document.searchfrm.condition.value += ' and chord='+document.searchfrm.chord.options[document.searchfrm.chord.selectedIndex].value+' ';	document.searchfrm.submit();	return;}function showPic(filename){	kind = 3;	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+filename+'); '+'background-repeat:no-repeat; background-position: center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD STYLE="cursor:hand" onclick="sendPic(\'' + filename + '\');">');    document.write('<IMG SRC="http://images2.21cn.com/mms/images/none.gif" WIDTH="122" HEIGHT="96">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function showmainPic(kind,fileno,pictype){	var filesup;	if (pictype==1) filesup = '.gif';	if (pictype==2) filesup = '.jpg';	kind = 1;	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+fileno+filesup+'); '+'background-repeat:no-repeat; background-position: center center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD>');    document.write('<IMG SRC="http://images.21cn.com/mms/images/none.gif" WIDTH="122" HEIGHT="96">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function previewPic(filename){	kind = 6;	  document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+filename+'); '+'background-repeat:no-repeat; background-position: center center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD>');    document.write('<IMG SRC="http://images.21cn.com/mms/images/none.gif" WIDTH="128" HEIGHT="160">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function showbigPic(filename){	kind = 2;	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+filename+'); '+'background-repeat:no-repeat; background-position: center center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD STYLE="cursor:hand" onclick="sendPic(\'' + filename + '\');">');    document.write('<IMG SRC="http://images.21cn.com/mms/images/none.gif" WIDTH="128" HEIGHT="128">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');} function showbig2Pic(filename){	kind = 6;	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+filename+'); '+'background-repeat:no-repeat; background-position: center center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD STYLE="cursor:hand" onclick="sendPic(\'' + filename + '\');">');    document.write('<IMG SRC="http://images.21cn.com/mms/images/none.gif" WIDTH="128" HEIGHT="160">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function showbig3Pic(filename){	kind = 1;	document.write('<TABLE STYLE="border-collapse: collapse; background-image: url(http://images2.21cn.com/mms/photo/'+kind+'/'+filename+'); '+'background-repeat:no-repeat; background-position: center center" BORDER="0" CELLSPACING="0" CELLPADDING="0">');    document.write('<TR>');    document.write('<TD STYLE="cursor:hand" onclick="sendPic(\'' + filename + '\');">');    document.write('<IMG SRC="http://images.21cn.com/mms/images/none.gif" WIDTH="176" HEIGHT="220">');    document.write('</TD>');    document.write('</TR>');    document.write('</TABLE>');}function editPic(kind,fileno,pictype){	var filesup;	if (pictype==1) filesup = '.gif';	if (pictype==2) filesup = '.jpg';	kind = 2;	picFile = 'http://images2.21cn.com/mms/photo/'+kind+'/'+fileno+filesup;	window.resizeTo(700,520);	window.location.href='http://211.154.103.6/21cn/popedit.php?img='+picFile;}function picpreview(kind,mobiletype,fileno,pictype){	window.open('http://mms.21cn.com/sendpic.jsp?bigkind='+kind+'&mobiletype='+mobiletype+'&file_pre='+fileno+'&file_sup='+pictype,'send','width=400,height=438,resizable=0,scrollbars=0,status=no,toolbar=no,location=no,menu=no');}function ringpreview(fileno,chord,mobiletype){	window.open('http://mms.21cn.com/sendring.jsp?filename='+fileno+'&chord='+chord+'&mobiletype='+mobiletype,'send','width=400,height=438,resizable=0,scrollbars=0,status=no,toolbar=no,location=no,menu=no');}function newpicpreview(kind,mobiletype,fileno,pictype,service_id){	window.open('http://mms.21cn.com/sendpic.jsp?bigkind='+kind+'&mobiletype='+mobiletype+'&file_pre='+fileno+'&file_sup='+pictype+'&service_id='+service_id,'send','width=400,height=438,resizable=0,scrollbars=0,status=no,toolbar=no,location=no,menu=no');}function newringpreview(fileno,chord,mobiletype,service_id){	window.open('http://mms.21cn.com/sendring.jsp?filename='+fileno+'&chord='+chord+'&mobiletype='+mobiletype+'&service_id='+service_id,'send','width=400,height=438,resizable=0,scrollbars=0,status=no,toolbar=no,location=no,menu=no');}function Old_sendpreview(gifpath){	window.open('http://mms.21cn.com/sendgif.jsp?id='+gifpath,'send','width=417,resizable=0,scrollbars=1,status=no,toolbar=no,location=no,menu=no');}function sendpreview(gifpath){	window.open('http://mms.21cn.com/sendgif.jsp?id='+gifpath,'send','width=417,resizable=0,scrollbars=1,status=no,toolbar=no,location=no,menu=no');}var IE=document.all;var NC=document.layers;var HMF=1;function EditIt(no) {	var obj;	framenum.value=no;	if(HMF>1) {		obj=eval("editit("+(no-1)+")");		obj.checked="checked";		for (i=1;i<6;i++){			IE('frame'+i).style.backgroundColor='';		}		IE('frame'+no).style.backgroundColor="#F7863C";	}	else editit.checked="checked";}function SHlayer(N1){		for (i=1;i<6;i++){		Lname="frame"+i;		if (i<=N1){			IE(Lname).style.visibility="visible";			IE(Lname).style.overflow="visible";		}else{			IE(Lname).style.visibility="hidden";			IE(Lname).style.overflow="hidden";		}	}	if (framenum.value>N1){		EditIt(N1);	}}function isnd(n) {	var obj1, obj2, obj3;	obj1=eval("cb"+n);	if(obj1.checked==true) {		obj1.checked=false;		alert("测试期间，本功能暂时未能提供");		return false;	}	else {		obj2=eval("snd"+n+"id");		obj2.value="";		obj2=eval("prevsnd"+n+"id");		obj2.value="";		obj3=eval("sndname"+n);		obj3.innerText="";	}}function sendmms(action){	var i, n, obj1, obj2, c=0, re;		if(action=="preview"){		mainfrm.q.value="diy_preview";		mainfrm.target="mms_preview_win";	}	else if(action=="send"){		mainfrm.q.value="diy_preview_newwin";		mainfrm.target="mms_preview_newwin";	}	else {		alert("请选择您需要的操作！");		return -1;	}			n=HMF;	for(i=1;i<=n;i++) {		c=0;		obj1=eval("mainfrm.type" + i);		obj2=eval("type" + i);		if(obj2(0).checked==true) obj1.value=obj2(0).value;		else obj1.value=obj2(1).value;		obj1=eval("mainfrm.mms_text" + i);		obj2=eval("mms_text" + i);		obj1.value=obj2.value;		if(!obj1.value) c++;		obj1=eval("mainfrm.img" + i + "id");		obj2=eval("img" + i + "id");		obj1.value=obj2.value;		if(!obj1.value) c++;		if(c==2) {			alert("第 " + i + " 帧至少需要有一个图片或一段文字！");			return -1;		}		obj1=eval("mainfrm.snd" + i + "id");		obj2=eval("snd" + i + "id");		obj1.value=obj2.value;		obj1=eval("mainfrm.prevsnd" + i + "id");		obj2=eval("prevsnd" + i + "id");		obj1.value=obj2.value;		obj1=eval("mainfrm.dur" + i);		obj2=eval("dur" + i);		obj1.value=obj2.options[obj2.selectedIndex].value;		if(!obj1.value) {			alert("请选择第 " + i + " 帧的播放时间！");			return -1;		}	}	mainfrm.framecount.value=HMF;	if(action=="send"){		window.open('preview.jsp?sendok=ok','send','width=400,height=320,resizable=0,scrollbars=0,status=no,toolbar=no,location=no,menu=no');		return;	}	mainfrm.submit();}function NextFrame(num){	if (num==HMF){		HMframe.framecount.options[num].selected=true;		num++;		SHlayer(num);		HMF=num;		setTimeout('EditIt('+num+')',200);	}}function SetVars(id, src, des, bg) {	var obj, obj1;	if(framenum.value<1 || framenum.value>5) {		alert("请先选择要编辑的帧。\n请点击页面中间所编辑帧的蓝色框部分。");		return -1;	}	else {		if(src=="img") {			obj=eval("img"+framenum.value);			obj.src=id;			obj1=eval("img"+framenum.value+"id");			obj1.value=id;						obj2=eval("type"+framenum.value+"[0]");			obj2.checked=true;			obj2=eval("mms_text"+framenum.value);			obj2.disabled=true;		}		else if(src=="snd"){			obj1=eval("snd"+framenum.value+"id");			obj1.value=id;			obj1=eval("sndname"+framenum.value);			obj1.innerText=des;			obj1=eval("cb"+framenum.value);			obj1.checked=true;		}	}}function upformaction() {	if(framenum.value<1 || framenum.value>5) {		alert("请先选择要编辑的帧。");		return -1;	}	else {		upform.framenum.value=framenum.value;		upform.submit();	}}