// JavaScript Document
// JavaScript Document
function getSID(){
	return $('spSID').innerHTML;
}

function showError(resp) {
	alert('ERROR DE CONEXION : \n'+resp.responseText);
}

function mostrarInterfaz(objSIM, url, iddvcontenedor) {	
	var pars = 'p1='+$F('cbPublicacion');
	var conAsync=new Ajax.Updater({success: iddvcontenedor}, url, 
		{ method: 'get',
		evalScripts: true,
		onFailure : showError,
		on404: function(resp) { alert('No existe recurso'); },
		onComplete: function(resp) {
						//alert(conAsync.getHeader('Content-Type'));
						if (resp.responseText.substring(0,1)=='<') {
							//marca el subitem
							//alert('JS');	
							//cambios de idioma y demas
							// mostrarClientes();
						}
						else {
							$(iddvcontenedor).innerHTML='';
							showProcessError(resp.responseText);
						}
					},
		parameters : pars });	
}

function mostrarArticuloDetalle(idPublicacion) {
	mostrarInterfaz(this, 'verDetallePublicacion.php?p1='+idPublicacion, 'listaDetalleArticulos');
}
