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=3";//alert(URL);window.location.href=URL;}function popup() { form = document.forms.search; 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') {  URL += '+AND+FIELD+type=' + escape(form.type.value); } URL +=  "&Start=1&Count=15&SearchMax=0&SearchOrder=3";//alert(URL);window.location.href=URL;}/*NEW WIN//////////////////////////////////sUrl, source path to the pagesWidth, width of the new window sHeight, height of the new windowsPosX, x position of top left corner of the windowsPosY, y position of top left corner of the windowbLocation, location bar yes/nobMenubar, menubar yes/nobResizable, yes/no, is the window resizable?bScrollbars, yes/no does the window have scrollbarsbTitlebar, yes/no does the window have a titlebarbToolbar, yes/no does the window have a toolbarsWindowTitle , optional window title//////////////////////////////////*/function newWin( sUrl, sWidth, sHeight, sWindowTitle, sPosX, sPosY, bLocation, bMenubar, bResizable, bScrollbars, bTitlebar, bToolbar ) {var options = '';options += ( sWidth != "" ) ?  'width='+sWidth+',' : 'width=300,';options += ( sHeight != "" ) ?  'height='+sHeight+',' : 'height=300,';options += ( bLocation == "no" ) ?  'location=no,' : 'location=yes,';options += ( bMenubar == "no" ) ?  'menubar=no,' : 'menubar=yes,';options += ( bResizable == "no" ) ?  'resizable=no,' : 'resizable=yes,';options += ( bScrollbars== "no" ) ?  'scrollbars=no,' : 'scrollbars=yes,';options += ( bTitlebar == "no" ) ?  'titlebar=no,' : 'titlebar=yes,';options += ( bToolbar == "no" ) ?  'toolbar=no' : 'toolbar=yes';var newWindow = open(sUrl, 'newWindow', options)//var newWindow = open('', 'newWindow', options)posX = ( sPosX== "" ) ?  '10' : sPosX;posY = ( sPosY== "" ) ?  '10' : sPosY;newWindow .moveTo(posX,posY);newWindow .focus();}// end of new window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("<frameset>");popupWin.document.write("    <frame src='"+URL+"'>");popupWin.document.write("</frameset>");popupWin.focus();}function emailPopup(unid,bc,title) {var popupWin1; URL = '../email?openform&unid='+unid+'&badging='+bc+'&title='+title+'&etf'; wheight =  "370"; wwidth =  "400"; opts = 'width=' + wwidth + ',height=' + wheight + ',resizable,scrollbars=no,left=20, top=20';popupWin1=window.open( '','Window', opts);//alert(popupWin.name);var x = popupWin1.focus();popupWin1.document.write("<frameset>");popupWin1.document.write("    <frame src='"+URL+"'>");popupWin1.document.write("</frameset>");popupWin1.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=3"+options;//alert(URL + "\n\n" + form.searchMax.value+ "\n\n form.type.value is " + form.type.value);window.location.href=URL;}
