text: var msgBoxImagePath = "thirdpartypackage/jqueryMsgBox/css/images/";
  jQuery.msgBox = msg;
  function msg(g) {
  	var e = false;
  	var D = typeof g;
  	var u = {
  		content : (D == "string" ? g : "Message"),
  		title : "Warning",
  		type : "alert",
  		autoClose : false,
  		timeOut : 0,
  		showButtons : true,
  		buttons : [ {
  			value : "Ok"
  		} ],
  		inputs : [ {
  			type : "text",
  			name : "userName",
  			header : "User Name"
  		}, {
  			type : "password",
  			name : "password",
  			header : "Password"
  		} ],
  		success : function(H) {
  		},
  		beforeShow : function() {
  		},
  		afterShow : function() {
  		},
  		beforeClose : function() {
  		},
  		afterClose : function() {
  		},
  		opacity : 0.1
  	};
  	g = D == "string" ? u : g;
  	if (g.type != null) {
  		switch (g.type) {
  		case "alert":
  			g.title = g.title == null ? "Warning" : g.title;
  			break;
  		case "info":
  			g.title = g.title == null ? "Information" : g.title;
  			break;
  		case "error":
  			g.title = g.title == null ? "Error" : g.title;
  			break;
  		case "confirm":
  			g.title = g.title == null ? "Confirmation" : g.title;
  			g.buttons = g.buttons == null ? [ {
  				value : "Yes"
  			}, {
  				value : "No"
  			}, {
  				value : "Cancel"
  			} ] : g.buttons;
  			break;
  		case "prompt":
  			g.title = g.title == null ? "Log In" : g.title;
  			g.buttons = g.buttons == null ? [ {
  				value : "Login"
  			}, {
  				value : "Cancel"
  			} ] : g.buttons;
  			break;
  		default:
  			z = "alert.png"
  		}
  	}
  	g.timeOut = g.timeOut == null ? (g.content == null ? 500
  			: g.content.length * 70) : g.timeOut;
  	g = $.extend(u, g);
  	if (g.autoClose) {
  		setTimeout(v, g.timeOut)
  	}
  	var z = "";
  	switch (g.type) {
  	case "alert":
  		z = "alert.png";
  		break;
  	case "info":
  		z = "info.png";
  		break;
  	case "error":
  		z = "error.png";
  		break;
  	case "confirm":
  		z = "confirm.png";
  		break;
  	default:
  		z = "alert.png"
  	}
  	var n = "msgBox" + new Date().getTime();
  	var G = n;
  	var t = n + "Content";
  	var o = n + "Image";
  	var B = n + "Buttons";
  	var q = n + "BackGround";
  	var C = "";
  	$(g.buttons).each(
  			function(H, I) {
  				C += '<input class="msgButton" type="button" name="' + I.value
  						+ '" value="' + I.value + '" />'
  			});
  	var f = "";
  	$(g.inputs).each(
  			function(I, H) {
  				var J = H.type;
  				if (J == "checkbox" || J == "radiobutton") {
  					f += '<div class="msgInput"><input type="'
  							+ H.type
  							+ '" name="'
  							+ H.name
  							+ '" '
  							+ (H.checked == null ? "" : "checked ='"
  									+ H.checked + "'") + ' value="'
  							+ (typeof H.value == "undefined" ? "" : H.value)
  							+ '" /><text>' + H.header + "</text></div>"
  				} else {
  					f += '<div class="msgInput"><span class="msgInputHeader">'
  							+ H.header + '<span><input type="' + H.type
  							+ '" name="' + H.name + '" value="'
  							+ (typeof H.value == "undefined" ? "" : H.value)
  							+ '" /></div>'
  				}
  			});
  	var w = "<div id=" + q + ' class="msgBoxBackGround"></div>';
  	var p = '<div class="msgBoxTitle">' + g.title + "</div>";
  	var k = '<div class="msgBoxContainer"><div id=' + o
  			+ ' class="msgBoxImage"><img src="' + getServerURL()
  			+ "web/themes/default/" + msgBoxImagePath + z
  			+ '"/></div><div id=' + t + ' class="msgBoxContent"><p><span>'
  			+ g.content + "</span></p></div></div>";
  	var h = "<div id=" + B + ' class="msgBoxButtons">' + C + "</div>";
  	var a = '<div class="msgBoxInputs">' + f + "</div>";
  	var m;
  	var j;
  	var c;
  	var l;
  	var d;
  	if (g.type == "prompt") {
  		$("html").append(
  				w + "<div id=" + G + ' class="msgBox">' + p + "<div>" + k
  						+ (g.showButtons ? h + "</div>" : "</div>") + "</div>");
  		m = $("#" + G);
  		j = $("#" + t);
  		c = $("#" + o);
  		l = $("#" + B);
  		d = $("#" + q);
  		c.remove();
  		l.css({
  			"text-align" : "center",
  			"margin-top" : "5px"
  		});
  		j.css({
  			width : "100%",
  			height : "100%"
  		});
  		j.html(a)
  	} else {
  		$("html").append(
  				w + "<div id=" + G + ' class="msgBox">' + p + "<div>" + k
  						+ (g.showButtons ? h + "</div>" : "</div>") + "</div>");
  		m = $("#" + G);
  		j = $("#" + t);
  		c = $("#" + o);
  		l = $("#" + B);
  		d = $("#" + q)
  	}
  	var A = m.width();
  	var y = m.height();
  	var s = $(window).height();
  	var F = $(window).width();
  	var x = s / 2 - y / 2;
  	var i = F / 2 - A / 2;
  	E();
  	function E() {
  		if (e) {
  			return
  		}
  		m.css({
  			opacity : 0,
  			top : x - 50,
  			left : i
  		});
  		m.css("background-image", "url('" + getServerURL()
  				+ "/web/themes/default/" + msgBoxImagePath
  				+ "msgBoxBackGround.png')");
  		d.css({
  			opacity : g.opacity
  		});
  		g.beforeShow();
  		d.css({
  			width : $(document).width(),
  			height : r()
  		});
  		$(G + "," + q).fadeIn(0);
  		m.animate({
  			opacity : 1,
  			top : x,
  			left : i
  		}, 200);
  		setTimeout(g.afterShow, 200);
  		e = true;
  		$(window).bind("resize", function(M) {
  			var J = m.width();
  			var H = m.height();
  			var N = $(window).height();
  			var I = $(window).width();
  			var L = N / 2 - H / 2;
  			var K = I / 2 - J / 2;
  			m.css({
  				top : L,
  				left : K
  			})
  		})
  	}
  	function v() {
  		if (!e) {
  			return
  		}
  		g.beforeClose();
  		m.animate({
  			opacity : 0,
  			top : x - 50,
  			left : i
  		}, 200);
  		d.fadeOut(300);
  		setTimeout(function() {
  			m.remove();
  			d.remove()
  		}, 300);
  		setTimeout(g.afterClose, 300);
  		e = false
  	}
  	function r() {
  		var H = document;
  		return Math.max(Math.max(H.body.scrollHeight,
  				H.documentElement.scrollHeight), Math.max(H.body.offsetHeight,
  				H.documentElement.offsetHeight), Math.max(H.body.clientHeight,
  				H.documentElement.clientHeight))
  	}
  	function b() {
  		m.fadeOut(200).fadeIn(200)
  	}
  	$("input.msgButton").click(function(J) {
  		J.preventDefault();
  		var H = $(this).val();
  		if (g.type != "prompt") {
  			g.success(H)
  		} else {
  			var I = [];
  			$("div.msgInput input").each(function(M, K) {
  				var L = $(this).attr("name");
  				var O = $(this).val();
  				var N = $(this).attr("type");
  				if (N == "checkbox" || N == "radiobutton") {
  					I.push({
  						name : L,
  						value : O,
  						checked : $(this).attr("checked")
  					})
  				} else {
  					I.push({
  						name : L,
  						value : O
  					})
  				}
  			});
  			g.success(H, I)
  		}
  		v()
  	});
  	d.click(function(H) {
  		if (!g.showButtons || g.autoClose) {
  			v()
  		} else {
  			b()
  		}
  	})
  };