function loadAds() { 

    index1 = 0;
    listofimages = new Array(5);
    
    listofimages[0] = new Image(728,182)
    listofimages[0].src = "ads/tools.jpg"
    
    listofimages[1] = new Image(728,182)
    listofimages[1].src = "ads/toolBag.jpg"
    
    listofimages[2] = new Image(728,182)
    listofimages[2].src = "ads/bulkQuote.jpg"
    
    listofimages[3] = new Image(728,182)
    listofimages[3].src = "ads/masterlock.jpg"
    
    listofimages[4] = new Image(728,182)
    listofimages[4].src = "ads/spc.jpg"

    thetimer = setTimeout("changeImage()", 3000);
} 

function changeImage(){ 

    index1 = index1 + 1
    if (index1 == "5") { 
        index1 = 0 
    } 

    imagesource = listofimages[index1].src
    window.document.ads.src = imagesource
    thetimer = setTimeout("changeImage()", 4000);
} 

function changeAds() { 

    if (index1 == 0) { 
        newlocation = "tools.aspx" 
    }
    else if (index1 == 1) { 
        newlocation = "http://www.homenetworksupply.com/Installation-Tools/Buckets-Bags-Belts/products.aspx" 
    }
    else if (index1 == 2) { 
        newlocation = "bulkQuote.aspx" 
    }
    else if (index1 == 3) { 
        newlocation = "masterLock.aspx" 
    }
    else if (index1 == 4) { 
        newlocation = "speakerPlateConfig.aspx" 
    }
    
    location = newlocation 
}

function loadMasterlock() { 

    index1 = 0;
    listofimages = new Array(5);
    
    listofimages[0] = new Image(728,182)
    listofimages[0].src = "ads/Masterlock4.jpg"
    
    listofimages[1] = new Image(728,182)
    listofimages[1].src = "ads/Masterlock2.jpg"
    
    listofimages[2] = new Image(728,182)
    listofimages[2].src = "ads/Masterlock3.jpg"
    
    listofimages[3] = new Image(728,182)
    listofimages[3].src = "ads/Masterlock5.jpg"
    
    listofimages[4] = new Image(728,182)
    listofimages[4].src = "ads/Masterlock6.jpg"

    thetimer = setTimeout("changeImage()", 3000);
}

function changeMasterlock() { 

    if (index1 == 0) { 
        newlocation = "masterLock.aspx" 
    }
    else if (index1 == 1) { 
        newlocation = "masterLock.aspx" 
    }
    else if (index1 == 2) { 
        newlocation = "masterLock.aspx" 
    }
    else if (index1 == 3) { 
        newlocation = "masterLock.aspx" 
    }
    else if (index1 == 4) { 
        newlocation = "masterLock.aspx" 
    }
    
    location = newlocation 
}
