// JavaScript Document
<!--
String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}

function validateNum()
{
  if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;
}


function changeValue(action,fieldID,defaultValue)
{
	if(action == 'focus')	{ 
	  if(fieldID.value == defaultValue) {
			fieldID.value = '';
		}
	}
	if(action == 'blur') {
		if(fieldID.value == '') {
			fieldID.value = defaultValue;
		}
	}
}

function button(obj,mode){
	var td = obj; 
	if(mode == 'on'){
		td.style.cursor = 'hand';
		td.style.background = "#BA33BD";
		td.style.color = "#FFFFFF";
	}
	else{
		td.style.cursor = 'default';
		td.style.background = "#FFFFFF";
		td.style.color = "#BA33BD";
	}
}

function NewWindow(mypage,myname,w,h,scroll){
  var win= null;
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=yes';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
//-->