var mainquerystring = "";
var sectionquerystring = "";
function GetXMLHttpObject() {
 try {XMLHttp=new ActiveXObject("Msxml2.XMLHTTP") }
 catch(e) {
  try {XMLHttp=new ActiveXObject("Microsoft.XMLHTTP")}
   catch(e) {XMLHttp=new XMLHttpRequest()}
 }
 return XMLHttp
}
function stateChanged() {
 if(XMLHttp.readyState==4 || XMLHttp.readyState=="complete") {
  document.getElementById('newsblock_container').innerHTML=XMLHttp.responseText
 }
}
function showNewsblocks(numberofblocks) {
 XMLHttp=GetXMLHttpObject()
 if(XMLHttp==null) {
  return
 }
 XMLHttp.onreadystatechange=stateChanged
 if(window.location.search.indexOf("main=")>0) {
  if(window.location.search.indexOf("&")>0) {endofstring=window.location.search.indexOf("&")} else {endofstring=window.location.search.length}
   mainquerystring = window.location.search.substring(window.location.search.indexOf("main=")+5, endofstring);
 }
 if(window.location.search.indexOf("section=")>0) {
   sectionquerystring = window.location.search.substring(window.location.search.indexOf("section=")+8, window.location.search.length);
 }
 else {sectionquerystring=""}
 if(mainquerystring!="contactus"&&mainquerystring!="documentation") {
  XMLHttp.open("GET","includes/rightcolumn.asp?main="+mainquerystring+"&section="+sectionquerystring+"&blocks="+numberofblocks+"&sid="+Math.random(),true)
  XMLHttp.send(null)
 }
}
function checkHeight() {
 if(document.documentElement.clientHeight>=778) {
 //Show 4 newsblocks
 document.getElementById('news_container').style.height='596px';
 document.getElementById('content_container').style.height='575px';
 document.getElementById('newsblock_helpoverlay').style.height='539px';
 if(document.getElementById('content')) {
  document.getElementById('content').style.height='524px';
 }
 showNewsblocks(4)
 }
 else {
 //Show 3 newsblocks
 document.getElementById('news_container').style.height='455px';
 document.getElementById('content_container').style.height='434px';
 document.getElementById('newsblock_helpoverlay').style.height='398px';
 if(document.getElementById('content')) {
  document.getElementById('content').style.height='383px';
 }
 showNewsblocks(3)
 }
setURLAlttext()
}
window.onload=checkHeight
window.onresize=checkHeight