//alert("gets here");
function IsNumeric(t_string) {
   var t_validChars = "0123456789.";
   var b_num = true;
   var c_char;
 
   for (i = 0; i < t_string.length && b_num == true; i++) { 
      c_char = t_string.charAt(i); 
      if (t_validChars.indexOf(c_char) == -1) {
         b_num = false;
      }
   }
   return b_num;   
}

function checkemail(str){
//var str=document.validation.emailcheck.value
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
	if (filter.test(str)){
		testresults=true;
	}
	else{
	
		testresults=false;
	}
	return testresults;
}
//FUNCTION FOR THE EXPAND / COLLAPSE OF THE SUB SUB MENU ITEMS
function toggle(box,fontId,whichRow) {
 	//box is the id of the DIV tag
	//fontId is the id of the font tag
	//whichRow is the subscript of the repeating row
	var whichSign, plusSign, minusSign;
 	//whichSign is what the font tag is set to, it is a + to start with 
	whichSign = (document.getElementById(fontId + whichRow).innerHTML);
  	plusSign = '+'
	minusSign = '-'
	if (whichSign == '+'){
	//the default style of the DIV is set to none, reset that to block(which shows the DIV contents)
		if ((document.getElementById(box).style.display)=='none'){
			(document.getElementById(box).style.display) = "block";
		}
		//change the sign to minus when plus is cliked and change the display style of the DIV 
		document.getElementById(fontId + whichRow).innerHTML = minusSign;
		document.getElementById(box).style.display = "block";
	}
	else if (whichSign == '-'){
		document.getElementById(fontId + whichRow).innerHTML = plusSign;
		document.getElementById(box).style.display = "none";
	}
}