var second = 0;
var itvID;
function goSuccessPage() {
clearInterval(itvID);
$("#redeemTbl").hide();
$("#loadingTbl").hide();
$("#confirmTbl").hide();
$("#successTbl").show();
}
function goErrorPage() {
clearInterval(itvID);
$("#redeemTbl").hide();
$("#loadingTbl").hide();
$("#confirmTbl").hide();
$("#errorTbl").show();
}
function goNotiErrorPage() {
clearInterval(itvID);
$("#redeemTbl").hide();
$("#loadingTbl").hide();
$("#confirmTbl").hide();
$("#notierrorTbl").show();
}
function goConfirmPage() {
clearInterval(itvID);
$("#redeemTbl").hide();
$("#loadingTbl").hide();
$("#errorTbl").hide();
$("#confirmTbl").show();
}
function goLogin() {
if (document.getElementById("gocashid").value == "") {alert("Please input an Email");
document.getElementById("gocashid").focus();
return false;
}
if (document.getElementById("password").value == "") {
alert("Please input a password.");
document.getElementById("password").focus();
return false;
}
}
function goLoginRedeem() {
document.getElementById("form1").action = document.getElementById("actionurl").value;
document.getElementById("form1").submit();
return;
}
function goPreRedeem() {
$(".buttons").hide();
var szPins = $('.tmp_pin').map(function () {
if ( this.value.trim() != "" ) return this.value.trim();
}).get();
$("#pincode").val(szPins);
if (document.getElementById("pincode").value == "") {
alert("Please input a PIN code");
document.getElementById("pincode").focus();
$(".buttons").show();
return false;
}
$("#redeemTbl").hide();
$("#loadingTbl").show().delay(3000).queue(function(){
__doPostBack("lnkBtn1");
second = 1
});
}
function goRedeem() {
$(".buttons").hide();
$("#confirmTbl").hide();
$("#loadingTbl").show();
__doPostBack("btnRedeem");
}
function goMemberRedeem() {
if (document.getElementById("pincode2").value == "") {
alert("Please input a pincode");
document.getElementById("pincode2").focus();
return false;
}
if (document.getElementById("securecode") != undefined && document.getElementById("securecode").value == "") {
alert("Please input a GCC");
document.getElementById("securecode").focus();
return false;
}
}
var fname = function()
{
var msg = "A conexão da rede está instável e resultou na interrupção (time-out) desta transação. Caso contrário, a transação poderia ter sido concluída.\nTente usar o seu cartão outra vez, e se disser que já foi usado, vá ao \"Histórico de recarga\" do seu jogo para certificar-se de que recebeu a quantidade adequada de moedas de jogo.\nSe encontrar alguma diferença ou se tiver alguma dúvida, entre em contato conosco em suporte@g10vms.com.br.\n\nObrigado, \nGoCash Game Card";
if( second == 0 ) return;
if ( second == 12 )
{
alert(msg);
clearInterval(itvID);
}
else
{
second++;
}
};
function goMain() {
document.getElementById("form1").action = document.getElementById("returnurl").value;
document.getElementById("form1").submit();
}
function goCancelPage() {
document.getElementById("form1").action = document.getElementById("cancelurl").value;
$("#__EVENTTARGET").remove();
$("#__EVENTARGUMENT").remove();
$("#__VIEWSTATE").remove();
$("#cancelurl").remove();
document.getElementById("form1").submit();
}
function goPartnerPage() {
document.getElementById("form1").action = document.getElementById("successurl").value;
$("#__EVENTTARGET").remove();
$("#__EVENTARGUMENT").remove();
$("#__VIEWSTATE").remove();
$("#successurl").remove();
document.getElementById("form1").submit();
}
function AppLoad() {
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequest);
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequest);
}
function BeginRequest(sender, args) {
return;
}
function EndRequest(sender, args) {
if (args.get_error() != undefined) {
var msg = "A conexão da rede está instável e resultou na interrupção (time-out) desta transação. Caso contrário, a transação poderia ter sido concluída.\nTente usar o seu cartão outra vez, e se disser que já foi usado, vá ao \"Histórico de recarga\" do seu jogo para certificar-se de que recebeu a quantidade adequada de moedas de jogo.\nSe encontrar alguma diferença ou se tiver alguma dúvida, entre em contato conosco em suporte@g10vms.com.br.\n\nObrigado, \nGoCash Game Card";
alert(msg);
clearInterval(itvID);
args.set_errorHandled(true);
}
}
$(document).ready(function () {
itvID = setInterval(fname, 1000);
$("")
$("#pincode").keydown(function (event) {
if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 17 || event.keyCode == 86) { }
else {
if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105)) {
event.preventDefault();
}
}
});
$("#pincode").keyup(function (event) {
if (event.keyCode == 46 || event.keyCode == 8) { }
else {
if ((event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105)) {
event.preventDefault();
return;
}
}
});
Sys.Application.add_load(AppLoad);
//BUTTON EVENT
$(".paymentpg").live("click", function () {
var pgname = $(this).attr("id");
var actionurl = $(this).attr("href");
$("#pincode").val("");
document.getElementById("form1").action = actionurl;
document.getElementById("form1").submit();
return false;
});
$(".lang").live("click", function () {
var actionurl = $(this).attr("href");
document.getElementById("form1").action = actionurl;
document.getElementById("form1").submit();
return false;
});
$("#zeevexBtn").live("click", function () {
$(this).hide();
if ($("#pincode").val() == "") {
alert("Please input a PIN code");
$(this).show();
return false;
}
$("#redeemTbl").hide();
$("#loadingTbl").show().delay(10).queue(function () {
__doPostBack("btnZeevex");
second = 1
});
});
});