function addBookmark(url, title)
{
  if (!url) url = location.href;
  if (!title) title = document.title;
  
  //Gecko
  if ((typeof window.sidebar == "object") && (typeof window.sidebar.addPanel == "function")) window.sidebar.addPanel (title, url, "");
  //IE4+
  else if (typeof window.external == "object") window.external.AddFavorite(url, title);
  //Opera7+
  else if (window.opera && document.createElement)
  {
    var a = document.createElement('A');
    if (!a) return false; //IF Opera 6
    a.setAttribute('rel','sidebar');
    a.setAttribute('href',url);
    a.setAttribute('title',title);
    a.click();
  }
  else return false;
  
  return true;
}




function urlencode(text)
{
  var trans = [];
  for (var i=0x410; i<=0x44F; i++) trans[i] = i-0x350;
  trans[0x401] = 0xA8;
  trans[0x451] = 0xB8;
  var ret = [];
  for (var i=0; i<text.length; i++)
  {
    var n = text.charCodeAt(i);
    if(typeof trans[n] != 'undefined') n = trans[n];
    if(n <= 0xFF) ret.push(n);
  }
  return escape(String.fromCharCode.apply(null,ret));
}


function ssearch()
{
var word = 	document.getElementById('searchword').value;

word = urlencode(word);

self.location.href='/do_search/'+ word;
}
<!-- Функция увеличения количества товара на 1 при нажатии на плюсик-->
function inc(name)
{
    var qty = parseInt(document.getElementById(name).value, 10);
    if (isNaN(qty)) { qty = 1; }
    else { qty++; }
    if (qty < 1) { qty = 1; }
    document.getElementById(name).value = qty;
    return false;
}
<!-- Функция уменьшения количества товара на 1 при нажатии на минус-->
function dec(name)
{
    var qty = parseInt(document.getElementById(name).value, 10);
    if (!isNaN(qty) && qty > 1) { qty--; } else { qty = ""; }
    if (qty < 1) { qty = 1; }
    document.getElementById(name).value = qty;
    return false;
}
<!-- Функция изменения суммы товара-->
function editsumm(col,money,summ)
{
	
<!--    var qty = parseInt(document.getElementById(col).value, 10);
<!--	var money = parseInt(document.getElementById(money).innerHTML, 10);
 <!--   var summa = parseInt(document.getElementById(summ).innerHTML, 10);
	
<!--	summa = summa - money;


    document.getElementById(summ).innerHTML = "жопа";
    return false;
}

function ShowOrHide(id)
{
	if(document.getElementById(id).style.display=='block') document.getElementById(id).style.display='none';
	else document.getElementById(id).style.display='block';

}
