	var vent = null;
	function openWindow(which,sx,sy,scrollb){
		var scrl = scrollb;
		
		var altura=screen.height;
		var anchura=screen.width;
		var vent_x=(document.all) ? sx+20 : sx;
		var vent_y=(document.all) ? sy+80 : sy;

		var posx=anchura/2-vent_x/2;
		var posy=altura/2-vent_y/2;
		
		if (vent != null && !vent.closed) vent.close();
		
		vent = window.open(which,'ficha','resizable=1,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars='+scrl+',width='+vent_x+',height='+vent_y+',screenX='+posx+',screenY='+posy+',left='+posx+',top='+posy+'');
		
		vent.resizeTo(sx,sy);
		vent.focus();
	
	}

function comprobarMarco (padre) {
	if (window.parent.location == document.location) {
		window.parent.location = padre;
	}
}
