
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);
}



// *******************************************************************************************
// Code added tempoarily to give warning message on purchase.
// *******************************************************************************************

function extra_checkoutinfo(){

 var where_to= confirm("Please note that this order will not be dispatched until w/c 4th of January. \nPlease click ok to proceed.");
 if (where_to== true)
 {
   document.getElementsByName("pageViwer$content5$ctl00$ctl00$ctl24")[0].click();   
  }
 else
 {
  alert("You cancelled the payment process.\nPurchase not made");
  }


}