<!--

var hoverBgColor = "white";
var hoverColor   = "green";
var days, months, now, day_of_week_int, day_of_month_int, month_int, year, today_date;
var bookmarkind="http://www.castelsardo.net";
var bookmarktit="Castelsardo.net";

function data_ita() {

var days = new Array ("Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato");
var months = new Array ("Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre");
now = new Date();
day_of_week_int  = now.getDay();
day_of_month_int = now.getDate();
month_int = now.getMonth();
year = now.getFullYear();
time = now.getHours() + ":" + now.getMinutes();

today_date = days[day_of_week_int] +", " + day_of_month_int + " "+ months[month_int] + ", " + year + " - " + time;
document.write(today_date);
}

function right(e) {
    if ((navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)) ||
    (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3))) {
        alert('Copyright 2001 : Castelsardo.net'); return false;
    }
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;


function hover(layer) {

  var link, str;

  link = layer.document.links[0];
  str = '<a href="' + link.href + '"';
  if (link.target)
    str += ' target= "' + link.target + '"'
  str += '><font color="' + hoverColor + '">' + link.text + '</font>';

  layer.hoverLayer = new Layer(layer.clip.width, layer);
  layer.hoverLayer.document.open("text/html", "replace");
  layer.hoverLayer.document.write(str);
  layer.hoverLayer.document.close();
  layer.hoverLayer.bgColor = hoverBgColor;

  layer.hoverLayer.visibility =  "show";

  layer.onMouseOver = hoverOn;
  layer.onMouseOut  = hoverOff;
}

function hoverOn() {

  this.hoverLayer.visibility = "show";
}

function hoverOff() {

  this.hoverLayer.visibility = "hide";
}

function StampaScheda()
    {	 
   
     NS=(navigator.appName=="Netscape");
    
     if (NS)
      {
       window.print();	 
      }
     else
      {
       var WebBrowser='<OBJECT ID="WebBrowser1" Width=0 Height=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
       document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
       WebBrowser1.ExecWB(6, 2);
       WebBrowser1.outerHTML="";
      }     
   }

function scroll(srctxt) {

  pos++;
  var scroller="";
  if (pos==lentxt) {
    pos=1-width;
  }
  if (pos<0) {
    for (var i=1; i<=Math.abs(pos); i++) {
      scroller=scroller+" ";}
    scroller=scroller+scrtxt.substring(0,width-i+1);
  }
  else {
    scroller=scroller+scrtxt.substring(pos,width+pos);
  }
  window.status = scroller;
     setTimeout("scroll()", 150);
  }

   
function apriwin(str,xx,yy,tit) 
{
if (screen.width>640)
	{finestra = window.open(str,'Castelsardo','scrollbars=no,resizable=no,status=no,location=no,toolbar=no');}
  else
	{finestra = window.open(str,'Castelsardo','scrollbars=yes,resizable=yes,width=600,height=400,status=no,location=no,toolbar=no');
	if (xx == 665) 
			{xx=610;
			yy=450;}
	else 	{xx=400;
			yy=450;}}


finestra.moveTo(0,0);
finestra.resizeTo(xx+80,yy+80);
finestra.focus();
}


function addbookmark() {

if (document.all)
window.external.AddFavorite(bookmarkind,bookmarktit)
}

function capitalizeAll(str1) {
  var str3 = "";
  var str2 = str1.split(" "); // spezzo la stringa secondo le parole
  for (i=0; i<str2.length; i++) {
    str3 += str2[i].substr(0,1).toUpperCase() + str2[i].substr(1) + " ";
  }
  return str3;
}

function capitalizeFirst(str1) 
{ 
str1 = str1.substr(0,1).toUpperCase() + str1.substr(1,str1.length-1); 
return str1; 
} 


//-->

