	//--------------------------------------------------------------------
	// filename: main.js
	//--------------------------------------------------------------------

	function go(url) {

		document.location.href = url;

	} // function go

	function confirmDelete(location) {
		
		debug("showing confirm");
		
		if(confirm("Voce realmente quer apagar este registro?")) {
			debug("user accepted, going to " + location);
			document.location.href = location;
		}
		else
			debug("user cancelled, quitting.");
			
	} // function confirmDelete
	
	
	
	function Abrir_popup() {
		var opciones="toolbar=no,location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=1020, height=630, top=85, left=140";
		var window_open = window.open("","nueva",opciones);
		//alert("popup aberto = " . window_open);
	}
       
	function visualizar(form_name,url) {
		eval("document."+form_name).action = url;
		eval("document."+form_name).target = "nueva";
		Abrir_popup();
		eval("document."+form_name).submit();
		//document.location.href = "checkout_confirma.php";
	}
		
	function onKeyDown(e) {
		document.onkeydown = getKeyEvent	
	} // onKeyDown
	
	function getKeyEvent(e) {
		var code;
		if (!e) var e = window.event;
		if (e.keyCode) code = e.keyCode;
		else if (e.which) code = e.which;
		var character = String.fromCharCode(code).toLowerCase();
	  if (e.ctrlKey && (character == "c" || character == "v")) {
		// disable key press porcessing
		if (window.event) //IE
			e.returnValue = false;
		else //Firefox
			e.preventDefault(); 
	  }
	}
	
	function onRightClick() {
		document.oncontextmenu=getRightClick;
	}
	
	function getRightClick() {
		return false
	}
	
