/*---------------------------------------------------------------------------
**	
**	プログラム名：【GJ!】Javascrpitインターフェイス ver2
**	rev		 	 :2.00
**	製作者		：HEX68
**	Website		：http://hmlab.info/minor/
**	Date		：2008/03/27
**
**---------------------------------------------------------------------------*/

//【GJ!】PHPスクリプトへのURL
URL = "http://harupi.com/photo/gj/gj.php";

/*---------------------------------------------------------------------------
**	
**	ウェブ【GJ!】PHPへのリクエストメソッド
**
**---------------------------------------------------------------------------*/
function goodjob(cpageurl,cpagename)
{
	param = "pageurl=" + cpageurl + "&pagename=" + cpagename + "&cache=" + (new Date()).getTime();
	
	mess_id = cpageurl + "_gj_message";
	new Ajax.Request(URL,{
			method:'get',
//			parameters:param+"&mode=gj" + "&gj_message=" + $(mess_id).value,
			parameters:param+"&mode=gj" + "&gj_message=''",
			onComplete:function(e)
			{
//				$(mess_id).value = "";
//				$(mess_id).style.visibility = "visible";
				
				showbutton(cpageurl,cpagename,1);
			},
			onException:function(e)
			{

			}
		}
	);
	
}
/*---------------------------------------------------------------------------
**	
**	拍手ボタンの描画メソッド
**
**---------------------------------------------------------------------------*/
function showbutton(cpageurl, cpagename, cbutton)
{
	address = URL + "?pageurl=" + cpageurl + "&pagename=" + cpagename + "&button=" + cbutton + "&mode=button" +"&cache=" + (new Date()).getTime();
	$(cpageurl).src = address;
}

