function popup( url, width, height ) {
	var w=(typeof  width != 'undefined' ? width : 500);
	var h= (typeof height != 'undefined' ? height : 250);
	window.open( url, 'popup', 'resizable=1,status=1,scrollbars=1,toolbar=0,location=0,menubar=0,height=' + h + ',width=' + w);
}
function help( url, width, height ) {
	var w=(typeof  width != 'undefined' ? width : 635);
	var h= (typeof height != 'undefined' ? height :400);
	window.open( url, 'help', 'resizable=1,status=1,scrollbars=1,toolbar=0,location=0,menubar=0,height=' + h + ',width=' + w);
}
function trim(str) {
	str = str.replace(/^\s+/, '');
	 for (var i = str.length - 1; i >= 0; i--) {
		 if (/\S/.test(str.charAt(i))) {
		 str = str.substring(0, i + 1);
		 break;
	 }
	}
	 return str;
}
function commaNewLine(e) {
	if( !e ) {
     		if( window.event ) {  e = window.event; } else { return; }
	  }
	var targ;
	if ( e.keyCode == 188) {
		if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; 
	  	targ.value= targ.value + "\n";
  	}
}
function showAddress( ) {
	if ( dojo.byId('addr-2').style.display == 'none' | dojo.byId('addr-2').style.display=='' ) {
		dojo.byId( 'addr-2' ).style.display = 'block';
	} else { 
		dojo.byId( 'addr-3').style.display = 'block';
		dojo.byId('addr-add').style.display= 'none';
	}
}
function cancel() {
	history.back();
}
