function whatsupbro(formular, id_multishop) {
	var products = new Array();
	var counts = new Array();
	var nodes = formular.getElementsByTagName('input');

	for (var x = 0; x < nodes.length; x++) {
		if (nodes[x].name == 'id_product[]' && nodes[x].checked == true) {
			products.push('id_product[]=' + nodes[x].value);
			counts.push('item_count_' + nodes[x].value + '=' + formular.elements['item_count_' + nodes[x].value].value);
		}
	}

	var str = '&' + products.join('&');
	var str2 = '&' + counts.join('&');

	if (!send_xmlhttprequest(pridaljsemtotam, 'GET', '/index.php?ma=ajax&sid=pcart&ms=' + id_multishop + str + str2)) {
		return true;
	}

	return false;
}

function cornidotasky(id_product, id_multishop, form, no_window) {
	var count = form.elements['item_count_' + id_product].value;

	send_xmlhttprequest(((no_window != undefined) &&(no_window == false)) ? null : pridaljsemtotam, 'GET', '/index.php?ma=ajax&sid=pcart&ms=' + id_multishop + '&id_product[]=' + id_product + '&item_count_' + id_product + '=' + count);
}

function pridaljsemtotam(xmlhttp) {
	if (xmlhttp.readyState == 4) {
		var cart = '';
		var info = xmlhttp.responseXML.getElementsByTagName('info')[0].firstChild.data;

		var nodes = xmlhttp.responseXML.getElementsByTagName('cart')[0].childNodes;

		for (var i = 0; i < nodes.length; i++) {
			cart += nodes[i].data;
		}

		document.getElementById('dark_bg').style.display = 'block';
		var mw = document.getElementById('matwindow');
		mw.style.display = 'block';
		mw.className = "mw_cart";
		document.getElementById('matwindow_in').style.display = 'block';
		document.getElementById('matwindow_in').innerHTML = info;

		//document.getElementById('supercartos').innerHTML = cart;
		document.getElementById('cart_in').innerHTML = cart;
		document.getElementById('cart').className = '';
		document.getElementById('cart_vt').className = 'ltit jetamneco';
		document.getElementById('cart_vt').innerHTML = xmlhttp.responseXML.getElementsByTagName('text')[0].firstChild.data;

        reg = /^.*MSIE 6.*$/;
        if (reg.test(navigator.appVersion)) {
            var sel = document.body.getElementsByTagName("SELECT");
            for (var i = 0; i < sel.length; i++)
                sel[i].style.visibility = "hidden";
        }
	}
}
