function display_frm()
		{
			if(document.getElementById("bottom_frm_cont").style.display=="none")
			{
				document.getElementById("bottom_frm_cont").style.display="block";
				document.getElementById("bottom_frm_t").className="bottom_frm_tit_over";
			}
			else
			{
				document.getElementById("bottom_frm_cont").style.display="none";
				document.getElementById("bottom_frm_t").className="bottom_frm_tit";
			}
		}

var prevProdId="";
var prevArr="";
var prevCat="";
var prevdataId="";
var prevImg="";
         function verticalGallerySwap(imgUrl,pos){
         document.getElementById("vertical_big_pic").src=imgUrl;
         //vertical_pic_desc
         document.getElementById("vertical_pic_desc").innerHTML=document.getElementById("desc"+pos).innerHTML;

         }
         function gallerySelected(elem){
         elem.className="selected";
         if(prevImg!="")
         prevImg.className="normal";
         prevImg=elem;
         }
function breakFree() { 
	if (top.location) top.location.replace(self.location.href) 
		else top.document.location.replace(self.document.location.href); 
		} 

			if (top!= self) breakFree(); 


            function LargeImageShow(LImageUrl,ImageW,ImageH){
                ImageH += 20;
                ImageW += 20;
                largeImage = window.open(LImageUrl,'largeImage','location=no,left=200,top=200,menubar=no,height='+ ImageH +',width=' + ImageW);
                largeImage.focus();
            }
            
            function FixStr(strToFix){
              	var re,rv;
              	var rv = String(strToFix);
              	re = /[\{\}-]/g;
              	rv=rv.replace(re,"");
                return (rv);
            }
            
            function OffLineAlert(){
            	 alert('This option disabled  Off-Line.');
            	 return false;
            }
		
				function open_search(id,arrow){
				  //alert("");
				  if(document.getElementById(id).className=="hideIt"){
				  document.getElementById(id).className="showIt";
				  document.getElementById(arrow).src="template/images/blue_arr_open.gif";
				  }
				  else{
				  document.getElementById(id).className="hideIt";
				  document.getElementById(arrow).src="template/images/blue_arr.gif";
				  }
				  }
				  function open_data(id,arrow){
				  //alert("");
				  if(document.getElementById(id).className=="hideIt"){
				  document.getElementById(id).className="showIt";
				  document.getElementById(arrow).src="template/images/search_category_icon_open.gif";
				  }
				  else{
				  document.getElementById(id).className="hideIt";
				  document.getElementById(arrow).src="template/images/search_category_icon.gif";
				  }
				  }
				  function change_data_class(id,catid){
				   if(document.getElementById(id).className=="hideIt"){
				   //alert("");
				   document.getElementById(catid).className="search_regular_cat";
				   
				   }
				   else{
				    document.getElementById(catid).className="search_regular_cat_on";
				   }
				  }		
					 function open_measurement(id){
				  if(document.getElementById(id).className=="hideIt")
				  document.getElementById(id).className="showIt";
				  else
				  document.getElementById(id).className="hideIt";
				  }
					
				  function changePicMorCats(id){
				  var pic=document.getElementById(id).src;
				  //alert(document.getElementById(id).src);
				  	 if(pic.indexOf("template/images/more_cats.jpg")!=-1){
					 	document.getElementById(id).src='template/images/more_cats_open.jpg';
						}
					else{
					document.getElementById(id).src='template/images/more_cats.jpg';
					}
					if(prevCat!="")
					document.getElementById(prevCat).src='template/images/more_cats.jpg';
					prevCat=id;
				  }
					

				  function open_mor_cat(prodId,dataId,arrow){
				 	//alert("pid="+prodId+" dataId"+dataId+" arrow"+arrow);
				  if(prevProdId==prodId){
				  if(document.getElementById(dataId).className=="serch_path_holder"){
				  document.getElementById(dataId).innerHTML="";
				  document.getElementById(dataId).className="hideIt";
				   document.getElementById(arrow).className="hideIt";
				   //document.getElementById("cats"+)
				  
				  }
				  else{
				  
				  document.getElementById(dataId).innerHTML=document.getElementById(prodId).innerHTML;
				  document.getElementById(dataId).className="serch_path_holder";
				  document.getElementById(arrow).className="showIt";
				  }
				  }
				  else
				  {
				  
				  try{
				  document.getElementById(dataId).innerHTML=document.getElementById(prodId).innerHTML;
				  }catch(err){}
				  document.getElementById(dataId).className="serch_path_holder";
				  document.getElementById(arrow).className="showIt";
				  if(prevArr!="")
				  	 document.getElementById(prevArr).className="hideIt";
				  }				  				 
				  if(prevdataId!="" &&  prevdataId!=dataId){
				   document.getElementById(prevdataId).innerHTML="";
				  document.getElementById(prevdataId).className="hideIt";
				  }
				   prevProdId=prodId;
				  prevArr=arrow;
				  prevdataId=dataId;
				  
				  }				
					
	function open_kitchen_frm(id,but){
				  //alert("");
				  if(document.getElementById(id).className=="hide_row"){
				 	document.getElementById(id).className="show_row";				  
					document.getElementById(but).className="kit_minus";
				  }
				  else{
				  	document.getElementById(id).className="hide_row";
					document.getElementById(but).className="kit_plus";
				  
				  }
				  }				
	
