
	var key_tab = 9;
	var basic = true;

	function openWindow(theURL,winName,features) {
		if (winName.window) winName.focus;
		popupWin = window.open(theURL,winName,features)
		popupWin.focus;
	}
	function deleteConfirm(what,formName,theURL) {
		if (confirm("Esta seguro de querer borrarlo "+ what +"? ")) {
			if (formName != null) {
				formName.submit()
			} else {
				window.location.href = theURL
			}
		}
	}

	function processTab() {
		if (window.event.keyCode == key_tab) 
		{
		var s = document.selection;
		var tr = s.createRange();
		if ( tr != null ) 
			tr.text = "\t";
			window.event.returnValue=false;
		}
	}

	_editor_url = "htmlarea/";
	var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
	if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
	if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
	if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
	if (win_ie_ver >= 5.5) {
		document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
		document.write(' language="Javascript1.2"></scr' + 'ipt>');  
	} else {document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>');}
	
////FUNCIONES PARA CIERTAS ACCIONES DE VALDEFRESNO.ORG

function popupImagen (url,titulo) //Funcion que abre un popup con una imagen
{
  var ima = new Image ();
  var ventanaActual;
  ima.onload = function ()  //Cuando la imagen se haya precargado..
  {
    /*Se abre el popup centrado (mas o menos) de un tamaņo alto y de ancho mayor que el de la imagen para dar margen y contar la barra de titulo y la barra de estado*/
    ventanaActual=window.open(url,'imagenpopupValde','toolbar=0,location=0,width='+(parseInt(ima.width)+30)+',height='+(parseInt(ima.height)+90)+',top='+((window.screen.height-ima.height)/2)+',left='+((window.screen.width-ima.width)/2));
    try  //En ocasiones el popup puede no estar disponible y al intentar cambiar propiedades falla
    {//alert(ima.width+' x '+ima.height);
      ventanaActual.resizeTo(parseInt(ima.width)+30,parseInt(ima.height)+90);  //Se redimensiona la ventana por si estuviera ya abierta
         //Se mueve la ventana para que quede centrada con la nueva imagen abierta (en el caso de que ya estuviera abierta
      ventanaActual.moveTo((window.screen.width-parseInt(ima.width))/2,(window.screen.height-ima.height)/2);
      ventanaActual.focus();  //Pone el foco de la ventana para que si estuviera abierta no quede en segundo plano
      ventanaActual.document.title=titulo;
    }
    catch(e)
    {
    }
  }
  ima.src=url; //Se asigna al objeto la URL de la imagen a abrir en el popup
}



