				imagetdw = new Image();
				imagetdw.src = "http://thedrivingworld.com/tdw/img/text_tdw.png";
				
				imageelclub = new Image();
				imageelclub.src = "http://thedrivingworld.com/tdw/img/text_elclub.png";
				
				imageeventos = new Image();
				imageeventos.src = "http://thedrivingworld.com/tdw/img/text_eventos.png";
				
				imagegaleria = new Image();
				imagegaleria.src = "http://thedrivingworld.com/tdw/img/text_galeria.png";
				
				imagecontacto = new Image();
				imagecontacto.src = "http://thedrivingworld.com/tdw/img/text_contacto.png";
				
				
				var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
				var loadedobjects=""
				var rootdomain="http://"+window.location.hostname
				var bustcacheparameter=""
			

				function ajaxpage(url, containerid){
					var page_request = false
					if (window.XMLHttpRequest) // if Mozilla, Safari etc
						page_request = new XMLHttpRequest()
					else if (window.ActiveXObject){ // if IE
						try {
							page_request = new ActiveXObject("Msxml2.XMLHTTP")
							} 
						catch (e){
						try{
							page_request = new ActiveXObject("Microsoft.XMLHTTP")
						}
						catch (e){}
						}
					}
					else
						return false
						page_request.onreadystatechange=function(){
						loadpage(page_request, containerid)
					}
					if (bustcachevar) //if bust caching of external page
						bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
						page_request.open('GET', url+bustcacheparameter, true)
						page_request.send(null)			
					}

				function loadpage(page_request, containerid){
					if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1))
						document.getElementById(containerid).innerHTML=page_request.responseText
				}

				function loadobjs(){
					if (!document.getElementById)
						return
					for (i=0; i<arguments.length; i++){
					var file=arguments[i]
					var fileref=""
					if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
						if (file.indexOf(".js")!=-1){ //If object is a js file
							fileref=document.createElement('script')
							fileref.setAttribute("type","text/javascript");
							fileref.setAttribute("src", file);
						}
						else if (file.indexOf(".css")!=-1){ //If object is a css file
							fileref=document.createElement("link")
							fileref.setAttribute("rel", "stylesheet");
							fileref.setAttribute("type", "text/css");
							fileref.setAttribute("href", file);
						}
					}
					if (fileref!=""){
						document.getElementsByTagName("head").item(0).appendChild(fileref)
						loadedobjects+=file+" " //Remember this object as being already added to page
					}
					}
				}
				

				function adjustCoords(event)
				{
				  var selectorPosition=(event.clientY-30)+"px";
				  document.getElementById("selector").style.top=selectorPosition;
					changeImage(event.clientY-30);
				}
	
				function changeImage(posY)
				{
					 		switch (true)
						  {
						    case (posY<21): 
						    	{
						    		document.getElementById("imgselector").src=imagetdw.src;
						    		document.getElementById("selector").style.top="10px";
						    		break;
						    	}
						    case (posY<103): 
						    	{
						    		document.getElementById("imgselector").src=imageelclub.src; 
						    		break;
						    	}
						    case (posY<270): 
						    	{
						    		document.getElementById("imgselector").src=imageeventos.src; 
						    		break;
						    	}
						    case (posY<400): 
						    	{
						    		document.getElementById("imgselector").src=imagegaleria.src; 	
						    		break;
						    	}
						    case (posY<560): 
						    	{
						    		document.getElementById("imgselector").src=imagecontacto.src;  
										break;
						    	}
						    default: 
						    		document.getElementById("imgselector").src=imagetdw.src;
						    		document.getElementById("selector").style.top="10px";
						    		break;
						  }
				}
				
				function resetTitle()
				{
	    		document.getElementById("imgselector").src=imagetdw.src;
					document.getElementById('selector').style.top='10px';
				}
	
				var resizeDelay = 10;
				var resizeIncrement = 5;
				var imgCache = new Object();
	
				function getCacheTag (imgElement) {
					return imgElement.src + "~" + imgElement.offsetLeft + "~" + imgElement.offsetTop;
				}
				
				function cachedImg (imgElement, increment) {
					this.img = imgElement;
					this.cacheTag = getCacheTag(imgElement);
					this.originalSrc = imgElement.src;
					
					var h = imgElement.height;
					var w = imgElement.width;
					this.originalHeight = h;
					this.originalWidth = w;
					
					increment = (!increment) ? resizeIncrement : increment;
					this.heightIncrement = Math.ceil(Math.min(1, (h / w)) * increment);
					this.widthIncrement = Math.ceil(Math.min(1, (w / h)) * increment);
				}
				
				function resizeImg (imgElement, percentChange, newImageURL) {
					var pct = (percentChange) ? percentChange / 100 : 1;
					var cacheTag = imgElement.getAttribute("cacheTag");
					if (!cacheTag) {
						cacheTag = getCacheTag(imgElement);
						imgElement.setAttribute("cacheTag", cacheTag);
					}
					var cacheVal = imgCache[cacheTag];
					if (!cacheVal) {
						imgCache[cacheTag] = new Array(new cachedImg(imgElement), pct);
					} else {
						cacheVal[1] = pct;
					}
					if (newImageURL)
						imgElement.src = newImageURL;
					resizeImgLoop(cacheTag);
					return true;
				}
				
				function resizeImgLoop (cacheTag) {
					var cacheVal = imgCache[cacheTag];
					if (!cacheVal)
						return false;
			
					var cachedImageObj = cacheVal[0];
					var imgElement = cachedImageObj.img;
					var pct = cacheVal[1];
					var plusMinus = (pct > 1) ? 1 : -1;
					var hinc = plusMinus * cachedImageObj.heightIncrement;
					var vinc = plusMinus * cachedImageObj.widthIncrement;
					var startHeight = cachedImageObj.originalHeight;
					var startWidth = cachedImageObj.originalWidth;
					
					var currentHeight = imgElement.height;
					var currentWidth = imgElement.width;
					var endHeight = Math.round(startHeight * pct);
					var endWidth = Math.round(startWidth * pct);
					
					if ( (currentHeight == endHeight) || (currentWidth == endWidth) )
						return true;
					
					var newHeight = currentHeight + hinc;
					var newWidth = currentWidth + vinc;
					if (pct > 1) {
						if ((newHeight >= endHeight) || (newWidth >= endWidth)) {
					
							newWidth = endWidth;
						}
					} else {
						if ((newHeight <= endHeight) || (newWidth <= endWidth)) {
			
							newWidth = endWidth;
						}
					}
					
					imgElement.height = startHeight;
					imgElement.width = newWidth;
					newLeft=540+(483-newWidth);
					document.getElementById("menu_izquierda").style.left=newLeft+"px";
					
					setTimeout("resizeImgLoop('" + cacheTag + "')", resizeDelay);
				}
	
				
				function select_option(event)
				{
					var posY=(event.clientY);
					 		switch (true)
						  {
						    case (posY<21): 
						    	{
						    		break;
						    	}
						    case (posY<103): 
						    	{
						    		document.location.href="http://thedrivingworld.com/tdw/elclub.php";

						    		break;
						    	}
						    case (posY<270): 
						    	{
						    		document.location.href="http://thedrivingworld.com/tdw/eventos.php";

						    		break;
						    	}
						    case (posY<400): 
						    	{
						    		document.location.href="http://thedrivingworld.com/tdw/galeria/galeria.php";
						    		break;
						    	}
						    case (posY<560): 
						    	{
						    		document.location.href="http://thedrivingworld.com/tdw/contacto.php";

										break;
						    	}
						    default: 
						    		break;
						  }
					
				}		
			

      google.load("feeds", "1");
      
      
			function LoadSlideShow() {
					var feed = "http://feed437.photobucket.com/albums/qq99/bazilator/Ruta de los quesos 2008/feed.rss";
					var options = {displayTime:2000, transistionTime:600, scaleImages:true};
					var ss = new GFslideShow(feed, "slideShow", options);
			}
      

      function initialize() {
        var feedControl = new google.feeds.FeedControl();
        feedControl.addFeed("http://www.infocoches.com/rss.php", "");
        feedControl.setLinkTarget(google.feeds.LINK_TARGET_BLANK);
        feedControl.setNumEntries(5);
        feedControl.draw(document.getElementById("feedControl"));
        LoadSlideShow();
      }
      google.setOnLoadCallback(initialize);
