function create() {
        this.width = ''
        this.height = ''
        this.src = ''
        this.border = ''
}
ads = new Array()
for(var i=1; i<=4; i++) { ads[i] = new create() }

ads[1].width = "780"
ads[1].height = "180"
ads[1].src = "images/top_01.jpg"
ads[1].border = "0"

ads[2].width = "780"
ads[2].height = "180"
ads[2].src = "images/top_02.jpg"
ads[2].border = "0"

ads[3].width = "780"
ads[3].height = "180"
ads[3].src = "images/top_03.jpg"
ads[3].border = "0"

ads[4].width = "780"
ads[4].height = "180"
ads[4].src = "images/top_04.jpg"
ads[4].border = "0"


var n = Math.random() + ''
n = parseInt(n.charAt(4))
if(n >4) {
        n = n - 4
}
else if(n==0) {
        n = n + 4
}
n += ""

var image = ads[n]
var adA = ""
adA += '<img src="' + image.src + '" width=' + image.width
adA += '\n height=' + image.height + ' border=' + image.border
