var x=2;//start image. leave this alone
var imageCount=6; //this is the number of images

$(document).ready(function () {
    setTimeout("fin()",4000);
    
    var imageList = new Array; //array for the images
    for (i=0;i<imageCount;i++){//buffer all images
        imageList[i] = new Image; //set array element to be an image
        imageList[i].src='graphics/hp/slideshow/'+i+'.jpg';} //load image
        
    checkPostedQuery();

});
function fin(){
    x++;
    if (x==imageCount+1) x=1;//if we exceed the number of images available, reset counter
    
    if (x%2!=0){//if we are odd
        $('div.bottomOne').fadeIn(500);  
        setTimeout(function(){document.getElementById('topImage').src= 'graphics/hp/slideshow/'+x+'.jpg';},700);}
    else{//if even
        $('div.bottomOne').fadeOut(500);
        setTimeout(function(){document.getElementById('bottomImage').src= 'graphics/hp/slideshow/'+x+'.jpg';},700);}
     
    setTimeout("fin()",4000);
}