function loadscript(opacity,searchboxcaption) {
  var opc = opacity/100;
  search_box = $('search_area');
  search_key = $('search_key');
  out_box = $('searched_products');
  var product_names= new Array();
  var count=0;
  $$('.products_class').each( function(obj, i){
    product_names[i] =obj.getElement('.product_name').innerHTML;
    if (count<i){
      count=i;
    }
  });
  var hover = 0;
  out_box.addEvents({
      	'mouseenter': function() {
      		hover=1;
      	},
      	'mouseleave': function() {
      		hover=0;
      	}
    });   
      
  search_box.addEvents({
  	'focus': function() {
  		if (search_box.value.contains(searchboxcaption)) search_box.value = '';
  	},
  	'blur': function() {
  		search_box.value = searchboxcaption;
  		if (hover==0){ out_box.setStyle('display','none');}
  	},
  	'keyup': function(event) {
      if(event.keyCode == 13){
        search_key.value = search_box.value;
        document.myform.submit();
      }else{
  		  search_box.fireEvent('burn', search_box.value);
  		}
  	},
  	'burn': function(text) {
      if ((text) && (text.length>2)){
    		out_box.setStyle('display','block');
        var log = out_box.empty();
        //log.innerHTML='<div id="lefttop"></div><div id="midtop"></div><div id="righttop"></div><div style="clear:both;"></div><div class="ajax-loading"></div><div id="leftbottom"></div><div id="midbottom"></div><div id="rightbottom"></div>';
		log.innerHTML='<div style="clear:both;"></div><div class="ajax-loading"></div>';
      	$('search_form').send({
      		update: log      		
    	 });

    	}
  	}
  });

  var searched_products = new Fx.Styles(out_box, {duration:1000, wait:false, transition: Fx.Transitions.Expo.easeOut});

  searched_products.start({
    'opacity' : opc
  });  
 
};
