/*

Copyright selfman@netax.sk

Product IDs

1 - L02
2 - L05 
3 - L10
4 - L20
5 - L30
6 - L40
7 - L50

*/
this.Items = new Array()

this.Items["1"] = new Array()

this.Items["1"]["Name"] = "CLICKCAT P2H-L02"
this.Items["1"]["Number"] = "202"
this.Items["1"]["Price1"] = "39.00"

this.Items["2"] = new Array()

this.Items["2"]["Name"] = "CLICKCAT P2H-L05"
this.Items["2"]["Number"] = "210"
this.Items["2"]["Price1"] = "79.00"

this.Items["3"] = new Array()

this.Items["3"]["Name"] = "CLICKCAT P2H-L10"
this.Items["3"]["Number"] = "211"
this.Items["3"]["Price1"] = "149.00"

this.Items["4"] = new Array()

this.Items["4"]["Name"] = "CLICKCAT P2H-L20"
this.Items["4"]["Number"] = "212"
this.Items["4"]["Price1"] = "199.00"

this.Items["5"] = new Array()

this.Items["5"]["Name"] = "CLICKCAT P2H-L30"
this.Items["5"]["Number"] = "213"
this.Items["5"]["Price1"] = "249.00"

this.Items["6"] = new Array()

this.Items["6"]["Name"] = "CLICKCAT P2H-L40"
this.Items["6"]["Number"] = "214"
this.Items["6"]["Price1"] = "279.00"

this.Items["7"] = new Array()

this.Items["7"]["Name"] = "CLICKCAT P2H-L50"
this.Items["7"]["Number"] = ""
this.Items["7"]["Price1"] = "ppp"

this.countries = new Array()

this.countries["1"] = "Price1"
//this.countries["2"] = "Price2"
//this.countries["3"] = "Price3"

this.country = ''
this.buyItem = ''

//=============================================================================
function pay(){

    if(this.country == ''){

        showCountrySelector()

    }else if(this.buyItem == ''){

        return false

    }else{

        if(this.Items[this.buyItem]){

            document.PaypalForm.item_name.value = this.Items[this.buyItem]["Name"]
            document.PaypalForm.item_number.value = this.Items[this.buyItem]["Number"]
            document.PaypalForm.amount.value = this.Items[this.buyItem][this.countries[this.country]]
            document.PaypalForm.submit()
        }else{
            return false
        }

    }
}

//=============================================================================
function setCountry(CID){

    if(CID!=''){
        this.country = CID
        pay()

    }else{

        this.country = ''

    }

}

//=============================================================================
function buy(ItemID){

    if(ItemID!=''){
        this.buyItem = ItemID
        pay()
    }else{

        this.buyItem = ''

    }

}

//=============================================================================
function showCountrySelector(){

    CountrySelect = window.open("selectCountry.html",'CountrySelecWindow',"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=320,height=480,top=100,left=100")

}
//=============================================================================