// JavaScript Document
var AlertDialog = Class.create();

AlertDialog.prototype = {

	initialize: function(id,wid,ht,startId,isClosable, containerId, type, content, titleHeader, ref) {
			this.ref = ref;
			var div = document.createElement("div");
			var table = document.createElement("table");
			table.width = wid-30;
			table.border="0";
			table.className = type;
			var row = table.insertRow(0);
//			row.height="1%";
//			row.height = ht-47;
			row.style.height="150px";
			var cell = row.insertCell(0);
			cell.valign="top";
			cell.innerHTML = content;
			div.appendChild(table);
			content = (div.innerHTML);
			if(type=="prompt") {
				Dialog.confirm(content, 
                   {width:wid, className: "alphacube", okLabel: "Yes", cancelLabel:"No", closable: false, title:"<b>"+titleHeader+"</b>", onOk:confirmDialog})
			} else {
				this.modal = new Modal(id,wid,ht,startId,isClosable,null,content,false,titleHeader);
			}
	},
	
	getRef: function() {
		return this.ref;
	}

};