function get_makes(B){var A;selectedIndex=0;if(document.qSearch&&document.qSearch.make){A=document.qSearch.make;}else{if(document.search&&document.search.make){A=document.search.make;}else{if(document.forms[0]&&document.forms[0].make){A=document.forms[0].make;}}}if(A){A.length=0;for(index=0;index<make_d.length;index++){A[index]=new Option(make_d[index],make_v[index]);if(make_d[index]=="Make"||make_d[index]=="MAKE"){A[index]=new Option(make_d[index],"");}if(make_d[index]=="ANY"){A[index]=new Option("Any Make","");}if(make_v[index].toUpperCase()==B){selectedIndex=index;}}A.options[selectedIndex].selected=true;}select_make(B);}function get_range(A,B){selectedIndex=0;var C;if(document.qSearch&&document.qSearch.model){C=document.qSearch.model;}else{if(document.search&&document.search.model){C=document.search.model;}else{if(document.forms[0]&&document.forms[0].model){C=document.forms[0].model;}}}if(C){C.length=0;for(index=0;index<A.length;index++){C[index]=new Option(A[index],A[index]);if(A[index]=="Model"||A[index]=="MODEL"){C[index]=new Option(A[index],"");}if(A[index]=="ANY"){C[index]=new Option("Any Model","");}if(A[index].toUpperCase()==B){selectedIndex=index;}else{if(A[index].toUpperCase()=="ANY MODEL"&&B=="ANY"){selectedIndex=index;}}}if(C.type=="select-one"&&C.options[selectedIndex]){C.options[selectedIndex].selected=true;}}}function select_make(B){var A;if(B==null){B="";}if(document.qSearch&&document.qSearch.make){A=document.qSearch.make;}else{if(document.search&&document.search.make){A=document.search.make;}else{if(document.forms[0]&&document.forms[0].make){A=document.forms[0].make;}}}if(A){for(x=0;x<A.length;x++){mk=A.options[x].value;if(mk.toUpperCase()==B){if(A.options[x].selected==false){A.options[x].selected=true;}}}}}function viewWhatsWorth(){var A=parseInt(self.screenLeft)+310;var B=parseInt(self.screenTop)+110;var C=window.open("http://search.autotrader.co.za/site/za/jsp/WhatsWorth.jsp","whats_worth","width=300,height=320,status=0,toolbar=0,menubar=0,location=0,resizeable=0,scrollbars=0,left="+A+",top="+B);C.focus();}