var imgpath = '/_img/';
Image1 = new Image();
Image2 = new Image();
Image3 = new Image();
Image4 = new Image();
Image5 = new Image();

Image1.src = imgpath+"lay_05.jpg";
Image2.src = imgpath+"lay_06.jpg";
Image3.src = imgpath+"lay_07.jpg";
Image4.src = imgpath+"lay_08.jpg";
Image5.src = imgpath+"lay_09.jpg";

Image1a = new Image();
Image2a = new Image();
Image3a = new Image();
Image4a = new Image();
Image5a = new Image();

Image1a.src = imgpath+"lay_05a.jpg";
Image2a.src = imgpath+"lay_06a.jpg";
Image3a.src = imgpath+"lay_07a.jpg";
Image4a.src = imgpath+"lay_08a.jpg";
Image5a.src = imgpath+"lay_09a.jpg";

Image1b = new Image();
Image2b = new Image();
Image3b = new Image();
Image4b = new Image();
Image5b = new Image();

Image1b.src = imgpath+"lay_05b.jpg";
Image2b.src = imgpath+"lay_06b.jpg";
Image3b.src = imgpath+"lay_07b.jpg";
Image4b.src = imgpath+"lay_08b.jpg";
Image5b.src = imgpath+"lay_09b.jpg";


function toggle_amount() {
    if ($('payment_option') != null) {
        po = $('payment_option').value;
        if (po != '') {
            pos = po.split(';');
            $('x_description').value = pos[0]
            if (pos[1] > 0) {
                $('x_amount').value = pos[1];
                $('x_amount').readOnly = true;
                fingerprint();
            } else {
                $('x_amount').value = '';
                $('x_amount').readOnly = false;
            }
        }
    }
}

function fingerprint() {
//    if ($('x_amount').readOnly == false) {
        $('x_amount').disabled = true;
        new Ajax.Request("/pay_gen.php", {
            onSuccess : function(resp) {
                $('x_fp_hash').value = resp.responseText;
                $('x_amount').disabled = false;
            },
            onFailure : function(resp) {
                $('x_amount').disabled = false;
                alert("Oops, there's been an error.");
            },
            parameters : 'a='+$('x_amount').value+'&ts='+$('x_fp_timestamp').value+'&s='+$('x_fp_sequence').value
        });
        $('x_amount').disabled = false;
//    }
}

