function smspopwindow(url,title,height,width)
{
	var login=window.open(url,title,"scrollbars=no,left=100,top=50,height="+height+",width="+width);
	if(login.opener == null) login.opener = self;
}
function smsuser(url)
{
	smspopwindow(url,"user",360,500);
}

function querypw()
{
	smsuser("/common/querypassword.aspx");
}
function changepw()
{
	smsuser("/common/changepassword.aspx");
}
function smshome()
{
	window.location="/index.aspx";
}
function listen(path,title)
{
	var login=window.open("/common/ringplay.aspx?ring="+path+"&title="+title+"","listen","scrollbars=no,left=300,top=200,height=60,width=200");
	if(login.opener == null) login.opener = self;
}
function listencard(path,title)
{
	var login=window.open("/common/cardplay.asp?ring="+path+"&title="+title+"","listen","scrollbars=no,left=300,top=200,height=60,width=200");
	if(login.opener == null) login.opener = self;
}

function sendmring(id)
{
	smspopwindow("/common/SendRing.aspx?ContentType=6&SourceType=1&ContentID="+id,"Ring",420,500);
}
function sendring(id,contenttype)
{
   if(contenttype==null){contenttype=1;}
	smspopwindow("/common/SendRing.aspx?ContentType="+contenttype+"&SourceType=1&ContentID="+id,"Ring",420,500);
}
function korearing(id)
{
	smspopwindow("/common/SendRing.aspx?ContentType=1&SourceType=51&ContentID="+id,"Ring",420,500);
}
function koreamring(id)
{
	smspopwindow("/common/SendRing.aspx?ContentType=6&SourceType=51&ContentID="+id,"Ring",420,500);
}


function sendchar(id,contenttype)
{
	smspopwindow("/common/SendNokia.aspx?ContentID="+id+"&ContentType="+contenttype,"Nokia",500,500);
}

function sendflash(id,contenttype)
{
	smspopwindow("/common/SendFlash.aspx?ContentID="+id+"&ContentType="+contenttype,"Nokia",500,500);
}

function sendtext(id)
{
	smspopwindow("/common/SendText.aspx?ContentID="+id,"text",550,500);
}
function senduploadtext(Content)
{
	smspopwindow("/common/SendText.aspx?Content="+Content,"text",550,500);
}
function FormSendMsg()//Form方式提交的发送方式
{
	smspopwindow("/common/SendText.aspx?Content="+document.formsendsms.content.value+"&DestinationMobile="+document.formsendsms.DestinationMobile.value+"&signature="+document.formsendsms.signature.value,"text",600,500);
}
function sendmsg()
{
	smspopwindow("/common/SendText.aspx","text",550,500);
}

function ask()
{
	var login=window.open('/sms/user/help.asp','ask','height=300,width=480,resize=no,scrollbars=no,toolsbar=no');
	if(login.opener == null) login.opener = self;
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function subtext(factor,SubscribeID)
{
	var login=window.open("/common/subscribe.aspx?factor="+factor+"&SubscribeID="+SubscribeID,"vfsubscribe","left=300,top=150,height=360,width=480,resize=no,scrollbars=no,toolsbar=no");
	if(login.opener == null) login.opener = self;
}
function subcatalog(SubscribeTitle)
{
	var login=window.open("/common/subscribestar.aspx?SubscribeTitle="+SubscribeTitle,"vfsubscribe","left=300,top=150,height=360,width=480,resize=no,scrollbars=no,toolsbar=no");
	if(login.opener == null) login.opener = self;
}

function cleanindex()
{
	document.formsendsms.DestinationMobile.value="";
	document.formsendsms.content.value="";
	document.formsendsms.signature.value="";
}
//以下是友联网站使用的部分
function UserSendMsg()//直接发送给任意用户
{
	smspopwindow("http://sms.viafriend.com/common/SendText.aspx?vf=1","text",600,500);
}
function UserPersonalidSendMsg(Personalid)//发送给一个具有短信身份的友联用户
{
	if(Personalid == -1){
		smspopwindow("http://sms.viafriend.com/common/result.aspx?flag=error&method=close&action=sms&id=-18","",350,500);
	}
	else{
		smspopwindow("http://sms.viafriend.com/miliao/index.aspx?vf=1&Personalid="+Personalid,"text",380,500);
	}
}
function UserFormSendMsg()//Form方式提交的发送方式
{
	smspopwindow("http://sms.viafriend.com/common/SendText.aspx?vf=1&Content="+document.formsendsms.content.value+"&DestinationMobile="+document.formsendsms.DestinationMobile.value,"text",600,500);
}
function ask()
{
	var login=window.open('/common/question.aspx','ask','left=200,top=100,height=400,width=500,resize=no,scrollbars=no,toolsbar=no');
	if(login.opener == null) login.opener = self;
}
function ShowContent(Person) 
	{
		window.open ('http://www.viafriend.com/home/userinfo1.aspx?personalid=' + Person);
	}/*<a href="http://xmcyberpolice.cn/alert.asp" target=_blank><img src="http://xmcyberpolice.cn/image/gt.gif" border='0'></a>*/
