ashoe.view.ViewCommon = {
	showText : function(text, title) {
		var ref = document.getElementById("basketView")
		var s = "<table class='textInfoTable'>"
		s += "<tr>"
		s += "<th class='textInfoHeader'>"
		s += "<div style='position:relative'>"
		s += "<div class='textInfoTitle'>"
		s += title
		s += "</div>"
		s += "<div class='textInfoClose pointerCursor' onclick='ashoe.Ashoe.tabView.back()'>"
		s += "</div>"
		s += "</div>"
		s += "</th>"
		s += "</tr>"
		s += "<tr>"
		s += "<td class=''><div class='textViewDiv'>"
		s += text
		s += "</div></td>"
		s += "</tr>"
		s += "</table>"
		document.getElementById("textView").innerHTML = s
		ashoe.Ashoe.tabView.selectById("textView", true)
	},
	showLoadingState : function() {
		ashoe.Ashoe.tabView.selectById("loadingView", false)
	},
	operationState : function(show) {
		document.getElementById("operationLayer").style.display = show ? "block"
				: "none";
	},
	/**
	 * Using: ashoe.view.ViewCommon.formatPrice()
	 * 
	 * @param {Number}
	 *            val fractional
	 * @param {Number}
	 *            format
	 */
	formatPrice : function(val, format) {
		var part2 = " zł"
		if (format != undefined) {
			if (format == 1) {
				part2 = " -"
			} else if (format == 2) {
				part2 = ""
			}
		}
		return val + part2
	},
	showMessage : function(msg) {
		$('body').showMessage({thisMessage:		[msg]
		    ,position:			'bottom'
		    ,opacity:			70
		    ,useEsc:false,
			displayNavigation:		true,
			autoClose:			true,
			delayTime:			3000})
	}
}


