    var count = 1;
    var full = true;
    var fValue = 99;
    var uValue = 59;
    var curr = "$";
	
    function googlePaymentRedirect() {
        if (updatePrices()) {
            var url = "https://www.e-junkie.com/ecom/gb.php?i=WC" + curr;
            if (full)
                url += "FULL";
            else
                url += "UPGRADE";
            url += "&quantity=" + count.toString() + "&cl=50937&c=gc&ejc=4";
            window.location = url;
        }
    }
	
	
    function paymentRedirect() {
        if (updatePrices()) {
            var url = "https://www.e-junkie.com/ecom/gb.php?i=WC" + curr;
            if (full)
                url += "FULL";
            else
                url += "UPGRADE";
            url += "&quantity=" + count.toString() + "&cl=50937&c=single";
            window.location = url;
        }
    }

    function updatePrices() {
        var currID = document.getElementById("currency").selectedIndex;
        count = document.getElementById("txtCount").value;
        var isCountInt = /^-?\d+$/.test(count);
        if (isCountInt == false || count < 1 ) {
            alert("Invalid number of copies! Should be a number greater than one.");
            return false;
        }
        full = true;
        if (document.getElementById("RadioUpgrade").checked == true)
            full = false;
        if (currID == 0) {
            curr = "$"
            fValue = 99;
            uValue = 59;
            document.getElementById("googleLink").style.visibility = "hidden";
        }
        else if (currID == 1) {
            curr = "€"
            fValue = 69;
            uValue = 39;
            document.getElementById("googleLink").style.visibility = "hidden";
        }
        else {
            curr = "£"
            fValue = 59;
            uValue = 39;
            document.getElementById("googleLink").style.visibility = "visible";
        }
        document.getElementById("fullPrice").innerHTML = curr + fValue.toString();
        document.getElementById("upgradePrice").innerHTML = curr + uValue.toString();

        var totalValue = fValue * count;
        if (full == false)
            totalValue = uValue * count;
        document.getElementById("totalPrice").innerHTML = curr + totalValue.toString();
        return true;
    }
