function showDialog(alert,container,title,content,nexturl)
{
	var htmlTag="";
	htmlTag+="<div id=\"dialog_wrapper\">";
	htmlTag+="<div id=\"dialog\">";
	htmlTag+="<div id=\"dialogtitle_wrapper\">";
	htmlTag+="<div id=\"dialog_title\">";
	htmlTag+=title;
	htmlTag+="</div>";
	htmlTag+="</div>";
	htmlTag+="<div id=\"dialog_content\">";
	if(alert)
	{
		htmlTag+="<img src=\"images/alert.gif\" align=\"left\" style=\"margin:5px 20px 10px 10px\" alt=\"alert\" />";
	}
	htmlTag+=content;
	htmlTag+="</div>";
	htmlTag+="<div id=\"dialog_button\">";
	htmlTag+="<input type=\"button\" name=\"btnclose\" id=\"btnclose\" onclick=\"closeDialog('"+container+"','"+nexturl+"');\" class=\"dialogbtn\" value=\"Close\" />";
	htmlTag+="</div>";
	htmlTag+="</div>";
	htmlTag+="</div>";
	containerId=document.getElementById(container);
	containerId.style.display="block";
	containerId.innerHTML="";
	containerId.innerHTML=htmlTag;
	width=10;
	height=20;
	left=4;
	top=3;
	if(!alert)
	{
		left=5;
		top=5;
		document.getElementById("dialog").style.width="55%";
		document.getElementById("dialog").style.height="400px";
		document.getElementById("dialog_content").style.height="320px";
	}
	document.getElementById("dialog_wrapper").style.width=(window.innerWidth-width)+"px";
	document.getElementById("dialog_wrapper").style.height=(window.innerHeight-height)+"px";
	document.getElementById("dialog").style.left=(window.innerWidth/left)+"px";
	document.getElementById("dialog").style.top=(window.innerHeight/top)+"px";
	document.getElementById("btnclose").focus();
}

function closeDialog(container,nexturl)
{
	containerId=document.getElementById(container);
	containerId.style.display="none";
	if(nexturl!="")
	{
		location.href=nexturl;
	}
}
