function ShowHide(id) {if (document.getElementById){obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = "block"; } else { obj.style.display = "none"; } }}
function ShowPop(id){document.getElementById(id).style.display = "block";}
function HidePop(id){document.getElementById(id).style.display = "none";}
function RewriteObjects()//activates controls
{objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++)
{var closedTagIndex = objects[i].outerHTML.toLowerCase().indexOf('>');
var contents = objects[i].outerHTML.substring(0, closedTagIndex + 1);
for (var j = 0; j < objects[i].childNodes.length; j++){contents += objects[i].childNodes[j].outerHTML;}contents += '</object>';objects[i].outerHTML = contents;}}
function yellowfade(id, fTime) {var b = 125;function f() {var t = document.getElementById(id);if(t){t.style.background = 'rgb(255,255,'+ (b+=5) +')'; if (b < 255) { setTimeout(f, fTime); } } } f(); }
function GetSelectedItemSort() {len = document.formSort.furl.length;i = 0;chosen = "none";
for (i = 0; i < len; i++) {if (document.formSort.furl[i].selected) {chosen = document.formSort.furl[i].value;}}window.location = 'http://www.etrailer.com/dept.aspx?furl=' + chosen;return ""} 
function GetSelectedItemCount(){len = document.formSort.range.length;i = 0;chosen = "none";
for (i = 0; i < len; i++) {if (document.formSort.range[i].selected) {chosen = document.formSort.range[i].value;}}window.location = 'http://www.etrailer.com/dept.aspx?furl=' + chosen;return ""} 
function GetSelectedItem() {len = document.formAtt.part.length;i = 0;chosen = "none";
for (i = 0; i < len; i++) {if (document.formAtt.part[i].selected){chosen = document.formAtt.part[i].value;}}
if (chosen != ""){window.location = 'http://www.hidden-hitch.com/p-' + chosen + '.html';}return ""} 
function NewShowSubCat(var1, tab, activetab){document.getElementById(tab).className = 'activetab';document.getElementById(activetab).className = 'activetab';document.getElementById(var1).className = 'dropdown';}
function NewRemoveSubCat(var1,tab,curtab){document.getElementById(tab).className = 'notactive';document.getElementById(curtab).className = 'activetab';document.getElementById(var1).className = 'dispnone';}
function PopUpFast(){window.open('http://www.hidden-hitch.com/special.aspx','name','height=300,width=450,top=10,left=10');return false;}
function GetYear() {len = document.formFitguide.hhyear.length;i = 0;chosen = "none";fguide = document.formFitguide.hhcat.value;
for (i = 0; i < len; i++) {if (document.formFitguide.hhyear[i].selected) {chosen = document.formFitguide.hhyear[i].value}}window.location = 'http://www.hidden-hitch.com/' + fguide + '-' + chosen + '.html';return ""} 
function GetWidth(){len = document.formTire.tirewidth.length;i = 0;chosen = "none";fguide = document.formTire.hhcat.value;
for (i = 0; i < len; i++) {if (document.formTire.tirewidth[i].selected) {chosen = document.formTire.tirewidth[i].value}}window.location = 'http://www.etrailer.com/tire-by-size.aspx?tirewidth=' + chosen;return ""} 
function GetSelectedItemRoofRack() {len = document.formSort.ProdStyle.length;i = 0;chosen = "none"; 
for (i = 0; i < len; i++) {if (document.formSort.ProdStyle[i].selected) {chosen = document.formSort.ProdStyle[i].value}}window.location = 'http://www.etrailer.com/results.aspx?' + window.location.search.substring(1).replace(/&ProdStyle=.*/, "") + "&ProdStyle=" + chosen;return ""} 
function GetProdStyle() {len = document.formSort.FilterValue.length;i = 0;chosen = "none";
for (i = 0; i < len; i++) {if (document.formSort.FilterValue[i].selected) {chosen = document.formSort.FilterValue[i].value}}window.location = 'http://www.etrailer.com/results.aspx?' + window.location.search.substring(1).replace(/&FilterValue=.*/, "") + "&FilterValue=" + chosen + "&filter=prodstyle";return ""} 
function GetProdManuf() {len = document.formSort.FilterValue2.length;i = 0;chosen = "none";
for (i = 0; i < len; i++) {if (document.formSort.FilterValue2[i].selected) {chosen = document.formSort.FilterValue2[i].value}}window.location = 'http://www.hidden-hitch.com/results.aspx?' + window.location.search.substring(1).replace(/&FilterValue=.*/, "") + "&FilterValue=" + chosen + "&filter=Manuf"; return ""} 
function GetYearThule(){len = document.formYears.year.length;i = 0;chosen = "none";
for (i = 0; i < len; i++) {if (document.formYears.year[i].selected) {chosen = document.formYears.year[i].value}}window.location = 'http://www.etrailer.com/roof-' + chosen + '-year.htm'; return ""}
function ShowHide(id){if (document.getElementById){obj = document.getElementById(id); if (obj.style.display == "none"){ obj.style.display = "block"; } else { obj.style.display = "none"; } }}