
<!--
// Go function for HV Menu- by Ger Versluis (http://www.burmees.nl/) (http://www.dynamicdrive.com)
function Go(){return}

// Popup Editor
function EditPage(pgID) {
	PopupEditor=window.open("/lib/editor.cfm?p="+pgID,"PopupEditor","width=775,height=550,status=0,resizable=1,scrollbars=0,menubar=0,toolbar=0");
	PopupEditor.focus();
}

// Bookmark this page
function AddToFavorites() {
	if (window.external) {
		window.external.AddFavorite(location.href,document.title);
	}
	else { 
		alert("Sorry, your browser doesn't support this function.");
	}
}

// Print this page
function printpage() { 
	window.print()
}

// Contact popup window
function ContactUs(Context) {	
	msgWindow = window.open("/ContactPopup.cfm?Context=" + Context,"","width=400,height=420,top="+((screen.height - 500) / 2)+",left="+((screen.width - 400) / 2)+",resizable,scrollbars");
}

// Change length of textarea
// http://www.flws.com.au/showusyourcode/codeLib/code/dynamicLength.asp?catID=2
var MIN_ROWS = 8 ;
var MAX_ROWS = 12 ;
var MIN_COLS = 11 ;
var MAX_COLS = 20 ;

function changeTextAreaLength ( e ) {

    var txtLength = e.value.length;
    var numRows = 0 ;
    var arrNewLines = e.value.split("\n");
    
    for(var i=0; i<=arrNewLines.length-1; i++){
        numRows++;
        if(arrNewLines[i].length > MAX_COLS-5) {
            numRows += Math.floor(arrNewLines[i].length/MAX_COLS)
        }   
    } 
    
    if(txtLength == 0){
	    e.cols = MIN_COLS ;
	    e.rows = MIN_ROWS ;
	} else {
	    
	    if(numRows <= 1) {
	        e.cols = (txtLength % MAX_COLS) + 1 >= MIN_COLS ? ((txtLength % MAX_COLS) + 1) : MIN_COLS ;
	    }else{
	        e.cols = MAX_COLS ;    
	        e.rows = numRows > MAX_ROWS ? MAX_ROWS : numRows < MIN_ROWS ? MIN_ROWS : numRows;
	    }
	}
}

//-->

