function processExternals(){
	strHost = document.location.hostname;
	clLnks = document.links;
	for (i=0;i<clLnks.length;i++) {
		if ((clLnks[i].href.search(strHost) == -1 && clLnks[i].href.search('mailto:') == -1) && clLnks[i].href.search('http://') != -1){
			clLnks[i].target = "_blank";
		}
	}
	//NOTE: clLnks[i].href.search('http://') != -1 is because Safari only returns script name and not host name, leading to all Links opening in a new window
}

function adjustColHeights() {
	getDocSize();
	iLeft = document.getElementById("leftcol").clientHeight;
	iMiddle = document.getElementById("middlecol").clientHeight;
	iRight = document.getElementById("rightcol").clientHeight;
	iOffset = document.getElementById("top").clientHeight + document.getElementById("footer").clientHeight + 2 + 8; /*2 for top and footer borders, 8 for body margin top*/

	//alert("height = " + myHeight);
	//alert("left = " + iLeft);
	//alert("middle = " + iMiddle);
	//alert("right = " + iRight);
	//alert("offset = " + iOffset);

	//alert(iRight);

	if (iLeft < myHeight - iOffset && iMiddle < myHeight - iOffset && iRight < myHeight - iOffset) {
		document.getElementById("leftcol").style.height = myHeight - iOffset + "px";
		document.getElementById("middlecol").style.height = myHeight - iOffset + "px";
		document.getElementById("rightcol").style.height = myHeight - iOffset + "px";
		//alert("done");
	}
	else if (iLeft < iRight && iMiddle < iRight) {
		document.getElementById("leftcol").style.height = iRight + "px";
		document.getElementById("middlecol").style.height = iRight + "px";
	}
	else if (iLeft > iMiddle) {
		document.getElementById("middlecol").style.height = iLeft + "px";
		document.getElementById("rightcol").style.height = iLeft + "px";
	}
	else if (iLeft < iMiddle) {
		document.getElementById("leftcol").style.height = iMiddle + "px";
		document.getElementById("rightcol").style.height = iMiddle + "px";
	}

	strHost = document.location.hostname;
	strHref = document.location.href;
	////alert(strHref.indexOf('default'));
	if(strHref != 'http://' + strHost + '/' && (strHref.indexOf('default') == -1 && strHref.indexOf('#content') == -1)) {

		//iBottomBlockLeft = document.getElementById("viewcasestudies").clientHeight;
		//iBottomBlockMiddle = document.getElementById("howmuch").clientHeight;
		//iBottomBlockRight = document.getElementById("contactus").clientHeight;

		//alert(iBottomBlockLeft + ' ' + iBottomBlockMiddle + ' ' + iBottomBlockRight);

		if (1 == 2) {
			if (iBottomBlockLeft < iBottomBlockRight && iBottomBlockMiddle < iBottomBlockRight) {
				//alert("1");
				changeHeight("viewcasestudies","howmuch",iBottomBlockRight);
				//document.getElementById("viewcasestudies").style.height = iBottomBlockRight + "px";
				//document.getElementById("howmuch").style.height = iBottomBlockRight + "px";
			}
			else if (iBottomBlockMiddle < iBottomBlockLeft) {
				//alert("2");
				changeHeight("howmuch","contactus",iBottomBlockLeft);


			}
			else if (iBottomBlockLeft < iBottomBlockMiddle) {
				//alert("3");
				changeHeight("viewcasestudies","contactus",iBottomBlockMiddle);
				//document.getElementById("viewcasestudies").style.height = iBottomBlockMiddle + "px";
				//document.getElementById("contactus").style.height = iBottomBlockMiddle + "px";



			}
		


		if (iBottomBlockLeft < iBottomBlockMiddle) {
			changeHeight("howmuch",iBottomBlockMiddle);
		}
		else if (iBottomBlockMiddle < iBottomBlockLeft) {
			changeHeight("viewcasestudies",iBottomBlockLeft);
		}

		if (iBottomBlockLeft < iBottomBlockRight) {
			changeHeight("viewcasestudies",iBottomBlockRight);
			changeHeight("howmuch",iBottomBlockRight);
		}
		else if (iBottomBlockRight < iBottomBlockLeft) {
			changeHeight("contactus",iBottomBlockLeft);
		}
}//------------------------------------IP MOVED THIS FROM LINE 80
	}

}

function changeHeight_OLD(e1,e2,newheight) {
	clNodes = document.getElementById(e1).childNodes;
	for (iNode = 0; iNode < clNodes.length; iNode++) {
		if (clNodes[iNode].nodeType == 1) {
			document.getElementById(e1).childNodes[iNode].style.height = newheight + "px";
			break;
		} else {
			continue;
		}
	}
	clNodes = document.getElementById(e2).childNodes;
	for (iNode = 0; iNode < clNodes.length; iNode++) {
		if (clNodes[iNode].nodeType == 1) {
			document.getElementById(e2).childNodes[iNode].style.height = newheight + "px";
			break;
		} else {
			continue;
		}
	}
}

function changeHeight(e,newheight) {
	clNodes = document.getElementById(e).childNodes;
	for (iNode = 0; iNode < clNodes.length; iNode++) {
		if (clNodes[iNode].nodeType == 1) {
			document.getElementById(e).childNodes[iNode].style.height = newheight + "px";
			break;
		} else {
			continue;
		}
	}
}


function getDocSize() {
 // var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
}