function Clock(){
   var time = new Date();
   var gmtMS = time.getTime() + (time.getTimezoneOffset() * 60000);
   var gmtTime =  new Date(gmtMS);
   var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
   var monNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
   var hour = gmtTime.getHours() + 1;
   var minute = gmtTime.getMinutes();
   var second = gmtTime.getSeconds();
   var temp = "" + ((hour < 10) ? "0" : "") + hour;
   temp += ((minute < 10) ? ":0" : ":") + minute;
   temp += ((second < 10) ? ":0" : ":") + second;
   document.getElementById('date').innerHTML = "" + dayNames[time.getDay()] + ", " + time.getDate() + " " + monNames[time.getMonth()] + "&nbsp;" + time.getFullYear() + "&nbsp;" + temp;
   setTimeout("Clock()",1000)
   }
   
var xmlhttp
function weather(str)
{
if (str.length==0)
  {
  document.getElementById("weather_home").innerHTML="";
  return;
  }
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null){
  return false;
}
var url="/nautilus/weather_detailed.php";
url=url+"?q=barcelona";
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged_w;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged_w()
{
if (xmlhttp.readyState==4)
  {
  document.getElementById("weather_home").innerHTML=xmlhttp.responseText;
  }
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
function BR_BM(){title=document.title;url=document.location.href;if(window.sidebar){window.sidebar.addPanel(title,url,"")}else{if(window.external){window.external.AddFavorite(url,title)}}}var BrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(d){for(var a=0;a<d.length;a++){var b=d[a].string;var c=d[a].prop;this.versionSearchString=d[a].versionSearch||d[a].identity;if(b){if(b.indexOf(d[a].subString)!=-1){return d[a].identity}}else{if(c){return d[a].identity}}}},searchVersion:function(b){var a=b.indexOf(this.versionSearchString);if(a==-1){return}return parseFloat(b.substring(a+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"Chrome",identity:"Chrome"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.userAgent,subString:"iPhone",identity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};BrowserDetect.init();var BR=BrowserDetect.browser;var openedPopUp=false;function Popup(b,a,f,e){var d=location.hostname;if(window==top){window.top.name="opener"}var c=window.open(b,a,f);if(c){openedPopUp=true}if(c&&c.opener){if(openerUrl){c.opener.location=e}}if(c){c.focus()}}function pophelp(){var f="http://barcelonareporter.com/nautilus/docs/make_home.php?lp="+BR;var e="Set homepage manually in "+BR;var h="width=550,height=250";var g=document.location.href;Popup(f,e,h,g)}function CreateBML(){if(BR=="Firefox"){document.write("<span class='bookfront'><a class='booker' href='#' onClick='BR_BM(); return false;'>Bookmark</a> or set us your <a class='booker' href=\"#\" onClick=\"pophelp(); return false;\">homepage</a>!</span>")}else{if(BR=="Chrome"){document.write("<span class='bookfront'><a class='booker' href='#' onClick='alert(\"Press Control + D to bookmark this page!\"); return false;'>Bookmark</a> or set us your <a class='booker' href=\"#\" onClick=\"pophelp(); return false;\">homepage</a>!</span>")}else{if(BR=="Opera"){document.write("<span class='bookfront'><a class='booker' href='"+document.location.href+"' rel='sidebar'>Bookmark</a> or set us your <a class='booker' href=\"#\" onClick=\"pophelp(); return false;\">homepage</a>!</span>")}else{if(BR=="Safari"){document.write("<span class='bookfront'><a class='booker' href='#' onClick='alert(\"Press Control + D to bookmark this page!\"); return false;'>Bookmark</a> or set us your <a href=\"#\" onClick=\"pophelp(); return false;\">homepage</a>!</span>")}else{if(BR=="Explorer"){document.write("<span class='bookfront'><a class='booker' href='#' onClick='BR_BM(); return false;'>Bookmark</a> or set us your <a class='booker' href=\"#\" onClick=\"this.style.behavior='url(#default#homepage)'; this.setHomePage(location.href);\">homepage</a>!</span>")}}}}}};
