var ecom = {};
ecom.showBlockMessage = function( message, query, error ) {
	if ( undefined == error ) {error = false;}
	query.find(".ecom_block_message,.ecom_block_error_message").remove();
	var mes = $("
"+message+"
");
	if ( error ) {
		mes.addClass("ecom_block_error_message");
	} else {
		mes.addClass("ecom_block_message");
	}
	mes.click( function() {
		$(this).fadeOut( "normal", function() {
			$(this).slideUp("slow", function() {
				$(this).remove();
			});
		} );
	} );
	query.prepend( mes );
}
ecom.showMessage = function ( message, error ) {
	if ( undefined == error ) {error=false;}
	jQuery(".ecom_message").click();
	var q = jQuery("").addClass( "ecom_message" );
	q.text( message );
	if ( error ) q.css( "color", "red" );
	q.css( "width", jQuery("body").width() );
	q.css( "padding", "16px" );
	q.css( "border", "solid 1px lightgreen" );
	q.css( "text-align", "center" );
	q.css( "background-color", "lightyellow" );
	var userAgent = window.navigator.userAgent.toLowerCase();
	if ( -1 < userAgent.indexOf("msie 6.0") ) {
		q.css( "position", "absolute" );
	} else {
		q.css( "position", "fixed" );
	}
	q.css( "left", "0" );
	q.css( "top", "0" );
	q.css( "z-index", "100" );
	q.hide();
	q.fadeIn( "fast" );
	jQuery("body").append(q);
//	q.click( function() {
//		jQuery(this).slideUp( "normal", function() {
//			jQuery(this).remove();
//		} );
//	} );
//	q.animate( {opacity: 1.0}, 5000, "swing", function() {
//		jQuery(this).animate( {opacity: 0.0, height: "0px"}, "normal", "linear", function() {
//			jQuery(this).remove();
//		} );
//	} );
	var target = q;
//	if ( -1 < userAgent.indexOf("msie 6.0") ) {
//		target = q;
//	} else {
//		target = plane;
//	}
	target.click( function() {
		q.animate( {opacity: 0.0, height: "0px"}, "normal", "linear", function() {
			jQuery(this).remove();
		} );
	} );
}
ecom.showErrorMessage = function( message ) {
	ecom.showMessage( message, true );
}
ecom.getUrlBase = function() {
	return 'http://311archives.jp';
}
ecom.getRootDirectory = function() {
	return "";
}