//<-- Begin

	var i = 0;	// this is the beginning index and file number (i.e.; "0.jpg")
	var j = 7;  // total number of random images to collect.
	var p = 54; // this is the last index and file number (i.e.; "54.jpg")

    // Set up the image files to be used.
	var chosenImages = new Array();
	    for(var n = 0; n < j; n++)
	    {
	        chosenImages[n] = -1;
	    }

    var theImages = new Array();
	for (i = 0; i <= p; i++)
	{
		theImages[i] = 'img/squarepics/'+i+'.jpg';
	}
	
	var theTitles = new Array();
	theTitles[0] = 'veterinary house calls, house call vet, vet house calls';
	theTitles[1] = 'Our doctors specialize in pet pain relief';
	theTitles[2] = 'Our hospital uses veterinary laser surgery and digital xrays, including digital dental xray';
	theTitles[3] = 'We also see ferrets, birds, hamsters, rats and guinea pigs';
	theTitles[4] = 'We carry cat food and dog food from Royal Canin, and Hills Prescription Diets';
	theTitles[5] = 'Our flea, tick and parasite prevention includes Sentinel, FrontLine and Capstar';
	theTitles[6] = 'We offer laser therapy, acupunture and other alternative veterinary medicine';

	var preBuffer = new Array();
	for (i = 0; i <= p; i++)
	{
		  preBuffer[i] = new Image();
		  preBuffer[i].src = theImages[i];
	}

	for(var n = 0; n < j; n++)
	{
	    getRandomImages(n);
	}

	function getRandomImages(imageIndex)
	{
	    var done = false;
	    var tempNumber;
	    do
	    {
	        done = true;
	        tempNumber = Math.round(Math.random() * (p - 1));
	        for(var n = 0; n < j; n++)
	        {
	            if(n != imageIndex){
	                if(tempNumber == chosenImages[n]){
	                    done = false;
	                }
	            }
	        }
	    }while(!done)  
	    chosenImages[imageIndex] = tempNumber;
	}

	function showImages()
	{
	    for(var n = 0; n < j; n++)
	    {
	        document.write('<img src="' + theImages[chosenImages[n]] + '" title="' + theTitles[n] + '" alt="Picture of a family pet">');
	    }
	}

//  End -->
