function confdel( url ) {
	if ( !confirm('Вы уверены, что хотите удалить запись?') ) {
		return false;
	}
	window.location.href=url;
}

function getresinfo(){
	ajaxRead('/xml/res.php?xml=1&city='+search.city.value+'&period='+search.period.value+'&credit_type='+search.credit_type.value+'&summ='+search.summ.value+'&currency='+search.currency.value);
}

function ajaxRead(file){
	
	show("doing");
	
	var xmlObj = null;
	if(window.XMLHttpRequest){
		xmlObj = new XMLHttpRequest();
	} else if(window.ActiveXObject){
		xmlObj = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
		return;
	}
	xmlObj.onreadystatechange = function(){
		if(xmlObj.readyState == 4){
			updateObj('res', xmlObj.responseXML.getElementsByTagName('data')[0].firstChild.data);
			hide("doing");
		}
	}
	xmlObj.open ('GET', file, true);
	xmlObj.send ('');
}
function updateObj(obj, data){
	document.getElementById(obj).firstChild.data = data;
}

function showhide(obj){
	if (document.getElementById(obj).style.display=='none')
		document.getElementById(obj).style.display='block';
	else
		document.getElementById(obj).style.display='none';
}


function show(obj){
	document.getElementById(obj).style.display='block';
}


function hide(obj){
	document.getElementById(obj).style.display='none';
}
