/**
* Bookmark Me Home
* 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';
var home_title = 'Poraqui.net - Portal de turismo, hosteler&iacute;a y ocio';

if ((agent.indexOf("msie") != -1) || (agent.indexOf("safari") != -1) && (agent.indexOf("chrome")  == -1 ))
	{
	var fav_bkm = 'favoritos';
	} else
	{
	var fav_bkm = 'marcadores';
	}
	
var home_tooltip_title = "Incluye Poraqui.net entre tus " + fav_bkm;
var home_text_link = "A&ntilde;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 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 ) { // Firefox 
		window.sidebar.addPanel( title, url, '' );
	} 
	else if ( agent.indexOf('webkit') > -1 ) { // Safari & Chrome 
		 window.alert('Lo siento, tu navegador no ejecuta esta opción.\n' +
		'Para agregar esta página a tus ' + fav_bkm +'\n' +
		'pulsa Ctrl+D (Comando+D en Mac)');
	} 	
	else if( window.external && ( navigator.platform == 'Win32' ||
		  ( window.ScriptEngine && ScriptEngine().indexOf('InScript') + 1 ) ) ) { // Could be IE or Chrome
		  if(window.ActiveXObject) {  // IE
		  window.external.AddFavorite( url, title);
		  } 
	}	
	 else if( document.layers ) { // Old Netscape browsers
			window.alert( 'Lo siento, tu navegador no ejecuta esta opción.\n' +
		'Para agregar esta dirección a tus marcadores,\n' +
		'pulsa Marcadores (Bookmarks)\n' +
		'y después Añadir marcador (File Bookmark).' );
		} else {
			window.alert(msg_other);
		}
}
// -->
