<!--
window.onerror=null;
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);

if(browserName=="Netscape" && browserVer >= 3) ver = "yes";
else ver = "yes";

function active(imgName)
{
  if (ver == "yes")  {
    img1 = "img/" + imgName + "_on.gif";
    document [imgName].src = img1;
  }
}

function inactive(imgName){
  if (ver == "yes")  {
    img2 = "img/" + imgName + "_off.gif";
    document [imgName].src = img2;
  }
}

function popup_news(row) {
  var w = 360;
  var h = 350;
  var l = Math.floor((screen.width-w)/2);
  var t = Math.floor((screen.height-h)/2);
  window.open("popup_news.php?row=" + row, '', "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ", menubar=no, toolbar=no, status=no, directories=no, location=no,  resizable=no, scrollbars=yes");
}

function popup_photo(photo) {
  //var w = 550;
  //var h = 460;
  var w = 850;
  var h = 660;
  var l = Math.floor((screen.width-w)/2);
  var t = Math.floor((screen.height-h)/2);
  window.open('popup_photo.php?photo='+photo, '', "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ", menubar=no, toolbar=no, status=no, directories=no, location=no,  resizable=no, scrollbars=yes,");
}

function popup_mes() {
  var w = 360;
  var h = 350;
  var l = Math.floor((screen.width-w)/2);
  var t = Math.floor((screen.height-h)/2);
  window.open("popup_mes.php", '', "width=" + w + ",height=" + h + ",top=" + t + ",left=" + l + ", menubar=no, toolbar=no, status=no, directories=no, location=no,  resizable=no, scrollbars=yes,");
}

function popup_news_onload() {
  window.open('popup_news_onload.php','IMPORTANT',"width=690, height=600, top=100, left=100, menubar=no, toolbar=no, status=no, directories=no, location=no,  resizable=yes, scrollbars=yes");
}

var oldString = "";
<!--
function countChars(d)
{
  if (document.sms.testosms.value.length> 100) {
    document.sms.testosms.value = oldString;
  }
  else {
    document.sms.rimasti1.value = 100 - document.sms.testosms.value.length;
    oldString = document.sms.testosms.value.substring(0,100);
  }
}
//-->
