

function openWindow( URL, width, height, resizable, scrollbars)
{
  try
	{
		newWindow.close(); 
	}
	catch(e)
	{
				
	}

	newWindow=window.open( URL,'page',"status=no,location=no,menubar=no,toolbar=no,directories=no,resizable=" + resizable + ",scrollbars=" + scrollbars + ",width=" + width + ",height=" + height + ",screenX=100,screenY=100");	
    window.onerror = null;
} 



function getHeight(box) {
	var h;
	for(var x=0;x<box.length;x++){
	 	// set outer table
	 		h = document.getElementById(box[x]).offsetHeight;
      		for(var y=0;y<box.length;y++){
        		var test_h = document.getElementById(box[y]).offsetHeight;
        		if(h<test_h) h = test_h;
      		}  
		}
	return h;		
}		

function adjustHeight(box,h) {
	//set the height of all divs to the tallest
   	for(var x=0;x<box.length;x++) {
		document.getElementById(box[x]).style.height = h +"px";
	}
}


function setHeight(){
		var outerbox = new Array("lt-content","wht-divider","rt-content"); 		
		var innerbox = new Array("yllw");
	var h=getHeight(innerbox)+ 20;
	 adjustHeight(outerbox, h);	
}			

function setPopHeight(){
		var outerbox = new Array("wht-bk","text"); 		

	var h=getHeight(outerbox);
	 adjustHeight(outerbox, h);	
}			
	
	
function doProcessing() {
   document.getElementById('submitBtn').className = 'thide'; 
   document.getElementById('processing').className = 'tshow';
}


function focusForm() {
  document.form.FN.focus();
}
function autofocus(field, limit, next, evt) {
  evt = (evt) ? evt : event;
  var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode :
                 ((evt.which) ? evt.which : 0));
  if (field.value.length == limit) {
    field.form.elements[next].focus();
  }
}

