function getVersions(software_id)
{
	new Ajax.Request(url, {asynchronous: true,
												 method: "get",
												 parameters: "software_id=" + software_id,
												 onSuccess: function(request){
												 	assignVersions(request.responseText);
												 },
												 onFailure: function(request){
												 	assignError(request.responseText);
												 }
												});
}

function assignCityAndState(data) 
{
	var cityState = data.split(',');
	document.getElementById("city").value = cityState[0];
	document.getElementById("state").value = cityState[1];
	document.getElementById("zipError").innerHTML = "";
}

	function searchVersions()
	{
		var software_id = $F('serialnumber_software_id');
		var url = '/panlab/index.php/admin/softwares/get_versions';
		var pars = 'empID=' + empID + '&year=' + y;
		
var myAjax = new Ajax.Request( url, { method: 'get', parameters: pars, onComplete: showResponse });

	}

	function showResponse(originalRequest)
	{
		//put returned XML in the textarea
		$('result').value = originalRequest.responseText;
	}
	
function renderPopup(windowsource,windowname,width,height,scrollbars,directories,location,menubar,status,toolbar,resizable) 
{
	//<a class="t1 text_highlight" href="javascript:RenderPopup('http://www.es.lastminute.com/lmn/lmnimage/es/lmnes/habitaciones/index.html','Horarios',460,400,1,0,0,0,0,0,0);" target="_self">Distribución de las habitaciones</a>
	
	var windowfeatures = 'width=' + width +
	',height=' + height + ',directories=' + directories +
	',location=' + location + ',menubar=' + menubar +
	',scrollbars=' + scrollbars + ',status=' + status +
	',toolbar=' + toolbar + ',resizable=' + resizable;
	window.open(windowsource, windowname, windowfeatures); 
}
