// --- LOAD PAGE ---
function loadpage() {
browver= parseInt(navigator.appVersion);
browtype = navigator.appName;
browsertype = "old";
if (browtype == "Netscape" && !(browver < 3)) {
browsertype = "new";
}
if (browtype == "Microsoft Internet Explorer" && !(browver < 4)) {
browsertype = "new";
}
if (browsertype == "new") {
// --- Init timer:
thetimer = setTimeout("changeimage()", 550);
thetimer2 = setTimeout("changeimage2()", 550);
thetimer3 = setTimeout("changeimage3()", 550);

// --- Init Lista Banner 1:
listofimages = new Array(5);
listofimages[0] = new Image(468,60)
listofimages[0].src = "epicur.gif"
listofimages[1] = new Image(468,60)
listofimages[1].src = "marinella.gif"
listofimages[2] = new Image(468,60)
listofimages[2].src = "monsieur.gif"
listofimages[3] = new Image(468,60)
listofimages[3].src = "parlamento.gif"
listofimages[4] = new Image(468,60)
listofimages[4].src = "fumarelapipa.gif"


listofhref = new Array(5);
listofhref[0] = "http://www.epicurmagazine.com"
listofhref[1] = "http://www.marinellanapoli.it"
listofhref[2] = "http://www.monsieur.it"
listofhref[3] = "http://www.parlamentodeifumatori.it"
listofhref[4] = "http://www.fumarelapipa.it"


// --- Init Lista Banner 2: 150x150
listofimages2 = new Array(6);
listofimages2[0] = new Image(150,150)
listofimages2[0].src = "varnelli.gif"
listofimages2[1] = new Image(150,150)
listofimages2[1].src = "heeschen.gif"
listofimages2[2] = new Image(150,150)
listofimages2[2].src = "logo_toscana.gif"
listofimages2[3] = new Image(150,150)
listofimages2[3].src = "ferrari_logo.gif"
listofimages2[4] = new Image(150,150)
listofimages2[4].src = "danish_pipemakers.gif"
listofimages2[5] = new Image(150,150)
listofimages2[5].src = "banner_havanapipes.jpg"

listofhref2 = new Array(6);
listofhref2[0] = "http://www.varnelli.it"
listofhref2[1] = "http://www.heeschen-pipes.dk"
listofhref2[2] = "http://www.amicidellatoscana.it"
listofhref2[3] = "http://www.ferrarispumante.it"
listofhref2[4] = "http://www.danishpipemakers.com"
listofhref2[5] = "http://www.havanapipes.com"


// --- Init Lista Banner 3: 150x150
listofimages3 = new Array(6);
listofimages3[0] = new Image(150,150)
listofimages3[0].src = "varnelli.gif"
listofimages3[1] = new Image(150,150)
listofimages3[1].src = "heeschen.gif"
listofimages3[2] = new Image(150,150)
listofimages3[2].src = "logo_toscana.gif"
listofimages3[3] = new Image(150,150)
listofimages3[3].src = "ferrari_logo.gif"
listofimages3[4] = new Image(150,150)
listofimages3[4].src = "danish_pipemakers.gif"
listofimages3[5] = new Image(150,150)
listofimages3[5].src = "ipalatielisi.gif"

listofhref3 = new Array(6);
listofhref3[0] = "http://www.varnelli.it"
listofhref3[1] = "http://www.heeschen-pipes.dk"
listofhref3[2] = "http://www.amicidellatoscana.it"
listofhref3[3] = "http://www.ferrarispumante.it"
listofhref3[4] = "http://www.danishpipemakers.com"
listofhref3[5] = "http://www.palatielisi.it"



// --- Init Indici Banner:
banneradcode = 0;
banneradcode = Math.round(Math.random()*(listofhref.length-1));

banneradcode2 = 0;
banneradcode2 = Math.round(Math.random()*(listofhref2.length-1));

banneradcode3 = 0;
banneradcode3 = Math.round(Math.random()*(listofhref3.length-1));
}
}

// --- BANNER 1 ---

function changeimage(){
if (browsertype == "new") {
banneradcode = banneradcode + 1
if (banneradcode >= (listofhref.length)) {
banneradcode = 0
}
imagesource = listofimages[banneradcode].src
window.document.bannerad.src = imagesource
thetimer = setTimeout("changeimage()", 2000);
}
else if (browsertype == "old") {
}
}

function changepage() {
if (browsertype == "new") {
if (banneradcode < (listofhref.length)) {
newlocation = listofhref[banneradcode]
}

location = newlocation
}
else if (browsertype == "old") {
location = "#"
}
}

// --- BANNER 2 ---
function changeimage2(){
if (browsertype == "new") {
banneradcode2 = banneradcode2 + 1
if (banneradcode2 >= (listofhref2.length)) {
banneradcode2 = 0
}
imagesource2 = listofimages2[banneradcode2].src
window.document.bannerad2.src = imagesource2
thetimer2 = setTimeout("changeimage2()", 2100);
}
else if (browsertype == "old") {
}
}

function changepage2() {
if (browsertype == "new") {
if (banneradcode2 < (listofhref2.length)) {
newlocation = listofhref2[banneradcode2]
}

location = newlocation
}
else if (browsertype == "old") {
location = "#"
}
}

// --- BANNER 3 ---
function changeimage3(){
if (browsertype == "new") {
banneradcode3 = banneradcode3 + 1
if (banneradcode3 >= (listofhref3.length)) {
banneradcode3 = 0
}
imagesource3 = listofimages3[banneradcode3].src
window.document.bannerad3.src = imagesource3
thetimer3 = setTimeout("changeimage3()", 2150);
}
else if (browsertype == "old") {
}
}

function changepage3() {
if (browsertype == "new") {
if (banneradcode3 < (listofhref3.length)) {
newlocation = listofhref3[banneradcode3]
}

location = newlocation
}
else if (browsertype == "old") {
location = "#"
}
}
// --- END Scroller ---
