/* <------ Digitise Default JavaScript v1.0 STARTS ------> */

// This function opens a pop-up window from the parent window with options. Feel free to alter the values.
function openWindow(url) {
  popupWin = window.open(url, 'popup', 'toolbar,scrollbars,resizable,width=650,height=400,left=30,top=30');
}

function confirmDelete(recID)
{
	if(confirm("Are You Sure You Want to Delete This Item?"))
	{
		document.deleteUser.id.value=recID;
		document.deleteUser.submit();
	}
}

/* <------ Digitise Default JavaScript v1.0 ENDS ------> */

/* <------ Word Counter for the Registration Forms STARTS ------> */

/* The JavaScript Source!! http://javascript.internet.com */
   var submitcount=0;
   function checkSubmit() {

      if (submitcount == 0)
      {
      submitcount++;
      document.Surv.submit();
      }
   }


function wordCounter(field, countfield, maxlimit) {
wordcounter=0;
for (x=0;x<field.value.length;x++) {
      if (field.value.charAt(x) == " " && field.value.charAt(x-1) != " ")  {wordcounter++}  // Counts the spaces while ignoring double spaces, usually one in between each word.
      if (wordcounter >= maxlimit) {field.value = field.value.substring(0, x);}
      else {countfield.value = maxlimit - wordcounter;}
      }
   }

function textCounter(field, countfield, maxlimit) {
  if (field.value.length > maxlimit)
      {field.value = field.value.substring(0, maxlimit);}
      else
      {countfield.value = maxlimit - field.value.length;}
  }
function checkSelect(objSelect,objForm) {
	if (objSelect.options[objSelect.selectedIndex].value != "")
	{
		objForm.submit();	
	}
}

/* <------ Word Counter for the Registration Forms ENDS ------> */

/* <------ thawte certificate and test login STARTS ------> */

function OpenCertDetails() {
	thewindow = window.open('https://www.thawte.com/cgi/server/certdetails.exe?code=NZSOUTX2', 'anew',config='height=512,width=517,left=50,top=50,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,directories=no,status=yes');
 }
 
  function openWindow1(url) {
  popupWin = window.open(url, 'popup', 'toolbar,scrollbars,resizable,width=420,height=380,left=140,top=30')
}

/* <------ thawte certificate and test login ENDS ------> */
