var userEspDir="espanol";var userEngCID="toyotaofhollywood";var userEspCID="toyotaofhollywood_spanish";var espDir="/"+userEspDir;var engCID="confid_"+userEngCID;var engID="ID_"+userEngCID;var espCID="confid_"+userEspCID;var espID="ID_"+userEspCID;var engRB="Bodystyles-Cars";var engRM="Trims-Cars";var engRT="Vehicle-Cars";var espRB="Bodystyles-Cars-Espanol";var espRM="Trims-Cars-Espanol";var espRT="Vehicle-Cars-Espanol";function goSpanish(){if(document.location.href.match(engCID)){var myRegExp=new RegExp(engCID,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,espCID)}else if(document.location.href.match(engID)){var myRegExp=new RegExp(engID,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,espID)}else if(document.location.href.match(engRB)) {var myRegExp=new RegExp(engRB,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,espRB)}else if(document.location.href.match(engRM)) {var myRegExp=new RegExp(engRM,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,espRM)}else if(document.location.href.match(engRT)) {var myRegExp=new RegExp(engRT,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,espRT)}else{document.location.href=document.location.href.replace(/^([a-z]+:\/\/[^\/]+)(.*)/i,"$1"+espDir+"$2")}}function goEnglish(){if(document.location.href.match(espCID)){var myRegExp=new RegExp(espCID,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,engCID)}else if(document.location.href.match(espID)){var myRegExp=new RegExp(espID,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,engID)}else if(document.location.href.match(espRB)) {var myRegExp=new RegExp(espRB,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,engRB)}else if(document.location.href.match(espRM)) {var myRegExp=new RegExp(espRM,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,engRM)}else if(document.location.href.match(espRT)) {var myRegExp=new RegExp(espRT,"i");var str=document.location.href;document.location.href=str.replace(myRegExp,engRT)}else{var myRegExp=new RegExp(espDir,"i");document.location.href=document.location.href.replace(myRegExp,"")}}

