var dom = "http://www.rowiw.com";

function sendRequest(cmd,id,uid,s)
		{					
					  oMessage = document.getElementById("action_link_" + id);
					  oMessage.innerHTML = "<span class='loading_icon'><img alt=\"loading...\" width=\"16\" height=\"16\" src=\"images/loading.gif\" style=\"padding-right:2px;\" border=\"0\" align=\"absmiddle\" />";

			if(s==null) s='nulla';
			if(s=='') 	s = 'ures';
			if(s=='undefined') s = 'nodefin';
		
			var url = dom + "/ajax/action.php?cmd=" + cmd + "&id=" + id + "&uid=" + uid + "&s=" + s + "&random=" + 10000 + Math.round(Math.random() * 99999);
			// Create new JS element
			var jsel = document.createElement('SCRIPT');
			jsel.type = 'text/javascript';
			jsel.src = url;
	
			document.body.appendChild(jsel);
			
		}

function refreshLastLogin(uid)
		{							

			var url = dom + "/ajax/action.php?cmd=refresh_last_login&uid=" + uid + "&random=" + 10000 + Math.round(Math.random() * 99999);

	// Create new JS element
			var jsel = document.createElement('SCRIPT');
			jsel.type = 'text/javascript';
			jsel.src = url;
	
			document.body.appendChild(jsel);
			
			window.setTimeout('refreshLastLogin(' + uid + ')',120000);
			
		}


function generateThumb(file_name)
		{					
		
			var url = dom + "/profile_images/mythumb.php?img=images/" + file_name + "&cache=cache_big&random=" + 10000 + Math.round(Math.random() * 99999);
			//alert (url);
			// Create new JS element
			var jsel = document.createElement('SCRIPT');
			jsel.type = 'text/javascript';
			jsel.src = url;
	
			document.body.appendChild(jsel);
			
		}
