function dosearch(searchbox,type,url)
{
   sr=searchbox.stext.value;
   if(type=="2")
     {
       sr=sr.replace(/^\s*/,"").replace(/\s*$/,"");
       sr=sr.replace(/\s+/g," ");
       sr=sr.replace(/"/,"");
       re = /[\s+]/g;
       str = sr;
       newstr = str.replace(re, " AND ");
       sr=newstr;
       }
   else if(type=="3")
       {
       sr='"'+searchbox.stext.value+'"';
       }
   random_num = (Math.round((Math.random()*900000)+1))
   location.href=url+'?s='+sr+'&ss='+searchbox.stext.value+'&n='+random_num;
}

function changeSort(url)
{
   var v=document.search2.sortby.options[document.search2.sortby.selectedIndex].value;
   random_num = (Math.round((Math.random()*900000)+1))
   location.href=url+'?sort='+v+'&n='+random_num;
}

function changeView(url)
{
   var v=document.search2.show.options[document.search2.show.selectedIndex].value;
   random_num = (Math.round((Math.random()*900000)+1))
   location.href=url+'?show='+v+'&n='+random_num,'_self';
}


