var menu=0;

function high(which2,par_obj) {
//alert(par_obj.style.position);
which2.style.visibility="visible";
which2.style.left=0.18*document.body.clientWidth;
which2.style.top=0.20*document.body.clientHeight;
which2.style.zIndex=0;
theobject=which2;
highlighting=setInterval("highlightit(theobject)",50)
}

function highlightit(cur2){
if (cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=5
else if (window.highlighting)
clearInterval(highlighting)
}

function hide (name2) {
	low(name2)
	name2.style.visibility="hidden"
}

function low(which2){
clearInterval(highlighting);
which2.filters.alpha.opacity=0;
}

function show (name2) {
		name2.style.visibility="visible";
		name2.filters.alpha.opacity=100
}

function createCookie(name, value, expiredays)
{
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name +
                  "=" +
                  value +
                  "; expires=" +
    todayDate.toGMTString() +
    ";"
}
function hidemenuie5(){
if (menu==1)
 select1.style.visibility="hidden";
}
function confirmAction(prod)
{
  return confirm('Действительно желаете удалить `' + prod + '`?');
}

var dropDowns = {}
function sm(menuName)
{
if(dropDowns[menuName])clearTimeout(dropDowns[menuName])
document.getElementById(menuName).style.display = ''
}
function hm(menuName)
{
dropDowns[menuName] = setTimeout(function(){
document.getElementById(menuName).style.display = 'none'},80)
}
function ifFormChanged(form_name, field_name)
{
parsedValue = 0;
parsedValue = parseInt(document.forms[form_name][field_name].value);
if(parsedValue >= 0 && !isNaN(parsedValue))
document.forms[form_name][field_name].value = parsedValue;
else
document.forms[form_name][field_name].value = '';
document.forms[form_name].submit();
}
function ifBasketClicked(form_name, field_name)
{
if (document.forms[form_name][field_name].value == '')
{
document.forms[form_name][field_name].value=1;
document.forms[form_name].submit();
}
}
