function mira_datos()
{
	if ( !document.f1.nombre.value=="")
	{
		if ( !document.f1.telf.value=="")
		{
			if ( !document.f1.mail.value=="")
			{
				if ( !document.f1.comentarios.value=="" && document.f1.comentarios.value.length>'10')
				{
					return true;
				}else{ alert("Introdusca un comentario superior a 10 caracteres"); };
			}else{ alert("Rellene el campo E-mail"); };
		}else{ alert("Introdusca un numero teléfonico"); };
	}else{ alert("Rellene el campo nombre"); };
	return false;
};	

function agregar(url, titulo)
{
try
{
	//FIREFOX
	window.sidebar.addPanel(titulo, url,"");	
}
catch(exception)
{
	//IEXPLORER
	window.external.AddFavorite( url, titulo);	
}
}

// ABREVENTANA
function abreventana(url, name, w, h, perc,scroll) {
        var winX = (screen.availWidth - w)*perc*.01;
        var winY = (screen.availHeight - h)*perc*.01;
        popupWin = window.open(url, name,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=' + w + ',height=' + h + ',left=' + winX + ',top=' + winY);
		// impide que si se queda detrass la ventan no la veamos más
		if ((document.window != null) && (!popupWin.opener)) 
             popupWin.opener = document.window; 
             popupWin.focus(); 

}

// RELOAD DE VENTANA DESDE LA QUE ESTÁ ABIERTA

function openURL(sURL) {
    opener.document.location = sURL;
}

// SELECT QUE TOMA ELEMENTOS DE OTRA VENTANA

<!-- Original:  Pankaj Mittal (pankajm@writeme.com) -->
<!-- Web Site:  http://www.fortunecity.com/lavendar/lavender/21 -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function small_window(myurl) {
var newWindow;
var props = 'scrollBars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,width=300,height=200';
newWindow = window.open(myurl, "Add_from_Src_to_Dest", props);
}
// Adds the list of selected items selected in the child
// window to its list. It is called by child window to do so.  
function addToParentList(sourceList) {
destinationList = window.document.forms[0].parentList;
for(var count = destinationList.options.length - 1; count >= 0; count--) {
destinationList.options[count] = null;
}
for(var i = 0; i < sourceList.options.length; i++) {
if (sourceList.options[i] != null)
destinationList.options[i] = new Option(sourceList.options[i].text, sourceList.options[i].value );
   }
}
// Marks all the items as selected for the submit button.  
function selectList(sourceList) {
sourceList = window.document.forms[0].parentList;
for(var i = 0; i < sourceList.options.length; i++) {
if (sourceList.options[i] != null)
sourceList.options[i].selected = true;
}
return true;
}

// Deletes the selected items of supplied list.
function deleteSelectedItemsFromList(sourceList) {
var maxCnt = sourceList.options.length;
for(var i = maxCnt - 1; i >= 0; i--) {
if ((sourceList.options[i] != null) && (sourceList.options[i].selected == true)) {
sourceList.options[i] = null;
      }
   }
}
//  End -->

