var baseThumb=1;var curSrc='';function imageScroll(idir){var i;var s;var idx;var oidx;var v;var ov;var imgc;var scol;var mrgn="";var imageCt=9;var thumbCt=6;var frm=window.document.form1;var oldBase=baseThumb;baseThumb+=idir;var maxBase=4;if(baseThumb<1)baseThumb=1;else if(baseThumb>=maxBase)baseThumb=maxBase;if((idir==0)&&(arguments))if(arguments.length>1)curSrc=arguments[1].src;if(curSrc=='')curSrc=document.images['vpThumb1'].src;for(var i=1;i<=imageCt;i++){idx=i+baseThumb-1;oidx=i+oldBase-1;v='-'+idx+'t.';ov='-'+oidx+'t.';imgc=document.images['vpThumb'+i];if(imgc){s=imgc.src;s=s.replace(ov,v);if(imgc.src!=s)imgc.src=s;if(s==curSrc){scol="2px solid red";mrgn="0";}else{scol="1px solid black";mrgn="1";}
if(imgc.style.border!=scol)imgc.style.border=scol;if(imgc.style.marginTop!=mrgn)imgc.style.marginTop=mrgn;if(imgc.style.marginBottom!=mrgn)imgc.style.marginBottom=mrgn;}}
var ctsp=document.getElementById("imgthru");if(ctsp)ctsp.innerHTML='<B>'+baseThumb+' thru '+(baseThumb+thumbCt-1)+'</B>';}
function SubmitMe(){var vMsg='';var val='';var BadWordMatch=false;for(x=0;x<document.form1.AdReason.length;x++){if(document.form1.AdReason[x].checked==true){val=document.form1.AdReason[x].value;}}
fld=(((val==2)||(val==3)||(val==5)||(val==6))?document.getElementById("AdReason"+val):null);Comments2=((fld)?fld.value:'');if(val=='')vMsg+='\n * You must choose a reason.';if(CheckBadWords(Comments2))vMsg+='\n * You cannot use profanity.';if(vMsg.length==0){frm.action='/garage/deleteAd.asp';return;}else{alert('Some field entries need to be changed.  Please correct and try again.'+vMsg);return false;}}
function toggle(a){var flds=new Array("tog2","tog3","tog5","tog6");for(x=0;x<flds.length;x++){fld=document.getElementById(flds[x]);if(fld)fld.style.display="none";}
if((a=="2")||(a=="3")||(a=="5")||(a=="6"))document.getElementById("tog"+a).style.display="block";}
function videoWindow(theURL,winName,features){window.open(theURL,winName,features);return false;}
function domScrollerObj(prop){var dir;var speed;var objToScroll;var scrollTimer;if(!(dir=prop.direction))dir=0;if(!(speed=Math.abs(prop.speed)))speed=100;objToScroll=prop.domObject;this.UP=1;this.DOWN=3;this.LEFT=4;this.RIGHT=12;this.startScroll=function(direction){if(direction)dir=direction;if(objToScroll)
scrollTimer=setInterval(this.doScroll,speed);}
this.doScroll=function(){if((dir& 3)==3){objToScroll.scrollTop+=10;}
else if((dir& 1)==1){objToScroll.scrollTop-=10;}
if((dir& 12)==12){objToScroll.scrollLeft+=10;}
else if((dir& 4)==4){objToScroll.scrollLeft-=10;}}
this.stopScroll=function(){clearInterval(scrollTimer);}}
var imgScroller;function setupScroller(){imgScroller=new domScrollerObj({"speed":100,"domObject":document.getElementById("DivFixed")});if(window.ActiveXObject){var scrlBtn=document.getElementById("vpRight");if(!scrlBtn)return;scrlBtn.attachEvent("onmouseover",function(){imgScroller.startScroll(imgScroller.RIGHT)});scrlBtn.attachEvent("onmouseout",imgScroller.stopScroll);scrlBtn=document.getElementById("vpLeft");scrlBtn.attachEvent("onmouseover",function(){imgScroller.startScroll(imgScroller.LEFT)});scrlBtn.attachEvent("onmouseout",imgScroller.stopScroll);}
else{var scrlBtn=document.getElementById("vpRight");if(!scrlBtn)return;scrlBtn.addEventListener("mouseover",function(){imgScroller.startScroll(imgScroller.RIGHT)},false);scrlBtn.addEventListener("mouseout",imgScroller.stopScroll,false);scrlBtn=document.getElementById("vpLeft");scrlBtn.addEventListener("mouseover",function(){imgScroller.startScroll(imgScroller.LEFT)},false);scrlBtn.addEventListener("mouseout",imgScroller.stopScroll,false);}}
if(window.ActiveXObject)
window.attachEvent("onload",setupScroller);else
window.addEventListener("load",setupScroller,false);
