		   // js for auto of day more info
		    function getDetailsAOD(vin){
		   		document.autoofday.vin.value = vin;
		   		document.autoofday.action = "details.do";
		   		//document.autoofday.userAction.value = "SHOW_DETAILS";
		   		document.autoofday.userAction.value = "WIDGET_VIEW";
		   		//document.autoofday.pageNumber.value = "3";
		   		document.autoofday.submit();	
		   }

		   // js for premiumn placement more info
		    function getDetailsAOD(vin) {
                document.premiumplacement.vin.value = vin;
                document.premiumplacement.action = "details.do";
                //document.premiumplacement.userAction.value = "SHOW_DETAILS";
                document.premiumplacement.userAction.value = "WIDGET_VIEW";
                //document.premiumplacement.pageNumber.value = "3";
                document.premiumplacement.submit();
		   }
		   
		   function expand(s)
			{
			  var td = s.parentNode;
			  var d = td.getElementsByTagName("div").item(0);
		
			  td.className = "menuHover";
			  d.className = "menuHover";
			}

			function collapse(s)
			{
			  var td = s.parentNode;
			  var d = td.getElementsByTagName("div").item(0);
		
			  td.className = "menuNormal";
			  d.className = "menuNormal";
			}
		
		current = 0;
		delay = 3000;  
		   
		function correctPNG() 
		   {
		 	var navName = navigator.appName;
			
		   for(var i=0; i<document.images.length; i++)
		      {
			  var img = document.images[i];
			  var imgName = img.src.toUpperCase();
			  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
			     {
				 var imgID = (img.id) ? "id='" + img.id + "' " : ""
				 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
				 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
				 var imgStyle = "display:inline-block;" + img.style.cssText 
				// if (img.align == "left") imgStyle = "float:left;" + imgStyle
				 //if (img.align == "right") imgStyle = "float:right;" + imgStyle
				 var strNewHTML = "<span " + imgID + imgClass + imgTitle
				 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
			     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
				 mg.outerHTML = strNewHTML;
					if(navName == 'Microsoft Internet Explorer'){
					 i = i-1;
					 }
			   } 
		      }
		   }
   

			function slideShow(largeImages) {
			
				var imgarray = largeImages.split("~");
			
				current = (current == imgarray.length) ? 0 : current+1 ;
				
				//alert(imgarray[current-1]);
				if(imgarray[current-1] == undefined){
					document.getElementById('img_main').src = imgarray[0];
				}
				else{
						document.getElementById('img_main').src = imgarray[current-1];
				}
				
				var img = document.getElementById('img_main');
				var imgID = (img.id) ? "id='" + img.id + "' " : ""
				
				var imgClass = (img.className) ? "class='" + img.className + "' " : ""
				var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
				var imgStyle = "display:inline-block;" + img.style.cssText 
				if (img.align == "left") imgStyle = "float:left;" + imgStyle
				if (img.align == "right") imgStyle = "float:right;" + imgStyle
				if(document.getElementById('img_main').src == undefined){
					document.getElementById('img_main').src = imgarray[0];
				}
				var strNewHTML = "<span " + imgID + imgClass + imgTitle
				+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				+ "(src=\'" + document.getElementById('img_main').src + "\', sizingMethod='scale');\"></span>" 
				img.outerHTML = strNewHTML;
				window.setTimeout("slideShow()", delay);
			}
   
			function CorrectCurrentPNG(argId,argNewSrc){
				 var img = document.getElementById(argId);
				 img.src=argNewSrc;
				 var imgID = (img.id) ? "id='" + img.id + "' " : ""
				 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
				 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
				 var imgStyle = "display:inline-block;" + img.style.cssText 
				 if (img.align == "left") imgStyle = "float:left;" + imgStyle
				 if (img.align == "right") imgStyle = "float:right;" + imgStyle
				 var strNewHTML = "<span " + imgID + imgClass + imgTitle
				 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
				 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
				 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
				 img.outerHTML = strNewHTML
			}

			function chgwid(largeImgPath){
				CorrectCurrentPNG("img_main",largeImgPath);
			}

			function chg_out(largeImgPath){
			CorrectCurrentPNG("img_main",largeImgPath);
			}

            function openDisclaimer(path, pageName, pageNumber, siteMode) {

			    if(document.getElementById(path)) {
				   path = document.getElementById(path).value;
				} else {
				   return false;
				}

				if (pageName == "Privacy") {
				   pageName = "Privacy";
				   pageNumber = "229";
				} else {
				   pageName = "Disclaimer";
				   pageNumber = "228";
				}

				if(document.getElementById(siteMode)) {
				   siteMode = document.getElementById(siteMode).value;
				} else {
				   siteMode = "0X";
				}
				path = path + pageName + "-" + pageNumber + "-" + siteMode;
				window.open(path,'Disclaimer',"scrollbars=yes,width=520,height=435,left=100,top=100");
            }
			
			function openInPopup(url, name) {
				name = name.replace(' ','');
				window.open(url,name,"scrollbars=yes,width=520,height=435,left=100,top=100");
			}