function detailsTabClick(){
if($e("vehicle_page")){
$e("vehicle_page").setClassValue("isDetailView");
}
$e("safety_tab_content").setClassValue("inactive_tab_content");
$e("reviews_tab_content").setClassValue("inactive_tab_content");
$e("pricing_tab_content").setClassValue("inactive_tab_content");
$e("details_tab_content").unsetClassValue("inactive_tab_content");
$e("safety_tab").unsetClassValue("selected");
$e("reviews_tab").unsetClassValue("selected");
$e("details_tab").setClassValue("selected");
}
function reviewsTabClick(){
if($e("vehicle_page")){
$e("vehicle_page").unsetClassValue("isDetailView");
}
$e("details_tab_content").setClassValue("inactive_tab_content");
$e("safety_tab_content").setClassValue("inactive_tab_content");
$e("pricing_tab_content").setClassValue("inactive_tab_content");
$e("reviews_tab_content").unsetClassValue("inactive_tab_content");
$e("safety_tab").unsetClassValue("selected");
$e("details_tab").unsetClassValue("selected");
$e("reviews_tab").setClassValue("selected");
}
function safetyTabClick(){
if($e("vehicle_page")){
$e("vehicle_page").unsetClassValue("isDetailView");
}
$e("details_tab_content").setClassValue("inactive_tab_content");
$e("reviews_tab_content").setClassValue("inactive_tab_content");
$e("pricing_tab_content").setClassValue("inactive_tab_content");
$e("safety_tab_content").unsetClassValue("inactive_tab_content");
$e("details_tab").unsetClassValue("selected");
$e("reviews_tab").unsetClassValue("selected");
$e("safety_tab").setClassValue("selected");
}
function pricingTabClick(){
if($e("vehicle_page")){
$e("vehicle_page").unsetClassValue("isDetailView");
}
$e("details_tab_content").setClassValue("inactive_tab_content");
$e("reviews_tab_content").setClassValue("inactive_tab_content");
$e("safety_tab_content").setClassValue("inactive_tab_content");
$e("pricing_tab_content").unsetClassValue("inactive_tab_content");
$e("safety_tab").unsetClassValue("selected");
$e("reviews_tab").unsetClassValue("selected");
$e("details_tab").unsetClassValue("selected");
}
function signOut(){
UsedCarSearchManager.signOut(signOutResponse);
}
function signIn(){
var _1="/used_cars/subscribe?";
var _2="TB_iframe=true&height=251&width=421&modal=true";
tb_show("",_1+_2,"");
}
function addToFaves(_3){
$e("addToFavorites").setTextData("Saving ...");
UsedCarSearchManager.addToFavorites(_3,addToFavoritesResponse);
}
function addToFavoritesResponse(){
$e("addToFavorites").setTextData("Saved - View All");
$e("addToFavorites").onclick=null;
$e("addToFavorites").removeAttribute("onclick");
}
function focusLeadForm(){
theForm=$e("contactSellerForm");
if(theForm){
if(theForm.firstname&&theForm.firstname.focus){
theForm.firstname.focus();
}else{
if(theForm.questions&&theForm.questions.focus){
theForm.questions.focus();
}
}
}
}
function handleMouseUp(_4){
e=getEvent(_4);
ee=getEventElement(e);
if(previewImg=findElement(ee,"previewImage","img")){
showImageInViewer(previewImg.getAttribute("longdesc"),document);
}
}
function init(){
focusLeadForm();
}
function isIE(){
if(navigator.appName=="Microsoft Internet Explorer"){
return true;
}else{
return false;
}
}
function iframeCall(){
Iframe=eval("document.getElementById(\"iframePrompt\")");
return Iframe;
}
function showIframePrompt2(_5,_6,_7,_8,_9,_a,_b){
var _c=window.pageYOffset?window.pageYOffset:document[(document.compatMode=="CSS1Compat")?"documentElement":"body"].scrollTop;
iframeCall().style.visibility="visible";
iframeCall().src=_5+"?descUrl="+_6+"&whyXId="+_7+"&sellerId="+_8+"&source="+_9;
iframeCall().style.left=((380-(_a/2))+"px");
iframeCall().style.top=((_c+20)+"px");
if(!isIE()){
_a=(_a/1)-5;
_b=(_b/1)-5;
}
iframeCall().style.width=(_a+"px");
iframeCall().style.height=(_b+"px");
}
function closeIframePrompt(){
iframeCall().style.visibility="hidden";
}
var IFrameObj;
function showIframePrompt(_d,_e,_f,_10,_11,_12,_13){
if(!iframeCall()){
return true;
}
IFrameObj=iframeCall();
IFrameObj.style.border="2px ridge";
if(!isIE()){
IFrameObj.style.border="ridge gray 4px";
}
if(IFrameObj.contentDocument){
}else{
if(IFrameObj.contentWindow){
}else{
if(IFrameObj.document){
}else{
return true;
}
}
}
showIframePrompt2(_d,_e,_f,_10,_11,_12,_13);
}
function showIframePromptIEorFF(_14,_15,_16,_17,_18,_19,_1a){
if(isIE()){
showIframePrompt(_14,_15,_16,_17,_18,_19,_1a+10);
}else{
showIframePrompt(_14,_15,_16,_17,_18,_19,_1a);
}
}
function closeWindowOrIframe(){
if(parent.iframeCall()&&parent.closeIframePrompt()){
parent.closeIframePrompt();
}else{
window.close();
}
}
function makeWindow(url,h,w){
var _1e="height="+h+",width="+w;
var _1f=_1e+",toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=100,top=5";
HaveWin=window.open(url,"win",_1f);
HaveWin.focus();
}
