function toggle(id){
	if(document.getElementById(id).offsetHeight<10)
		document.getElementById(id).style.display='block';
	else
		
		document.getElementById(id).style.display='none';
}

			var req;
			var sitepath;
			sitepath='http://clients.netstyle.ro/ropeco';
			var elem_blur = new Array;
			function loadXMLDoc(url) {

   				// Internet Explorer
   				try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
   				catch(e) {
      				try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
      				catch(oc) { req = null; }
   				}
   				// Mozailla/Safari
   				if (!req && typeof XMLHttpRequest != "undefined") { req = new XMLHttpRequest(); }

   				// Call the processChange() function when the page has loaded
   				if (req != null) {
      				req.onreadystatechange = processChange;
      				req.open("GET", url, true);
      				req.send(null);
   				}
			}

			function processChange() {
   				// The page has loaded and the HTTP status code is 200 OK
   				if (req.readyState == 4 && req.status == 200) {
      				// Write the contents of this URL to the searchResult layer
      				getObject("cos_produse").innerHTML = req.responseText;
				}
			}

			function getObject(name) {
   				var ns4 = (document.layers) ? true : false;
   				var w3c = (document.getElementById) ? true : false;
   				var ie4 = (document.all) ? true : false;

   				if (ns4) return eval('document.' + name);
   				if (w3c) return document.getElementById(name);
   				if (ie4) return eval('document.all.' + name);
   				return false;
			}

			function doCos(id){	
				var path= sitepath+'/cos_produse.php?demodificat=';
				path= path + id +'&cantitate=';
				path = path + getObject('cantitate_' + id).value;
				if (getObject('cantitate_' + id).value!='')
				loadXMLDoc(path);
			}
			function deleteFromCos(id){
				var path= sitepath+'/cos_produse.php?demodificat=';
				path= path + id +'&cantitate=0';
				loadXMLDoc(path);
			}
			
			function doCos_av(id){	
				var path= sitepath+'/cos_produse_detaliat.php?demodificat=';
				path= path + id +'&cantitate=';
				path = path + getObject('cantitate_' + id).value;
				if (getObject('cantitate_' + id).value!='')
				loadXMLDoc(path);
			}
			function deleteFromCos_av(id){
				var path= sitepath+'/cos_produse_detaliat.php?demodificat=';
				path= path + id +'&cantitate=0';
				loadXMLDoc(path);
			}