function show_div(zprava)
{
  document.getElementById('added').innerHTML = '<p>' + zprava + '</p>';
  document.getElementById('added').style.visibility = 'visible';
}

function hide_div()
{
  document.getElementById('added').style.visibility = 'hidden';
}

function blast_off()
{
	creatediv();
	setTimeout('blast_off()', 300);
}

function init_xmlhttp()
{
	var xmlhttp=null;
	// code for Mozilla, etc.
	if (window.XMLHttpRequest)
	{
		xmlhttp=new XMLHttpRequest()
	}
	// code for IE
	else if (window.ActiveXObject)
	{
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	
	if (xmlhttp!=null)
		return xmlhttp;
	else
	{
		alert(support_error)
		return null;
	}
}

function query(url)
{
	var xmlhttp = init_xmlhttp();
	
	xmlhttp.open("POST",url,false);
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.send('');
	return xmlhttp.responseText;
	//~ if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
	//~ {
		//~ alert('Stored - ' + state);
	//~ }
	//~ else
	//~ {
		//~ alert(retrieve_error + xmlhttp.statusText);
	//~ }
}

function send_order(id,kusu)
{
  var url = 'addtocart.php?id=' + id + '&kusu=' + kusu;
  var zprava = query(url);
  show_div(zprava);
  setTimeout('hide_div()', 1000); 
}

function chc(kam) {
  document.forms[0].akce.value = kam;
  return true;
}

function test_udaje() {
  return true;
}
