function getfrom(){
        var fun_params = location.href;
        var ret = "";
        if(fun_params.indexOf("fromid=") > -1){
                ret = fun_params.substring(fun_params.indexOf("fromid="),fun_params.length);
                if(ret.indexOf("&") > -1){
                        ret = ret.substring(0,ret.indexOf("&"));
                }
        }

        if(ret.length > 1)
                return ("&" + ret);
        else
                return "";
}
function send_pic(id,type) { //v3.1
	//window.open('http://mms.163.com/new_web/pop_send_pic.jsp?id=' + id + '&type=' + type + getfrom(),'','width=655 height=510');return false;
	window.open('http://mms.163.com/new_web/pop_send_pic.jsp?id=' + id + '&type=' + type + getfrom(),'','width=455 height=568');return false;
}
function send_pic2(id,type) { //v3.1
        window.open('http://mms.163.com/new_web/pop_send_pic2.jsp?id=' + id + '&type=' + type + getfrom(),'','width=655 height=510');return false;
}

function send_ring(id,type) { //v3.1
	//window.open('http://mms.163.com/new_web/pop_send_ring.jsp?id=' + id + '&type=' + type + getfrom(),'','width=655 height=510');return false;
	window.open('http://mms.163.com/new_web/pop_send_ring.jsp?id=' + id + '&type=' + type + getfrom(),'','width=455 height=568');return false;
}

function send_ring2(id,type) { //v3.1
        window.open('http://mms.163.com/new_web/pop_send_ring2.jsp?id=' + id + '&type=' + type + getfrom(),'','width=655 height=510');return false;
}

function pop_send_txt(id,type) { //v3.1
	window.open('http://mms.163.com/new_web/pop_send_txt.jsp?id=' + id + '&type=' + type + getfrom(),'','width=510 height=425');return false;
}
function send_txt(id,type) { //v3.1
	window.open('http://mms.163.com/cm_pop_send_text.jsp?id=' + id + '&type=' + type + getfrom(),'','width=510 height=425');return false;
}
function open_new(name){
	window.open('',name,'height=300,width=400,resize=no,scrollbars=no,toolsbar=no');	
}
