<!-- Begin 
function currencyFormat(fld, milSep, decSep, e) {
	var sep = 0;
	var key = '';
	var i = j = 0;
	var len = len2 = 0;
	var strCheck = '0123456789';
	var aux = aux2 = '';
	var whichCode = (window.Event) ? e.which : e.keyCode;
	
	if (whichCode == 13) return true;  // Enter
		key = String.fromCharCode(whichCode);  // Get key value from key code
	if (strCheck.indexOf(key) == -1) return false;  // Not a valid key
		len = fld.value.length;
		for(i = 0; i < len; i++)
	if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
		aux = '';
		for(; i < len; i++)
	if (strCheck.indexOf(fld.value.charAt(i))!=-1) aux += fld.value.charAt(i);
		aux += key;
		len = aux.length;
		if (len == 0) fld.value = '';
		if (len == 1) fld.value = '0'+ decSep + '0' + aux;
		if (len == 2) fld.value = '0'+ decSep + aux;
		if (len > 2) {
		aux2 = '';
		for (j = 0, i = len - 3; i >= 0; i--) {
	if (j == 3) {
		aux2 += milSep;
		j = 0;
	}
		aux2 += aux.charAt(i);
		j++;
	}
		fld.value = '';
		len2 = aux2.length;
		for (i = len2 - 1; i >= 0; i--)
		fld.value += aux2.charAt(i);
		fld.value += decSep + aux.substr(len - 2, len);
	}
	return false;
}

function validate(field) {
	var valid = ".0123456789"
	var ok = "yes";
	var temp;
	for (var i=0; i<field.value.length; i++) {
	temp = "" + field.value.substring(i, i+1);
	if (valid.indexOf(temp) == "-1") ok = "no";
}

if (ok == "no") {
	alert("Invalid entry!  Only numbers are accepted!");
	field.focus();
	field.select();
	   }
} 

function checkLength(field) {
	var ok = "yes";
	for (var i=0; i<field.value.length; i++) {
	if (field.value.length >= 13) ok = "no";
}

if (ok == "no") {
	alert("Amount shouldn't be than more 9,999,999.99!");
	field.focus();
	field.select();
	   }
}

function isEmail(string) {

   if (!string) return false;
   var iChars = "*|,\"<:>[]{}`\';()&$#%?";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}    
                  
function isProper(string) {

   if (!string) return false;
   var iChars = "*|,\"<:>[]{}`\';()@&$#%?~";

   for (var i = 0; i < string.length; i++) {
      if (iChars.indexOf(string.charAt(i)) != -1)
         return false;
   }
   return true;
}   
                   
function isReady(form) {

	if (form.password.value == "") {
		alert("Please include your password.");
		form.password.focus();
		return false;
	}
	
	if (form.firstname.value == "") {
		alert("Please include your first name.");
		form.firstname.focus();
		return false;
	}
	
	if (form.surname.value == "") {
		alert("Please include your surname.");
		form.surname.focus();
		return false;
	}
	
    if (isEmail(form.email.value) == false) {
        alert("Please enter a valid email address.");
        form.email.focus();
        return false;
    }
	return true;
}

function checkrequired(which) {
	var pass=true;
	if  (document.images) {
		for (i=0;i<which.length;i++) {
		var tempobj=which.elements[i];
			if (tempobj.name.substring(0,8)=="required") {
			   if (((tempobj.type=="text"||tempobj.type=="textarea")&& tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&& tempobj.selectedIndex==0)) {
			   		
					pass=false;
					break;
					//return true;
		   		}
			}
	 	}
    }
	if (!pass) {
		shortFieldName=tempobj.name.substring(8,30).toUpperCase();
		alert("Please make sure the "+shortFieldName+" field was properly completed.");
		return false;
	}
	else
	return true;
}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

function DeleteObject(string){
var e = "document." + string
	if (confirm("This action is going to delete this record and are you okay with this?")){
		
		eval(e).submit();
	}
	return false;
}


function SelectAll(){
	for (var i=0;i<document.approval.elements.length;i++)	{
		var e = document.approval.elements[i];
		if (e.type=='checkbox'){
		e.checked = true;
		}
	}
}

function DeselectAll(){
	for (var i=0;i<document.approval.elements.length;i++)	{
		var e = document.approval.elements[i];
		if (e.type=='checkbox'){
		e.checked = false;
		}
	}
}

function doThePopUp(id){
theUrl="viewdescription.asp?id=" + id
reWin=window.open(theUrl,'hell','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=310,height=300,top=100,left=100')
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);




// Example:
// onMouseOver="toolTip('tool tip text here')";
// onMouseOut="toolTip()";
// -or-
// onMouseOver="toolTip('more good stuff', '#FFFF00', 'orange')";
// onMouseOut="toolTip()"; 
/*
MOVE this to the <body>:
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="JavaScript"><!--
initToolTips(); //--></script>
*/
var ns4 = document.layers;
var ns6 = document.getElementById && !document.all;
var ie4 = document.all;
offsetX = 0;
offsetY = 20;
var toolTipSTYLE="";
function initToolTips()
{
  if(ns4||ns6||ie4)
  {
    if(ns4) toolTipSTYLE = document.toolTipLayer;
    else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
    else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
    if(ns4) document.captureEvents(Event.MOUSEMOVE);
    else
    {
      toolTipSTYLE.visibility = "visible";
      toolTipSTYLE.display = "none";
    }
    document.onmousemove = moveToMouseLoc;
  }
}
function toolTip(msg, fg, bg)
{
  if(toolTip.arguments.length < 1) // hide
  {
    if(ns4) toolTipSTYLE.visibility = "hidden";
    else toolTipSTYLE.display = "none";
  }
  else // show
  {
    if(!fg) fg = "#000000";
    if(!bg) bg = "#FFFFFF";
    var content =
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><td>' +
    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + 
    '"><td align="left"><font face="sans-serif" color="' + fg +
    '" size="-2">&nbsp\;' + msg +
    '&nbsp\;</font></td></table></td></table>';
    if(ns4)
    {
      toolTipSTYLE.document.write(content);
      toolTipSTYLE.document.close();
      toolTipSTYLE.visibility = "visible";
    }
    if(ns6)
    {
      document.getElementById("toolTipLayer").innerHTML = content;
      toolTipSTYLE.display='block'
    }
    if(ie4)
    {
      document.all("toolTipLayer").innerHTML=content;
      toolTipSTYLE.display='block'
    }
  }
}
function moveToMouseLoc(e)
{
  if(ns4||ns6)
  {
    x = e.pageX;
    y = e.pageY;
  }
  else
  {
    x = event.x + document.body.scrollLeft;
    y = event.y + document.body.scrollTop;
  }
  toolTipSTYLE.left = x + offsetX;
  toolTipSTYLE.top = y + offsetY;
  return true;
}


function setlen()
{
	if (document.rcm.message.value.length > 255 )
	{
		document.rcm.message.value= document.rcm.message.value.substring(0,255);
		alert("Your message contains more than 255 characters");
	}
	document.rcm.lentxt.value =+255-document.rcm.message.value.length
	return true
}

function valid(str)
{
	var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; // not valid
	var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/; // valid
	if (!reg1.test(str) && reg2.test(str)) { // if syntax is valid
		return true;
	}
	return false;
}

function openw(url) { 
	var jumpToHere;
	var winOptions;
	var popUpWindow;
	//alert(url);
	jumpToHere = url;
	
	winOptions = "top=100,left=200,width=640,height=500,scrollbars=yes";
	popUpWindow = open(jumpToHere, "MyWindow22", winOptions);
}

//function click() {
//if (event.button==2) {
//alert('Sorry the right button has been blocked !');
//}
//}
//document.onmousedown=click

//  End -->
