	nn4 = (document.layers)? true : false;
	ie4 = (document.all)? true : false;
	nn6 = (document.getElementById && !ie4)? true : false;
	img_empt = new Image();
	img_empt.src = 'img/x.gif';
	// style1
	img_pls = new Image();
	img_pls.src = 'img/open.gif';
	img_min = new Image();
	img_min.src = 'img/close.gif';
	// style2
	img_pls2 = new Image();
	img_pls2.src = 'img/open2.gif';
	img_min2 = new Image();
	img_min2.src = 'img/close2.gif';
	
function comparer(oid) {
	hot = window.open('/compare.phtml?action=add&oid='+oid, 'comparer', 'status=no, toolbar=no menubar=no, width=800, height=650');
	hot.focus();
}

function getPosition() {
    e = window.event;
    var cursor = {x:0, y:0};
    if (e.pageX || e.pageY) {
        cursor.x = e.pageX;
        cursor.y = e.pageY;
    } 
    else {
        var de = document.documentElement;
        var b = document.body;
        cursor.x = e.clientX + 
            (de.scrollLeft || b.scrollLeft) - (de.clientLeft || 0);
        cursor.y = e.clientY + 
            (de.scrollTop || b.scrollTop) - (de.clientTop || 0);
    }
    return cursor;
}


function setItem(k,q)
{
	document.getElementById('imgpost').src='s.php?key='+k+'&q='+q;
}

function setItemR(k,q)
{
	document.all['imgpost'].src='s.php?key='+k+'&q='+q;
	self.setTimeout('self.location=\'index.php?layout=basket&m=0\'', 100);
}

function setItem2(k,q)
{
	document.all['imgpost'].src='s.php?key='+k+'&q='+q;
	self.setTimeout('self.location=\'index.php?layout=basket&m=1\'', 100);
}

function goBas() {
	self.location='index.php?layout=basket&m=0';
}

function setItem3(k)
{
	if (!document.all['i'+k].checked){
		document.all['imgpost'].src='s.php?key='+k;
		alert('Товар успешно добавлен в корзину. Пожалуйста, перейдите в корзину для оформления заказа.');
	}
}


