var winsubtitle='Trading Systems';
var body_height;
var elMain;

document.images;
elMain = document.getElementById('allthepage');
function addfav(){
 title = "Trading Systems .it"; 
 url = "http://www.tradingsystems.it";
 if (window.sidebar) { // Firefox
  window.sidebar.addPanel(title, url,"");
 } else if( window.external ) { // IE
  window.external.AddFavorite( url, title); }
 else if(window.opera && window.print) { // Opera
  return true; }
}

function setHome() {
 document.body.style.behavior='url(#default#homepage)';
 document.body.setHomePage('http://www.tradingsystems.it');
}

function checkHeight(){
 var page_height = document.getElementById('allthepage').offsetHeight;
 var copyr_height = document.getElementById('foot').offsetHeight;
 body_height = page_height+copyr_height;
 changeHeight();
}

function changeHeight(){
 var browser_height = document.body.clientHeight;
 var diff = browser_height - body_height;
 if (diff > 0)
  elMain.style.paddingBottom = diff + "px";
 else
  elMain.style.paddingBottom = "0";
}

function inizio(){
 checkHeight();
 if (window.attachEvent) {
  var rsz = function (){changeHeight();}
  window.attachEvent("onresize", rsz);
 }
}

window.onresize=changeHeight;

