function IsEmpty(aTextField) {
   if ((aTextField.value.length==0) ||
   (aTextField.value==null)) {
      return true;
   }
   else { return false; }
}


function openW(mypage,myname,w,h,features) {
	if(screen.width){
		var winl = (screen.width-w)/2;
		var wint = (screen.height-h)/2;
	}else{winl = 0;wint =0;}
		if (winl < 0) winl = 0;
		if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += features;
	win = window.open(mypage,myname,settings);
	win.window.focus();
}


function limitAttach(extArray, thisform) {

	allowSubmit = false;
	filen = thisform.fileName.value;
	if (filen == "") return false;
	while (filen.indexOf("\\") != -1)
		filen = filen.slice(filen.indexOf("\\") + 1);
		ext = filen.slice(filen.indexOf(".")).toLowerCase();
	for (var i = 0; i < extArray.length; i++) {
		if (extArray[i] == ext) { allowSubmit = true; break; }
	}
	if (allowSubmit) thisform.submit();
	else
	alert("Please only choose a filename that ends in  " 
	+ (extArray.join("  ")) + "\nPlease select a new "
	+ "filename and submit again.");
	return false;
	
}



function calcHeight(thisEl)
{

  //find the height of the internal page
  var the_height=  thisEl.contentWindow.document.body.scrollHeight;
alert(the_height)
  //change the height of the iframe
  thisEl.height =  the_height;
}
            
