function abrirPopUp (url, width, height, top, left, id) {

	var opciones="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+ width +",height="+ height +",top="+ top +",left="+ left +"";

	var popUpId = window.open(url, id, opciones);

	if(popUpId == null) {

		popUpAlert();
	}

	return popUpId;
}

function popUpAlert() {

	alert("Atención!: Su navegador tiene bloqueadas las ventanas emergentes\nRevise la configuracion de su navegador para permitir ventanas emergentes.\nQuirumed.com");
}


function abrirFactura(url) {

	abrirPopUp(url, 750, 500, 50, 100, null);
}

function abrirCondiciones(url) {

	abrirPopUp(url, 750, 500, 50, 100, null);
}

function abrirCondicionesTicket(url) {

	abrirPopUp(url, 550, 400, 50, 100, null);
}

function abrirFormaspago(url, abajo, derecha, arriba, izquierda) {

	abrirPopUp(url, abajo, derecha, arriba, izquierda, null);
}

function abrirTutorial(url) {

	abrirPopUp(url, 750, 500, 50, 100, null);
}

function abrirEditorTexto(url) {

	abrirPopUp(url, 750, 500, 50, 100, null);
}

function abrirAvisoLegal(url) {

	abrirPopUp(url, 500, 450, 50, 100, null);
}

function abrirTransferenciaInfo(url) {

	abrirPopUp(url, 600, 400, 50, 100, null);
}



function updateInicioCesta() {

	new Ajax.Updater('InicioCesta','/' + getLang() + '/Inicio/cesta', {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'InicioCesta']});
}

function gotoCesta() {

	window.location = '/' + getLang() + '/Cesta/';
}
