function vytvorFlash(menomovie, width, height, id){    //flesh = document.getElementById(kde);    //flesh.innerHTML +=    document.writeln("<object type='application/x-shockwave-flash' data='"+menomovie+"' width='"+width+"' height='"+height+"' id='"+id+"'><param name='movie' value='"+menomovie+"'><param name='quality' value='high'><param name='wmode' value='transparent'><param name='allowScriptAccess' value='sameDomain' /></object>");}function showSpan(parent,e,w,h){    //var imageSpan = parent.getElementsByTagName('span');    var imageSpan = document.getElementById(parent);    var moz = false;    //mouse position  	var posx = 0;  	var posy = 0;  	if (!e) var e = window.event;  	if (e.pageX || e.pageY) 	{  		posx = e.pageX;  		posy = e.pageY;  	}  	else if (e.clientX || e.clientY) 	{  		posx = e.clientX + document.body.scrollLeft  			+ document.documentElement.scrollLeft;  		posy = e.clientY + document.body.scrollTop  			+ document.documentElement.scrollTop;  	}    if (e.layerX || e.layerY) {      posx = e.layerX;      posy = e.layerY;      moz = true;    }  	// posx and posy contain the mouse position relative to the document    /*    imageSpan[0].style.display = "block";    if (moz) {      imageSpan[0].style.top = (posy-h-20)+"px";      imageSpan[0].style.left = (posx-w-20)+"px";    } else {      imageSpan[0].style.top = posy-h-20;      imageSpan[0].style.left = posx-w-20;    }    */    imageSpan.style.display = "block";    if (moz) {      imageSpan.style.top = (posy-h-20)+"px";      imageSpan.style.left = (posx-w-20)+"px";    } else {      imageSpan.style.top = posy-h-20;      imageSpan.style.left = posx-w-20;    }}function hideSpan(parent){    var imageSpan = document.getElementById(parent);    imageSpan.style.display = "none";    //var imageSpan = parent.getElementsByTagName('span');    //imageSpan[0].style.display = "none";}function hideMe(self){    self.style.display = "none";}//HTTP request  function setValue(value, elementId, ajaxDivId) {    var element = document.getElementById(elementId);    var ajaxed = document.getElementById(ajaxDivId);    element.value = value;    ajaxed.style.display = "none";  }  function createRequestObject() {    var request_o;    var browser = navigator.appName;  	if(browser == "Microsoft Internet Explorer") {  		request_o = new ActiveXObject("Microsoft.XMLHTTP");  	} else {  		request_o = new XMLHttpRequest();  	}  	return request_o;  }  var http = createRequestObject();  var prazdny = true;  function httpGET(action, vars, ajaxDivId) {  	http.open('get', action+'?'+vars);  	if (action=="kosik.php")  	   alert('Tovar bol vložený do košíka.');  	/* Define a function to call once a response has been received. */  	http.onreadystatechange = function(){      if(http.readyState == 4) {  		  var response = http.responseText;  		  document.getElementById(ajaxDivId).innerHTML = response;  		  if (response!="") prazdny = true;  		  else prazdny = false;  	  }  	  if((http.readyState == 1)&&(action=="kosik.php")) {  		  var response = "Loading..";  		  document.getElementById(ajaxDivId).innerHTML = response;  	  }    }    /* Send the data. We use something other than null when we are sending using the POST	method. */  	http.send(null);  	var ajaxed = document.getElementById(ajaxDivId);    //if (prazdny)    ajaxed.style.display = "block";    //else ajaxed.style.display = "none";  }  /* Function called to handle results that was returned from the action file.. */  function handleResults() {  	/* Make sure that the transaction has finished. The XMLHttpRequest object  		has a property called readyState with several states:  		0: Uninitialized  		1: Loading  		2: Loaded  		3: Interactive  		4: Finished */  	if(http.readyState == 4) { //Finished loading the response  		/* We have got the response from the server-side script,  			let's see just what it was. using the responseText property of  			the XMLHttpRequest object. */  		var response = http.responseText;  		/* And now we want to change the product_categories <div> content.  			we do this using an ability to get/change the content of a page element  			that we can find: innerHTML. */  		document.getElementById("nakup").innerHTML = response;  		//if (document.getElementById("searchResults").innerHTML == "")  		  //document.getElementById("searchResults").style.display = "none";  	}  }
