/**
* Bookmark Me Dictionary
* Based on Bookmark Us, Joomla Add to Bookmarks Module, by Michael Carico
* http://developer.joomla.org/sf/projects/bookmarkus
* (released under GNU/GPL License - http://www.gnu.org/copyleft/gpl.htm)
* merged with the ideas of http://www.howtocreate.co.uk exposed at
* http://www.howtocreate.co.uk/tutorials/index.php?tut=0&part=13
* 
**/

<!-- 
	
var agent = navigator.userAgent.toLowerCase();
var home_page = 'http://www.poraqui.net/diccionario/';
var home_title = 'Poraqui.net - Glosario de turismo y hostelerÃ­a';

if ( (agent.indexOf("msie") != -1))
	{
	var fav_bkm = 'favoritos';
	} else
	{
	var fav_bkm = 'marcadores';
	}
	
var home_tooltip_title = "Incluye el glosario de Poraqui.net entre tus " + fav_bkm;
var home_text_link = "AÃ±adir a " + fav_bkm;


if ((agent.indexOf("opera") != -1)) 
	{
	 document.write("<a href=\""+home_page+"\" title=\"" + home_title + "\" rel=\"sidebar\">" + home_text_link + "</a>");
	} else
	{
	  document.write("<a href=\"javascript:addBookmark('"+home_title+"','"+home_page+"');\" title=\"" + home_tooltip_title + "\" >" + home_text_link + "</a>");
	}


function addBookmark(title,url) {

  var msg_other = ' Lo siento, tu navegador no ejecuta esta opciÃ³n. \n' +
		'Utiliza la funciÃ³n para aÃ±adir marcadores de tu \n' + 
		'navegador manualmente.'
  var agent = navigator.userAgent.toLowerCase();


  if (agent.indexOf("opera") != -1) 
  {
    if (window.opera && window.print)
    {
      return true;
    } else 
    {
      alert(msg_other);
    }
  }  	
	else if ( window.sidebar && window.sidebar.addPanel ) {
		window.sidebar.addPanel( title, url, '' );
	} 
	else if( window.external && ( navigator.platform == 'Win32' ||
		  ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) {
		window.external.AddFavorite( url, title );
	}
	else if (agent.indexOf("webkit") != -1) {
		window.alert (' Lo siento, tu navegador no ejecuta esta opciÃ³n. \n' +
			'Pulsa CTRL + D para aÃ±adirnos a tus marcadores.');
	}
	else if (!window.print || agent.indexOf("mac") != -1) {
		window.alert (' Lo siento, tu navegador no ejecuta esta opciÃ³n. \n' +
			'Pulsa Command/Cmd + D para aÃ±adirnos a tus marcadores.');
	}
	 else if( document.layers ) {
			window.alert( 'Lo siento, tu navegador no ejecuta esta opción.\n' +
		'Para aÃ±adir esta dirección a tus marcadores,\n' +
		'pulsa Marcadores (Bookmarks)\n' +
		'y despuÃ©s AÃ±adir marcador (File Bookmark).' );
		} else {
			window.alert(msg_other);
		}
}
// -->
