function get_args ( loc )
	{
	var args = new Object();
	var query = loc.search.substring ( 1 );
	var pairs = query.split ( ',' );
	for ( var i = 0; i < pairs.length; i++ )
		{
		var pos = pairs[i].indexOf ( '=' );
		if ( pos == -1 )
			continue;
		var arg_name = pairs[i].substring ( 0, pos );
		var arg_value = pairs[i].substring ( pos + 1 );
		args[arg_name] = unescape ( arg_value );
		}
	return args;
	}
	
// format_dollars
function format_dollars ( temp_value ) 
	{
	var value = parseFloat ( temp_value );
	var dollars;
	if ( Math.abs ( value ) <= 0.99 ) 
		dollars = '0';
	else 
		dollars = parseInt ( value );

	var cents = parseInt ( ( Math.abs ( value ) + .0008 - Math.abs ( dollars ) ) * 100, 10 );

	if ( eval ( cents ) <= 9 ) 
		cents = '0' + cents;

	var newString = dollars + '.' + cents;
	return ( newString );
	}

function is_blank ( str )
	{
	if ( !str )
		return true;

	if ( str.length == 0 ) 
		return true;

	var temp_str = str.replace ( /\s/g, '' );
	if ( temp_str.length == 0 ) 
		return true;

	return false;
	}

function is_numeric ( str )
	{
	if ( !str )
		return false;

	if ( str.length == 0 ) 
		return false;

	str.replace ( /\D/g, '' );
	if ( str.length > 0 ) 
		return true;

	return false;
	}

function open_dialog ( url, name, width, height )
	{
	var features = 'resizable=yes,scrollbars=yes';
	if ( ! width )
		width = 420;
	features += ',width=' + width;
	if ( ! height )
		height = 350;
	features += ',height=' + height;

	// alert ( "features=" + features );
	var w = window.open ( url, name, features, true );
	}

function remove_loc_hash ( loc )
	{
	var hash_pos = loc.href.lastIndexOf ( '#' );
	if ( hash_pos < 0 )
		return loc.href;
	else
		return loc.href.slice ( 0, hash_pos );
	}

