// JavaScript Document
function ajaxRequest()
{  var xmlHttp;
    try
    {
        xmlHttp = new XMLHttpRequest();
    }
    catch(e)
    {
        var XmlHttpVersions = new Array('MSXML2.XMLHTTP.6.0',
                                        'MSXML2.XMLHTTP.5.0',
                                        'MSXML2.XMLHTTP.4.0',
                                        'MSXML2.XMLHTTP.3.0',
                                        'MSXML2.XMLHTTP',
                                        'Microsoft.XMLHTTP');
        for (i = 0; i < XmlHttpVersions.length && !xmlHttp; i++)
        {
            try
            {
                xmlHttp = new ActiveXObject(XmlHttpVersions[i]);
            }
            catch(e) {}
        }
    }
    if (!xmlHttp)
    {
        alert("Your browser may not support XML Requests");
    }
    else
    {
        return xmlHttp;
    }
}// Get the random image


function runRandomImage2()
{
//loadImages();
//runRandomImage();
//runRandomImage1();
runRandomImage4();
runRandomImage5();
}
<!-- Original:  Gilbert Davis -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! [url]http://javascript.internet.com[/url] -->
<!-- Begin
function loadImages() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) {  // Netscape 4
document.hidepage.visibility = 'hidden';
}
else {  // IE 4
document.all.hidepage.style.visibility = 'hidden';
      }   }}
//  End -->
<!-- Begin
function loadImagesf() {
if (document.getElementById) {  // DOM3 = IE5, NS6
document.getElementById('hidepage').style.visibility = 'hidden';
}
else {
if (document.layers) {  // Netscape 4
document.hidepage.visibility = 'hidden';
}
else {  // IE 4
document.all.hidepage.style.visibility = 'hidden';
      }   }}
//  End -->
function ajaxa(x){
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}		}	}
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
				  		}	}
		var queryString = "?id=" + x ;
//alert(queryString);
	ajaxRequest.open("GET", "a.php"+queryString, true);
	ajaxRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	ajaxRequest.send(null); 
}
//============================================================


function ajaxa1(x){
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
  		}	}
		var queryString = "?id=" + x ;
	ajaxRequest.open("GET", "a1.php"+queryString, true);
	ajaxRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	ajaxRequest.send(null); 
}


//======================
function runRandomImage4()
{
var s=document.getElementById("rb").value;
getRandomImage4(); // Runs image function once
setTimeout("runRandomImage4()",s);
}

function getRandomImage4()
{var imageDisplayDiv4 = "wrapper4";

    // The name of the file the images will come from
    var imageFile4 = "rbanner1.php";
    var ajax4 = ajaxRequest();
    ajax4.open("GET", imageFile4, true);
    ajax4.send(null);    
    //document.getElementById(imageDisplayDiv1).innerHTML = "<span style=\"font-weight:bold;\">Loading...</span>";    
    ajax4.onreadystatechange = function()
    {
        if (ajax4.readyState == 4)
        {
            if (ajax4.status == 200)
            {
            document.getElementById(imageDisplayDiv4).innerHTML = ajax4.responseText;
            }        }    }}
//======================
function runRandomImage5()
{
var s=document.getElementById("rb").value;
getRandomImage5(); // Runs image function once
setTimeout("runRandomImage5()",s);
}

function getRandomImage5()
{var imageDisplayDiv5 = "wrapper5";
    // The name of the file the images will come from
    var imageFile5 = "rbanner2.php";
    var ajax5 = ajaxRequest();
    ajax5.open("GET", imageFile5, true);
    ajax5.send(null);    
    //document.getElementById(imageDisplayDiv1).innerHTML = "<span style=\"font-weight:bold;\">Loading...</span>";    
    ajax5.onreadystatechange = function()
    {
        if (ajax5.readyState == 4)
        {
            if (ajax5.status == 200)
            {
            document.getElementById(imageDisplayDiv5).innerHTML = ajax5.responseText;
            }        }    }}            

//======================            

