
function biglobeTicket( serviceId, buy ) {

	biglobeUrl = "http://biglobe.av-channel.com/mypage/";
	if( buy ) {
		biglobeUrl += "ticket_buy/?serviceId=" + serviceId;
	} else {
		biglobeUrl += "ticket_cancel/?serviceId=" + serviceId;
	}

	location.href = biglobeUrl;
}

function biglobeTicketGo( serviceId, buy ) {
	goodsCode = "";
	goodsName = "";
	returnUrl = "http://biglobe.av-channel.com/s/";
	if( serviceId == 1 ) {
		goodsName = "スタンダード月額チケット";
		goodsCode = buy ? "0001" : "0002";
		returnUrl += "std/m/";
	} else if( serviceId == 2 ) {
		alert("インディーズマニアチケットは、現在販売しておりません。");
		return;
	} else if( serviceId == 3 ) {
		goodsName = "熟女プレミアム月額チケット";
		goodsCode = buy ? "0007" : "0008";
		returnUrl += "jukujo/m/";
	} else if( serviceId == 4 ) {
		goodsName = "プレイズム月額チケット";
		goodsCode = buy ? "0014" : "0015";
		returnUrl += "plaism/m/";
	}
	document.biglobe.GwGoodsCode.value = goodsCode;
	document.biglobe.GwGoodsName.value = goodsName;
	document.biglobe.ReturnUrl.value = returnUrl;
	document.biglobe.ErrUrl.value = returnUrl;
	document.biglobe.submit();
}

function biglobeLogin() {
	document.biglobe.GwGoodsCode.value = "0013";
	document.biglobe.submit();
}

function rakutenTicket( serviceId ) {
	location.href="http://rk.av-channel.com/mypage/ticket_rk/?serviceId=" + serviceId;
}

function rakutenTicket2( serviceId, buy ) {
	//location.href="http://rk.av-channel.com/mypage/ticket_rk/?serviceId=" + serviceId + "buy="+buy;
	if ( buy ) {
		location.href="http://rk.av-channel.com/mypage/ticket_rk/?serviceId=" + serviceId;
	} else {
		location.href="http://rk.av-channel.com/mypage/ticket_rk_cancel/?serviceId=" + serviceId;
	}
}

function rakutenLogin() {
	location.href="http://rk.av-channel.com/login";
}

function niftyLogin() {
    niftyUrl = "https://contents.nifty.com/member/service/g-way/avchppv/gateway/nifty/login/";
    location.href = niftyUrl;
}

function niftyConfirm( serviceId ) {
    niftyUrl = "https://contents.nifty.com/member/service/";
    if( serviceId == 1 ) {
        niftyUrl += "avchstd/cgi-bin/confirm.cgi";
    } else if( serviceId == 3 ) {
        niftyUrl += "avchmw/cgi-bin/confirm.cgi";
    } else if( serviceId == 4 ) {
        niftyUrl += "avchplaism/cgi-bin/confirm.cgi";
    } else {
        return;
    }
    location.href = niftyUrl;
}


function niftyTicket( serviceId ) {
	niftyTicket( serviceId, true );
}
function niftyTicket( serviceId, buy ) {

	niftyUrl = "https://contents.nifty.com/member/service/";
	if( serviceId == 1 ) {
		niftyUrl += "avchstd";
	} else if( serviceId == 3 ) {
		niftyUrl += "avchmw";
	} else if( serviceId == 4 ) {
		niftyUrl += "avchplaism";
	} else {
		return;
	}

	if( buy )  {
		niftyUrl += "/cgi-bin/monthly_on.cgi";
	} else {
		niftyUrl += "/cgi-bin/monthly_off.cgi";
	}


	location.href = niftyUrl;
}


function biglobeTicket3Days( serviceId ) {

	biglobeUrl = "http://biglobe.av-channel.com/mypage/ticket_buy/?serviceId=" + serviceId + "&ticketType=3days";
	location.href = biglobeUrl;
}


function biglobeTicket3DaysGo( serviceId, noTaxPrice, unitPriceMD5, ratePriceMD5 ) {
	goodsCode = "";
	//goodsName = "";
	if( serviceId == 1 ) {
		//goodsName = "スタンダード3daysチケット";
		goodsCode = "0024";
	} else if( serviceId == 2 ) {
		alert("インディーズマニアチケットは、現在販売しておりません。");
		return;
	} else if( serviceId == 3 ) {
		//goodsName = "熟女プレミアム3daysチケット";
		//goodsCode = "0000003";
		goodsCode = "0025";
	} else if( serviceId == 4 ) {
		//goodsName = "プレイズム3daysチケット";
		goodsCode = "0026";
	}

	document.biglobe3days.GwGoodsCode.value = goodsCode;
	//document.biglobe3days.GoodsName.value = goodsName;
	document.biglobe3days.UnitPrice.value = noTaxPrice;
	document.biglobe3days.UnitPrice_MD5.value = unitPriceMD5;
	document.biglobe3days.Rate_MD5.value = ratePriceMD5;
	document.biglobe3days.serviceId.value = serviceId;
	document.biglobe3days.transType.value = 0;
	document.biglobe3days.submit();
}
function niftyTicket3Days( niftyUrl ) {
	location.href = niftyUrl;
}

