<!--
var submitcount=0;
function checkSubmit() {
	if (submitcount == 0) {
      submitcount++;
      document.topicform.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 > 256) {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 showHELP() { //Revised July 2006
	var i,p,v,obj,args=showHELP.arguments;
	for (i=0; i<(args.length-2); i+=3) 
  		if ((obj=MM_findObj(args[i]))!=null) { 
			v=args[i+2];
    		if (obj.style) { 
				obj=obj.style;
				v=(v=='show')?'visible':(v='hide')?'hidden':v;
			}
    		obj.visibility=v;
		}
	}
	
function showMENU() { //David Speight 2004
	var i,p,v,obj,args=showMENU.arguments;
	for (i=0; i<(args.length-2); i+=3) 
  		if ((obj=MM_findObj(args[i]))!=null) { 
			v=args[i+2];
    		if (obj.style) { 
				obj=obj.style;
				v=(v=='show')?'visible':(v='hide')?'hidden':v;
			}
    		obj.visibility=v;
		}
	}

function MM_findObj(n, d) { //Revised July 2006
	var p,i,x; 
	if(!d) d=document;
		if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document;
			n=n.substring(0,p);
		}
	if(!(x=d[n])&&d.all) x=d.all[n];
	for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); 
	return x;
}

function MM_validateForm() { //Revised July 2006
	var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
	for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
		val=MM_findObj(args[i]);
    	if (val) { 
			nm=val.name; 
			if ((val=val.value)!="") {
      			if (test.indexOf('isEmail')!=-1) { 
					p=val.indexOf('@');
        			if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      				} 		
	  				else if (test!='R') { 
					num = parseFloat(val);
        			if (val!=''+num) errors+='- '+nm+' must contain a number.\n';
        			if (test.indexOf('inRange') != -1) { 
						p=test.indexOf(':');
          				min=test.substring(8,p); 
						max=test.substring(p+1);
          				if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
					} 
				} 
			} 				
			else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n';
		}
  	} 		
  	if (errors) alert('The following error(s) occurred:\n'+errors);
	document.MM_returnValue = (errors == '');
}

function MM_jumpMenu(targ,selObj,restore){ //Revised July 2006
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function confirmDELETE() { // Form Submit Button Confirmation
	return confirm('     Permanently\n         DELETE\n        this item?');
}

function confirmACTION() { // Form Submit Button Confirmation
	return confirm('     Permanently\n         CHANGE\n        this item?\n\n      ARE YOU SURE?');
}

function vcc_window620 (url) {
	win = window.open(url,"nw","status=no,location=no,"
	+"menubar=no,resizeable=no,toolbar=no,"
	+"directories=no,scrollbars=no,width=620,height=440");
}

function vcc_window900 (url) {
	win = window.open(url,"nw","status=no,location=no,"
	+"menubar=no,resizeable=no,toolbar=no,"
	+"directories=no,scrollbars=no,width=900,height=800");
}

function confirmDEACTIVATE() { // Form Submit Button Confirmation
	return confirm('     DEACTIVATE\n        this item?');
}
//-->