// powered by blasten.com - all rights reserv  copyright2004
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function confirmLink(destino, mensaje)
{
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var confirmacion = confirm(confirmMsg + ' :\n' + mensaje);
    if (confirmacion) {
        destino.href += '&confirm=true';
    }

    return confirmacion;
} 

    var confirmMsg  = 'Realmente desea ';
	

function uno(src,color_entrada) { 
    src.bgColor=color_entrada;src.style.cursor="hand"; 
} 
function dos(src,color_default) { 
    src.bgColor=color_default;src.style.cursor="default"; 
}
var path='http://www.neotropicturist.com/';
function imgover(nombre_IMG){
     nombre_IMG.src = path+'img/selection_menu_on.gif';
}

function imgout(nombre_IMG){
     nombre_IMG.src =  path+'img/selection_menu_off.gif';
}


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function All(name)
	{
	 
		var length = document.inbox.elements.length
		var tocheck = document.inbox(name).checked 

		document.inbox.SelAll.checked = tocheck
		document.inbox.SelAll2.checked = tocheck
		
		
		for (var i=0; i<length; i++) 
		{ 
			if (document.inbox.elements[i].name.indexOf("s") != -1) 
			document.inbox.elements[i].checked = tocheck 
		} 
		return; 
	}


	function SetAll(name)
	{
		if (1 == document.inbox(name).checked) 
		{ 
			document.inbox.SelAll.checked = 0;
			document.inbox.SelAll2.checked = 0; 		
		} 
		else 
		{ 
			document.inbox.SelAll.checked = 1; 
			document.inbox.SelAll2.checked = 1; 
		} 
		All(name) 
		return; 
	}
			
	function SetList(name){
		var lista1=document.inbox.targetFolder;
		var lista2=document.inbox.targetFolder2;
		var length=document.inbox.targetFolder.length;
		
		if (name=="targetFolder") {
			for (i=0; i<length; i++) {
				lista2(i).selected = lista1(i).selected
			}
		}
		else {
			for (i=0; i<length; i++) {
				lista1(i).selected = lista2(i).selected
			}
		}
		return;
	}	
	/*function abrir_ventana_code_paint(contenido){
    ventana=window.open("","","toolbar=yes,status=0,menubar=0,fullscreen=no,width=500,height=400,resizable=0,top=100,left=200");
	docum=ventana.document;
	docum.open();
	if(contenido==''){contenido='<img src="../img/icon_noticia.png"> El codigo no se puede procesar porque es probable que: <br><li>Utiliza Base de Datos</li><li>No esten definidas algunas variables esenciales para su funcionalidad</li><li> Incluye Parametros Ilegibles</li><li> Esta segmentado o dividido en partes</li><br><br><b><font color=red>Sugerencias:</font> Copie el codigo completo rellenando todos los parametros requeridos y ejecutelo en un servidor apto para este fin.</b>'; }
	docum.writeln('<title>Ejecutando Código fuente - Blasten.com </title><img src="../img/logo_blt_d_save.gif"><hr><font face="terminal" size=2>'+contenido+'<br><br><br><strong>&copy;2004-2005 Blasten.com Network</strong></font>');
	}*/
	
function PopUp(imagen,ancho,alto){
	var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no,width="+ancho+",height="+alto;
	ventana=window.open(imagen,"",opciones);
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}

function showimage()
{
if (!document.images)
return
document.images.pais.src=
'../img/img_country/'+document.registro.pais.options[document.registro.pais.selectedIndex].value+'.gif'
}
function Editor_CambiatextoAyuda(cual, Formulario, Campo)
	{
		if( cual == '' ) cual = "Esta es la ayuda del editor de textos Pase por encima de los botones para ayuda.";

		obj = document.getElementById(Formulario+'-'+Campo+'-ayuda');

		if( obj.innerHTML != cual )
		{
			obj.innerHTML = cual;
		}
	}
	
	function Editor_CompruebaSeleccion(Formulario,Campo)
	{
		if ( eval('document.' + Formulario + '.' + Campo + '.createTextRange') ) 
		{
			eval('document.' + Formulario + '.' + Campo + '.focus()');
			if( document.selection.createRange().duplicate().text.length > 0 )
			{
				return document.selection.createRange().duplicate().text;
			}
			else
			{
				return '';
			}
		}
		else 
		{
			return '';
		}
	}

	function Editor_Anadetexto(Which,Formulario,Campo) 
	{
		if ( eval('document.' + Formulario + '.' + Campo + '.createTextRange') ) 
		{
			eval('document.' + Formulario + '.' + Campo + '.focus()');
			document.selection.createRange().duplicate().text = Which;
			document.selection.empty();
		}
		else 
		{
			eval('document.' + Formulario + '.' + Campo + '.value += Which');
		}
	}


	function Editor_email(Formulario,Campo)
	{
		Seleccionado = Editor_CompruebaSeleccion(Formulario,Campo);
			
		txt1 = '';
		while( txt1 == '' && txt1 != null )
		{
			txt1 = prompt("Introduce la direccion de correo electronico.",Seleccionado);
			if( txt1 != null )
			{
				if( txt1.search(/^.+@{1}.+\.{1}.+/i) == -1 )
				{
					alert("El texto escrito no parece ser una direccion de correo electronico.\nIntentalo de nuevo.");
					txt1 = '';
				}
			}
		}
		if( txt1 != null )
		{
			txt2 = prompt("Introduce el texto para el enlace.\nSi lo dejas vacio se mostrara el email",Seleccionado);
			if( txt2 != null )
			{
				if( txt2 != '' )
				{
					Insertar = "[email=" + txt1 + "]" + txt2 + "[/email]";
				}
				else
				{
					Insertar = "[email=" + txt1 + "]" + txt1 + "[/email]";
				}
					
				Editor_Anadetexto(Insertar,Formulario,Campo);
			}
		}
	}

	function Editor_chsize(Size,Formulario,Campo) 
	{
		Seleccionado = Editor_CompruebaSeleccion(Formulario,Campo);
			
		if( Seleccionado == '' )
		{
			texto = prompt("Introduce el texto que tendra el nuevo tamaño "+Size,"");
		}
		else
		{
			texto = Seleccionado;
		}
		if( texto != null )
		{
			Editor_Anadetexto("[size="+Size+"]"+texto+"[/size]",Formulario,Campo);
		}
	}

	function Editor_normal(Titulo,letra,Formulario,Campo) 
	{
		Seleccionado = Editor_CompruebaSeleccion(Formulario,Campo);
		
		if( letra == 'img' )
		{
			txt1 = '';
			while( txt1 == '' && txt1 != null )
			{
				txt1 = prompt("Introduce la url de la imagen.",Seleccionado);
				if( txt1 != null )
				{
					if( txt1.search(/^(http:\/\/).+/i) == -1 )
					{
						alert("El texto escrito no parece ser una URL.\nIntentalo de nuevo (tiene que empezar por http:// seguido de la direccion)");
						txt1 = '';
					}
				}
			}
			
			if( txt1!=null ) 
			{
				Editor_Anadetexto("["+letra+"]"+txt1+"[/"+letra+"]",Formulario,Campo);
			}
		}
		else
		{
			if( Seleccionado == '' )
			{
				Seleccionado = prompt(Titulo,"");
			}

			if( Seleccionado != null )
			{
				if( letra == 'left' || letra == 'right' || letra == 'center' )
				{
					Editor_Anadetexto("["+letra+"]"+Seleccionado+"[/"+letra+"]",Formulario,Campo);
				}
				else
				{
					Editor_Anadetexto("["+letra+"]"+Seleccionado+"[/"+letra+"]",Formulario,Campo);
				}
			}
		}
	}

	function Editor_url(Formulario,Campo)
	{
		Seleccionado = Editor_CompruebaSeleccion(Formulario,Campo);
		txt1 = '';
		while( txt1 == '' && txt1 != null )
		{
			txt1 = prompt("Introduce una direccion URL.",Seleccionado);
			if( txt1 != null )
			{
				if( txt1.search(/^(http:\/\/).+/i) == -1 )
				{
					alert("El texto escrito no parece ser una URL.\nIntentalo de nuevo (tiene que empezar por http:// seguido de la direccion)");
					txt1 = '';
				}
			}
		}
		if( txt1 != null )
		{
			txt2 = prompt("Introduce el texto para el enlace.\nSi lo dejas vacio se mostrara la URL",Seleccionado);
			if( txt2 != null )
			{
				if( txt2 != '' )
				{
					Insertar = "[url=" + txt1 + "]" + txt2 + "[/url]";				}
				else
				{
					Insertar = "[url=" + txt1 + "]" + txt1 + "[/url]";				}
				
				Editor_Anadetexto(Insertar,Formulario,Campo);
			}
		}
	}

	function Editor_chcolor(color, Formulario, Campo)
	{
		Seleccionado = Editor_CompruebaSeleccion(Formulario,Campo);
			
		if( Seleccionado == '' )
		{
			texto = prompt("Introduce el texto que tendra el color "+color,"");
		}
		else
		{
			texto = Seleccionado;
		}
		if( texto != null )
		{
			Editor_Anadetexto("[color="+color+"]"+texto+"[/color]",Formulario,Campo);
		}
	}

	function Editor_flash(Formulario, Campo)
	{
		Seleccionado = Editor_CompruebaSeleccion(Formulario,Campo);
		width = '';
		height = '';
		url = '';

		while( width == '' && width!=null )
		{
			width = prompt("Introduce el ancho del flash (entre 1 y 1000 pixels).","");
			if( width != null )
			{
				if( width.search(/^[0-9]+$/i) == -1 || width<1 || width>1000 )
				{
					alert("El ancho no es valido.\nIntentalo de nuevo (entre 1 y 1000 pixels)");
					width = '';
				}
			}
		}

		if( width != null )
		{
			while( height == '' && height!=null )
			{
				height = prompt("Introduce el alto del flash (entre 1 y 1000 pixels).","");
				if( height != null )
				{
					if( height.search(/^[0-9]+$/i) == -1 || height<1 || height>1000 )
					{
						alert("El alto no es valido.\nIntentalo de nuevo (entre 1 y 1000 pixels)");
						height = '';
					}
				}
			}

			if( height!=null )
			{
				while( url == '' && url != null )
				{
					url = prompt("Introduce la direccion URL del flash.",Seleccionado);
					if( url != null )
					{
						if( url.search(/^(http:\/\/).+/i) == -1 )
						{
							alert("El texto escrito no parece ser una URL.\nIntentalo de nuevo (tiene que empezar por http:// seguido de la direccion)");
							url = '';
						}
					}
				}
			}

			if( url!=null )
			{
				Editor_Anadetexto("[flash width="+width+" height="+height+"]"+url+"[/flash]", Formulario, Campo);
			}
		}
	}

	function Editor_CambiatextoAyuda(cual, Formulario, Campo)
	{
		if( cual == '' ) cual = "Esta es la ayuda del editor de textos Pase por encima de los botones para ayuda.";

		obj = document.getElementById(Formulario+'-'+Campo+'-ayuda');

		if( obj.innerHTML != cual )
		{
			obj.innerHTML = cual;
		}
	}

	function Editor_MostrarHerramienta(cual, Formulario, Campo)
	{
		eval('dummy = '+Formulario+'_'+Campo);
		if( dummy != cual )
		{
			document.getElementById(Formulario+'-'+Campo+'-'+dummy).style.display = 'none';
			document.getElementById(Formulario+'-'+Campo+'-'+cual).style.display = '';
			eval(Formulario + '_' + Campo + '= "' + cual +'"');
		}
	}

var registro_texto = 'gamaemoticons';