﻿// JScript File
function empty(input,vText)  {
	
	 
   // var oSearch = document.getElementById('search_terms')
	if (input.value == vText) {
		input.value = '';
	}
	 
}

function newwindow(sURI,nWidth,nHeight) {
  var winl = 0;
  var wint = 0;
  var newWin = window.open(sURI, "enhanced", "width=" + nWidth + " ,height=" + nHeight + ",toolbar,menubar,status,top=" + wint + ",left=" + winl + ",resizable,scrollbars");
  return false;
}
function newwindow2(sURI,nWidth,nHeight,winl,wint) {
  var newWin = window.open(sURI, "enhanced", "width=" + nWidth + " ,height=" + nHeight + ",false,false,status,top=" + wint + ",left=" + winl + ",resizable,scrollbars");
  return false;
}
function newwindow2NoSize(sURI,nWidth,nHeight,winl,wint) {
  var newWin = window.open(sURI, "enhanced", "width=" + nWidth + " ,height=" + nHeight + ",false,false,status,top=" + wint + ",left=" + winl + ",resizable=false,scrollbars=false");
  return false;
}

function textCounter(field,cntfield,maxlimit) {

    if (field.value.length > maxlimit) {
    // if too long...trim it!
    field.value = field.value.substring(0, maxlimit);
    // otherwise, update 'characters left' counter
    }else{
    cntfield.value = maxlimit - field.value.length;
    }

}