function changeListLimit(value)
{
	var s = document.location.search;
	if (value.length==0)
		s = vacumParam(s,"_limit",value);
	else
		s = insertParam(s,"_limit",value);
	if (s != document.location.search) document.location.search=s;
}

function checkNum(idName)
{ 
	var numElement = document.getElementById(idName); 
	
	while (isNaN (numElement.value))
	{
		if( numElement.value.substring(numElement.value.length-1,numElement.value.length)==',')
			numElement.value=numElement.value.substring(0,numElement.value.length-1)+'.';
		else
			numElement.value = numElement.value.substring(0,numElement.value.length-1);
	} 
}

function add_to_cart2(id, ver, color, size, quantity_id)
{
	var quantity=document.getElementById(quantity_id);
	if (!(quantity.value>0))
		quantity.value=1;

	window.location.href='index.php?site=cart&id=' + id + '&id1=' + color + '&id2=' + size +'&quantity='+quantity.value + '&ver=' + ver;
}

function changeBg(object, oper)
{
	o = document.getElementById('prodCardButtonOne'+object);
	active = document.getElementById('activeButton');
	if (active.value!=object)
	{
		o.style.backgroundImage='url(image/icon/offer_view_image_on.gif)';
		document.getElementById('prodCardButtonOne'+active.value).style.backgroundImage='url(image/icon/offer_view_image.gif)';
		active.value=object;
	}
}
