
function searchby_occasion_dd() {
 // alert (  document.getElementById("searchby_occasion").value  );	
window.document.location.href = '/Product.aspx?query=Keyword%1F' + document.getElementById("searchby_occasion").value;
return false;
}

function searchby_price_dd() {
 // alert (  document.getElementById("searchby_price").value  );
  window.document.location.href = '/Product.aspx?query=PriceRange%1F' + document.getElementById("searchby_price").value;  
return false;
}



function searchby_maintext() {
 // alert (  document.getElementById("searchby_price").value  );
  window.document.location.href = '/Product.aspx?query=' + document.getElementById("maintext_search").value;  
return false;
}


function searchClick()
{
	  if(document.getElementById("searchby_price").value.length > 0)
	  {
			//var queryURLEncoded = encodeURIComponent(document.forms[0].{0}.value);
			//document.location = '{1}' + '?query=' + queryURLEncoded;
			//alert("test");
			window.document.location.href = '/Product.aspx?query=' + document.getElementById("maintext_search").value; 
	  }
}

function txtSearchQueryKeyPress(evt)
{
	  if(evt.keyCode == 13)
	  {
			searchClick()
			return false; // cancel submit
	  }
	  
	  return true;
}






/* Modified to support Opera */
function bookmarksite(title,url){
if (window.sidebar) // firefox
      window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
      var elem = document.createElement('a');
      elem.setAttribute('href',url);
      elem.setAttribute('title',title);
      elem.setAttribute('rel','sidebar');
      elem.click();
} 
else if(document.all)// ie
      window.external.AddFavorite(url, title);
}
