
		
        //User defined variables - change these variables to alter the behaviour of the script
        var ImageFolder = ""; //Folder name containing the images
        var ImageFileNames = new Array('images/cf_buy.jpg', 'images/cf_sell.jpg'); //List of images to use
        var ImageURLs = new Array('vehicle/find_vehicle.asp', 'adv/advertise.asp'); //List of hyperlinks associated with the list of images
        var DefaultURL = 'vehicle/find_vehicle.asp'; //Default hyperlink for the Banner Ad
        var DisplayInterval = 5; //Number of seconds to wait before the next image is displayed
        var TargetFrame = ""; //Name of the frame to open the hyperlink into

        //Internal variables (do not change these unless you know what you are doing)
        var IsValidBrowser = false;
        var BannerAdCode = 0;
        var BannerAdImages = new Array(NumberOfImages);
        var DisplayInterval = DisplayInterval * 1000;
        var NumberOfImages = ImageFileNames.length;

        //A dd a trailing forward slash to the ImageFolder variable if it does not already have one
        if (ImageFolder.substr(ImageFolder.length - 1, ImageFolder.length) != "/" && ImageFolder != "") {
            ImageFolder += "/";
        }

        if (TargetFrame == '') {
            var FramesObject = null;
        } else {
            var FramesObject = eval('parent.' + TargetFrame);
        }

		InitialiseBannerAdRotator();
        //Function runs when this page has been loaded and does the following:
        //1. Determine the browser name and version
        // (since the script will only work on Netscape 3+ and Internet Explorer 4+).
        //2. Start the timer object that will periodically change the image displayed
        // by the Banner Ad.
        //3. Preload the images used by the Banner Ad rotator script
        function InitialiseBannerAdRotator() {
           
            //Determine the browser name and version
            //The script will only work on Netscape 3+ and Internet Explorer 4+
            var BrowserType = navigator.appName;
            var BrowserVersion = parseInt(navigator.appVersion);
 
            if (BrowserType == "Netscape" && (BrowserVersion >= 3)) {
                IsValidBrowser = true;
            }

            if (BrowserType == "Microsoft Internet Explorer" && (BrowserVersion >= 4)) {
                IsValidBrowser = true;
            }
			
            if (IsValidBrowser) {
                TimerObject = setTimeout("ChangeImage()", DisplayInterval);
                BannerAdCode = 0;

                for (i = 0; i < NumberOfImages; i++) {
                    BannerAdImages[i] = new Image();
                    BannerAdImages[i].src = ' ' + ImageFolder + ImageFileNames[i];
                   // alert(BannerAdImages[i].src);
                }

            }
			else
			{
				alert('Invalid Browser');
				}

        }

        //Function to change the src of the Banner Ad image
        function ChangeImage() {

            if (IsValidBrowser) {
                BannerAdCode = BannerAdCode + 1;

                if (BannerAdCode == NumberOfImages) {
                    BannerAdCode = 0;
                }

                window.document.bannerad.src = BannerAdImages[BannerAdCode].src;
                TimerObject = setTimeout("ChangeImage()", DisplayInterval);
            }
        }

        //Function to redirect the browser window/frame to a new location,
        //depending on which image is currently being displayed by the Banner Ad.
        //If Banner Ad is being displayed on an old browser then the DefaultURL is displayed
        function ChangePage() {

            if (IsValidBrowser) {

                if (TargetFrame != '' && (FramesObject)) {
                    FramesObject.location.href = ImageURLs[BannerAdCode];
                } else {
                    document.location = ImageURLs[BannerAdCode];
                }

            } else if (!IsValidBrowser) {
                document.location = DefaultURL;
            }

        }

  function mOvr(src, clrOver) {
            if (!src.contains(event.fromElement)) {
                src.style.cursor = 'hand';
                src.bgColor = clrOver;
            }
        }
        function mOut(src, clrIn) {
            if (!src.contains(event.toElement)) {
                src.style.cursor = 'default';
                src.bgColor = clrIn;
            }
        }
        function mClk(src) {
            if (event.srcElement.tagName == 'TD')
                src.children.tags('A')[0].click();
        }
 function ShowPopUp(whatURL) {
            open(whatURL, "News", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=510,height=400");
        }

 var whichaffiliate
        var x, y

        function tover() {
            document.all.tipstable.border = "1"
            document.all.optable.bordercolor = "#000000"

        }


        function tout() {
            document.all.tipstable.border = "0"
        }

        function otover() {
            document.all.optable.border = "1"
            document.all.optable.bordercolor = "#000000"
        }


        function otout() {
            document.all.optable.border = "0"
        }


        function showaffiliatewindow(thisaffiliate) {
            if (document.all) {
                whichaffiliate = eval("document.all." + thisaffiliate + ".style")
                whichaffiliate.visibility = "visible"
                followmouse()
            }
        }

        function followmouse() {
            if (document.all) {
                whichaffiliate.posLeft = x + 100
                whichaffiliate.posTop = y
                var timer = setTimeout("followmouse()", 200)
            }
        }

        function hideaffiliatewindow() {
            if (document.all) {
                whichaffiliate.visibility = "hidden"
            }
        }

        function handlerMM(e) {
            x = document.body.scrollLeft + event.clientX
            y = document.body.scrollTop + event.clientY
        }

        if (document.all) {
            document.onmousemove = handlerMM;
        }

        function showCategory(category) {
            document.submitter.keyword.value = category
            document.submitter.submit()
        }
		
		
		
