
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


function cibex() {
h=window.open('./cibexplainx.htm','popup','width=600,height=400,scrollbars=1');
	h.focus();
	return false;
}

function garden() {
h=window.open('./millbrook_v2.htm','popup','width=800,height=500,resizable=1,scrollbars=1,toolbar=yes');
	h.focus();
	return false;
}

function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please make sure that the "+shortFieldName+" field has something in it.");
return false;
}
else
return true;
}

function textCounter(field, countfield, maxlimit) {
  if (field.value.length > maxlimit)
    field.value = field.value.substring(0,maxlimit);
else
countfield.value = maxlimit - field.value.length;
}

