//HTTP通信用
function createXMLHttpRequest()
{
	var XMLhttpObject = null;
	try{
		XMLhttpObject = new XMLHttpRequest();
	}catch(e){
		try{
			XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){
				return null;
			}
		}
	}

	return XMLhttpObject;
}

//デイリーポイントキャンペーン
function dailyPtCampaign(){
	var url = "/app/event/dailyChance";
	httpObj = createXMLHttpRequest();
	httpObj.open("POST", url, true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState == 4 && httpObj.status == 200){
			//受信完了時の処理
			var result = httpObj.responseText;
			dpc_window(result);
		}
	}
	httpObj.send(null);
}

//デイリーポイントキャンペーン結果レイヤーウィンドウ表示
function dpc_window(result)
{
Dialog.alert({url: result, options: {method: 'get'}}, {className: "alphacube", width:430, height:380, showEffect:Effect.BlindDown, hideEffect: Effect.BlindUp, okLabel: "閉じる", onOk:function(){ window.location.reload(); }});
//  var win = new Window({id: "dpc_window", className: "alphacube", title: "", width:400, height:300, showEffect:Effect.BlindDown, hideEffect: Effect.SwitchOff, draggable:false, wiredDrag:false}); 
//  win.getContent().innerHTML = result; 

//  win.setDestroyOnClose(); 
//  win.show();
//  win.showCenter();
//  win.setConstraint(true, {left:10, right:20})
//  win.toFront();
}