function ipBuySeveral(path, id) {
	var cntf = document.getElementById(id);
        if (! /[0-9]+/.test(cntf.value) || (parseInt(cntf.value) <= 0) ) {
            alert('Неверное значение!')
            return false;
        }
        window.location = path.replace('Cart_count=1', 'Cart_count='+cntf.value);
        return false;
}

function ClearSearch(it){
	console.log(it.value);
	console.log('Поиск по сайту');
	if (it.value == 'Поиск по сайту') {
		it.value='';
	}
 return true;
}

function addToCompare(id) {
	var form = document.getElementById('compareForm');
	var inp = document.getElementById('compareId');
	var act = document.getElementById('compareAction');
	inp.value = id;
	act.value = 'add';
	form.submit();
	return false;
}

function purgeCompare() {
	var form = document.getElementById('compareForm');
	var act = document.getElementById('compareAction');
	act.value = 'purge';
	form.submit();
	return false;
}

function removeFromCompare(id) {
	var form = document.getElementById('compareForm');
	var inp = document.getElementById('compareId');
	var act = document.getElementById('compareAction');
	inp.value = id;
	act.value = 'remove';
	form.submit();
	return false;
}


