function cellphone_send_open( $category_id, $ring_filename )
{
	var $params = "category_id=" + $category_id + "&ring_filename=" + $ring_filename;


				//XMLデータの取得
	new Ajax.Request(
				'cellphone_send_open.php',
				{
					method: 'post',
					onSuccess: request_ok,
					onFailure: request_ng,
					parameters: $params
				});


	function request_ok(req)
	{
		//alert(req.responseText);
//		document.getElementById('cellphone_send').innerHTML=req.responseText;
		document.getElementById('cellphone_send').innerHTML=get_response_text( req );
	}

	function request_ng(req){}
}


function get_response_text ( req )
{
    var text = req.responseText;
    esc = text;
       if ( esc.indexOf("%u") < 0 && esc.indexOf("%") > -1 ) {
            text = decodeURIComponent( esc );
        }
    return text;
}

function cellphone_send_close()
{
	document.getElementById('cellphone_send').innerHTML = "";
	document.getElementById('cellphone_send_message').innerHTML = "";

}


function cellphone_send_submit()
{
	var $params = "cellphone_send_email=" + document.getElementById('cellphone_send_email').value;

				//XMLデータの取得
	new Ajax.Request(
				'cellphone_send.php',
				{
					method: 'get',
					onSuccess: request_ok,
					onFailure: request_ng,
					parameters: $params
				});


	function request_ok(req)
	{
		document.getElementById('cellphone_send_message').innerHTML = "送信が完了しました。自動で閉じます。";

		//alert(req.responseText);
//		document.getElementById('cellphone_send').innerHTML=req.responseText;
		var tid = setTimeout("cellphone_send_close()",2000);
	}

	function request_ng(req){}

}
