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() {
	getSize();

	iCenter = 0 + document.getElementById("center").clientHeight;
	iLeft = 0 + document.getElementById("leftcol").clientHeight; //force variable to be 0 in Safari when iLeft is 'undefined'
	iRight = 0 + document.getElementById("rightcol").clientHeight;

	strHref = document.location.href;
	//inside pages:
	if (strHref.indexOf("default.asp") == -1 && strHref != "http://whrproperty.demo.nmspace.net/" && strHref != "http://www.whrproperty.co.uk/" && strHref != "http://whrproperty.newdev.nm/") {
		iOffset = document.getElementById("top").clientHeight;
	}
	//home page:
	else {
		iOffset = document.getElementById("homebody").clientHeight + 250;
	}



	iSafariHeight = document.getElementById("rightcol").scrollHeight;	//safari
	iMozillaHeight = document.documentElement.scrollHeight; //moz
	//alert("safariheight = " + iSafariHeight + " - myHeight = " + myHeight);
	//alert("mozillaheight = " + iMozillaHeight + " - myHeight = " + myHeight);
	//alert("iCenter = " + iCenter);
	//alert("iLeft = " + iLeft);
	//alert("iRight = " + iRight);
	//alert("iOffset = " + iOffset);
	//alert(document.documentElement.scrollHeight);
	if (iSafariHeight > myHeight && iSafariHeight > iMozillaHeight) {
		document.getElementById("leftcol").style.height = iSafariHeight + "px";
		document.getElementById("rightcol").style.height = iSafariHeight + "px";
		//alert("done");
	}else{
		if (iMozillaHeight > myHeight) {
			document.getElementById("leftcol").style.height = iMozillaHeight + "px";
			document.getElementById("rightcol").style.height = iMozillaHeight + "px";
			//alert("done");
		}else if (iLeft < myHeight - iOffset && iRight < myHeight - iOffset) {

			document.getElementById("leftcol").style.height = myHeight - iOffset + "px";
			document.getElementById("rightcol").style.height = myHeight - iOffset + "px";

		}
		else if (iLeft > iRight) {
			document.getElementById("rightcol").style.height = iLeft + "px";
		}
		else if (iLeft < iRight) {
			document.getElementById("leftcol").style.height = iRight + "px";
		}
	}
}

function getSize() {
 // var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
   // myHeight = document.documentElement.scrollHeight;
   //alert(myHeight);
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
   // myHeight = document.documentElement.scrollHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
}

function changeLocationList() {
	number = document.getElementById("type").selectedIndex;
	//var box = document.getElementById("type");
	//var number = iOption; //box.options[box.selectedIndex].value;
	//alert(!number);
	//if (!number) return;
	var list = aryLocation[number];
	var box2 = document.getElementById("location");
	box2.options.length = 0;
	for(i=0;i<list.length;i++)
	{
		//alert(i);
		//box2.options[i] = new Option(list[i],list[i+1]);
		aryTemp = list[i].split(',');
		sText = aryTemp[0];
		sValue = aryTemp[1];
		box2.options[i] = new Option(sText,'location_' + sValue);
	}
}