/* Sets right ad height */
function setAdHeight() {
	var pageHeight = getWindowHeight();
	document.getElementById("rightsAds").style.height=pageHeight+"px";
}

function getWindowHeight() {
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = (window.innerHeight + window.scrollMaxY-213);
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = (document.body.scrollHeight-230);
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = (document.body.offsetHeight-230);
  	}
	//arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );

	return yWithScroll;
}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  setAdHeight();
});

