var addthis_pub = "GoAutoMedia"; var addthis_brand = "GoAuto.com.au"; var addthis_header_color = "#ffffff"; var addthis_header_background = "#006699"; var addthis_offset_top = 0; var addthis_offset_left = -220; var addthis_hover_delay = 300; function setCookie(name, value, expires) { document.cookie = name + '=' + escape(value) + '; path=/' + ((expires==null) ? '' : '; expires=' + expires.toGMTString( )); } function newWindow(where, width, height){ var width = (width!="") ? 'width='+width : 'width=820'; var height = (height!="" ) ? 'height='+height : 'height=600' ; var options = '820' +','+ '600'+ ',resizable=yes,toolbar,scrollbars,location,menubar,status,directories'; var db = 'http://www.goauto.com.au'; var url = '/'+ where; popupWin=window.open(url,'newWindow',options); popupWin.moveTo(10,10); popupWin.focus(); } function goGoGadgetSubmit() { if (searchBlank()) popup(); } function searchBlank() { var doc = document.forms["search"]; if (doc.textfield.value == '' ) { alert ("Please enter some text to search for"); doc.textfield.focus(); return false } return true } function searchFocus() { if (this.value=='Search') { this.value=''; } } function category(control) { cat=control.options[control.selectedIndex].text; window.location.href='newmodels_' + escape(cat) + '?OpenDocument&category=' + escape(cat) } // Search code function popup() { form = document.forms.search; URL = '/' + document.forms[0].db.value + '/storysearch?SearchView&Query=' + escape(form.textfield.value); //REMOVED THIS CODE FROM THE NEXT STATEMENT // +AND+NOT+FIELD+type=RT+AND+NOT+FIELD+type=tips+AND+NOT+FIELD+type=events+AND+NOT+FIELD+type=glossary if(form.type.value=='news' | form.type.value=='future' | form.type.value=='RT' | form.type.value=='home') { URL += ''; } else if (form.type.value!='home') { URL += ''; } URL += "&Start=1&Count=30&SearchMax=60&SearchOrder=4"; //alert(URL); window.location.href=URL; } function popupSearch() { form = document.forms.form1; var incand = false; URL = '/' + document.forms[0].db.value + '/storysearch?SearchView&Query=' if (form.textfield.value != '') { URL += escape(form.textfield.value); incand = true; } if (form.SearchMake.selectedIndex>0) { if (incand) URL += '+AND+'; URL += 'FIELD+make=' + escape(form.SearchMake.options[form.SearchMake.selectedIndex].text); incand = true; } if (form.SearchModel.selectedIndex>0) { if (incand) URL += '+AND+'; URL += 'FIELD+model=' + escape(form.SearchModel.options[form.SearchModel.selectedIndex].text); } if (form.type.value=='RT') { URL += '+AND+FIELD+type=RT' } else if(form.type.value=='news' | form.type.value=='home') { URL += '+AND+NOT+FIELD+type=RT+AND+NOT+FIELD+type=tips+AND+NOT+FIELD+type=events+AND+NOT+FIELD+type=glossary'; } else if (form.type.value!='home') { URL += '+AND+FIELD+type=' + escape(form.type.value); } URL += "&Start=1&Count=15&SearchMax=0&SearchOrder=4"; //alert(URL); window.location.href=URL; } function genericPopup(uri) { var popupWin; URL = 'http://'+uri; wheight = "480"; wwidth = "640"; opts = 'width=' + wwidth + ',height=' + wheight + ',resizable,scrollbars=auto,left=20, top=20'; popupWin=window.open( '','Window', opts); //alert(popupWin.name); //var x = popupWin.focus(); popupWin.document.write("
"); popupWin.focus(); } function continueTheSearch() { form = document.forms.search; options = ''; //alert("forms.type.value="+forms.type.value); URL = 'storysearch?SearchView&Query=' + escape(form.textfield.value); if (form.type.value=='RT') { URL += '+AND+FIELD+type=RT' } else if(form.type.value=='news' | form.type.value=='home') { URL += '+AND+NOT+FIELD+type=RT+AND+NOT+FIELD+type=tips+AND+NOT+FIELD+type=events+AND+NOT+FIELD+type=glossary'; } /* // else if (form.type.value!='home' && form.type.value=='' ) { // URL += '+AND+FIELD+type=' + escape(form.type.value); //} */ else if (form.type.value=='' || form.type.value==null ) { URL = 'storysearch?SearchView&Query=' + escape(form.textfield.value); } else { URL += '+AND+FIELD+type=' + form.type.value } // if ( form.perPage.value ) options += "&Count="+form.perPage.value; // if ( form.searchMax.value!="snooty" ) options += "&SearchMax="+form.searchMax.value; // if ( form.searchFuzzy.checked ) options += "&SearchFuzzy=1"; // if ( form.searchWv.checked ) options += "&SearchWv=1"; // if ( form.searchOrder.value ) options += "&SearchOrder="+form.searchOrder.value; URL += "&Start=1&Count=15&SearchMax=0&SearchOrder=4"+options; //alert(URL + "\n\n" + form.searchMax.value+ "\n\n form.type.value is " + form.type.value); window.location.href=URL; }