		var delta = 1;
		var timerID;
    var totalWidth = 0;
    var imageCount = 0;
    var divCount = 0;
    var totalHeight = 0;
    var vBanner;
    
		function AddImage(src, width, href, title){
      
      imageCount++;
			var a = document.createElement("a");
			a.href = href;
			a.target = "_blank";
			a.title = title;
			a.margin = "0px";
			a.style.position="absolute";
			a.style.top="-4px";
      var img = document.createElement("img");
			img.setAttribute("src", src);
			var left = "left:" + totalWidth + "px;"
			img.style.left = totalWidth + "px";
			img.style.top = "0px";
			img.style.width = width + "px";
			img.style.position = "absolute";
			img.style.border = "1px solid black";
			img.id = "link" + imageCount;
			a.appendChild(img);
			document.getElementById("ban").appendChild(a);
			
		  totalWidth += width;
		  
		}
		
		function BuildBanner(top, left, width, height, parent){
		/*
        AddImage("images/logos/logo_aidp.png", 116, "http://www.aidp.bc.ca", "Click to visit the AIDP website");
        AddImage("images/logos/logo_dda.png", 234, "http://www.develop.bc.ca/", "Click to visit the DDA website");
        AddImage("images/logos/logo_idp.png", 217, "http://www.idpofbc.ca", "Click to visit the IDP website");
        AddImage("images/logos/logo_scd.png", 250, "http://www.scdp.bc.ca", "Click to visit the SCD website");
        AddImage("images/logos/logo_therapybc.png", 136, "http://www.therapybc.ca", "Click to visit the TherapyBC website");
      */ 
      
       for (j=0; j<parent.childNodes.length; j++){
        var divEl = parent.childNodes[j];
        if (divEl.nodeName == "P"){
       divEl.innerHTML = "Click a link to visit the website.";
       }
       }
       parent.style.height = (height + 100) + "px";
       
       var scrollUp = function(){delta = -1;};
       var scrollDown = function(){delta = 1;}; 
       var scrollUpDiv = document.createElement("div");
       scrollUpDiv.onmouseover = scrollUp;
//       scrollUpDiv.style.position = "absolute";
       scrollUpDiv.style.position = "relative";
      scrollUpDiv.style.left = left + "px";
    //   scrollUpDiv.style.top = top + "px";
       scrollUpDiv.style.width = width + "px";
       scrollUpDiv.style.height = "20px";
       scrollUpDiv.style.backgroundColor = "#00B7C7";
       scrollUpDiv.style.color = "white";
       scrollUpDiv.innerHTML = "Scroll Up";
       scrollUpDiv.style.textAlign = "center";
       parent.appendChild(scrollUpDiv);
       
       vBanner = document.createElement("div");
       parent.appendChild(vBanner);
       vBanner.id = "vBanner";
       vBanner.style.position = "relative";
       vBanner.style.left = left + "px";
    //   vBanner.style.top = top + 20 + "px";
       vBanner.style.width = width + "px";
       vBanner.style.height = height - 20 + "px";
       vBanner.style.overflow = "hidden";
       vBanner.onmouseover = Stop;
       vBanner.onmouseout = Start;

       var scrollDownDiv = document.createElement("div");
       scrollDownDiv.onmouseover = scrollDown;
       scrollDownDiv.style.position = "relative";
       scrollDownDiv.style.left = left + "px";
     //  scrollDownDiv.style.top = top + height + "px";
       scrollDownDiv.style.width = width + "px";
       scrollDownDiv.style.height = "20px";
       scrollDownDiv.style.backgroundColor = "#00B7C7";
       scrollDownDiv.style.color = "white";
       scrollDownDiv.innerHTML = "Scroll Down";
       scrollDownDiv.style.textAlign = "center";
       parent.appendChild(scrollDownDiv);
       
       AddDiv(vBanner, "images/logos/logo_aidp.png", 116, 120, "http://www.aidp.bc.ca", "Click to visit the AIDP website", "AIDP Website");
       AddDiv(vBanner, "images/logos/logo_dda.png", 234, 120, "http://www.develop.bc.ca/", "Click to visit the DDA website", "DDA Website");
       AddDiv(vBanner, "images/logos/logo_idp.png", 216, 119, "http://www.idpofbc.ca", "Click to visit the IDP website", "IDP Website");
       AddDiv(vBanner, "images/logos/logo_scd.png", 250, 120, "http://www.scdp.bc.ca", "Click to visit the SCD website", "SCD Website");
       AddDiv(vBanner, "images/logos/logo_therapybc.png", 136, 120, "http://www.therapybc.ca", "Click to visit the TherapyBC website", "Therapy BC Website");
       Start();
		}
		
		function AddDiv(parent, src, width, height, href, title, text){
		  var parentWidth = parseInt(parent.style.width);
		  var parentHeight = parseInt(parent.style.height);
		  divCount++;
		  var outerDiv = document.createElement("div");
		  outerDiv.id = "imgDiv" + divCount;
		  outerDiv.style.textAlign = "center";
		  outerDiv.style.width = parentWidth - 2 + "px";
		  outerDiv.style.position = "absolute";
		  outerDiv.style.top = totalHeight+"px";
		  outerDiv.style.left = "0px";
		  outerDiv.style.border = "1px solid black";
		  outerDiv.style.height = height + 29 + "px";
		  parent.appendChild(outerDiv);
		  var link = document.createElement("a");
		  link.href = href;
		  link.title = title;
		  link.target = "_blank";
		  outerDiv.appendChild(link);
		  var img = document.createElement("img");
		  img.src = src;
		  img.style.width = width + "px";
		  img.style.height = height + "px";
		  link.appendChild(img);
		  var textDiv = document.createElement("div");
		  textDiv.style.width = parent.style.width;
		  textDiv.style.height = "20px";
		  textDiv.innerHTML = text;
		  link.appendChild(textDiv);
		  
		  totalHeight += parseInt(outerDiv.style.height) + 1;
		}
		
		

		function  ShiftImages(){

			var images = document.getElementsByTagName("img");

			for (x=0; x < images.length; x++){
				var img = images[x];
				if ( img.id.substring(0,4) == "link") {
					var left = parseInt(img.style.left);
					var width = parseInt(img.style.width);
			    left += delta;
					if (delta < 0){ // Moving left
						if (left + width < 0){
							left = left + totalWidth;
						}
					}
					else if (delta > 0){ // Moving right
						if (left > 724){
							left = left - totalWidth;
						}
					}
		      img.style.left = left+"px";
				}
			}
			
			
			// Vertical Banner
			
			if (!vBanner){
			  vBanner = document.getElementById("vBanner");
			}
			
			
			var imgDivs = document.getElementsByTagName("div");
			
			for (i=0; i< imgDivs.length; i++){
			  var el = imgDivs[i];
			  if (el.id.substring(0,6) == "imgDiv") {
				  var currentTop = parseInt(el.style.top);
				  var elementHeight = parseInt(el.style.height);
				  if (delta < 0 && currentTop + elementHeight < 0){
				    el.style.top = currentTop + totalHeight + "px";
				  }
				  else if (delta > 0 && currentTop > parseInt(vBanner.style.height)){
				    el.style.top = currentTop - totalHeight + "px";
				  }
				  else {
				    el.style.top = parseInt(el.style.top) + delta + "px";
				  }
			  }
			}
		}
		
		function Start(){
		  timerID =	setInterval("ShiftImages()", 10);
		}
		
		function Stop(){
			clearInterval(timerID);
		}