// blur links
// this gets ride of that nasty dotted line surrounding links in focus on windows machines.
function blurLinks() {
	if(navigator.platform == "Win32" && document.getElementsByTagName) {
		var lnks = document.getElementsByTagName('a');
		var i;
	    for (i = 0; i < lnks.length; i++)
	    {
      	  lnks[i].onfocus = new Function("if(this.blur)this.blur()");
    	}
	}
}

// function to obtain the height of the client window.

function getWindowHeight() {
	var windowHeight = 0;
	if (typeof(window.innerHeight) == 'number') {
		windowHeight = window.innerHeight;
	} else {
		if (document.documentElement && document.documentElement.clientHeight) {
			windowHeight = document.documentElement.clientHeight;
		} else {
			if (document.body && document.body.clientHeight) {
				windowHeight = document.body.clientHeight;
			}
		}
	}
	return windowHeight;
}

// function to obtain the width of the client window.

function getWindowWidth()
{
  var windowWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    windowWidth = window.innerWidth;
  } else {
    if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      //IE 6+ in 'standards compliant mode'
      windowWidth = document.documentElement.clientWidth;
    } else {
      if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        windowWidth = document.body.clientWidth;
      }
    }
  }
  return windowWidth;
}

// function to adjust the primary div attributes and make the footer and bg look right.

function sizeUp() {
	if (document.getElementById) {
		var winHeight =  getWindowHeight();
		 if (winHeight > 0) {
			var content 		= document.getElementById('content') ? document.getElementById('content') : null;
			var sidebar 		= document.getElementById('right-column') ? document.getElementById('right-column') : document.getElementById('home-right-column') ?  document.getElementById('home-right-column') : null;
			var contentHeight 	= document.getElementById('content') ? document.getElementById('content').offsetHeight : 0;
			var sidebarHeight	= document.getElementById('right-column') ? document.getElementById('right-column').offsetHeight : document.getElementById('home-right-column') ?  document.getElementById('home-right-column').offsetHeight : 0;					
			if (sidebarHeight 	>= contentHeight) content.style.height = sidebarHeight + "px";
		}
	}
}
