					function getScrollPos()
					{
						//return {y:document.documentElement.scrollTop, x:document.documentElement.scrollLeft};
						
						if (window.pageYOffset)
						{
							return {y:window.pageYOffset, x:window.pageXOffset};
						}
						if(document.documentElement && document.documentElement.scrollTop)
						{
							return {y:document.documentElement.scrollTop, x:document.documentElement.scrollLeft};
						}
						if(document.body)
						{
							return {y:document.body.scrollTop, x:document.body.scrollLeft};
						}
						return {x:0, y:0};
					}

					function getWindowSize()
					{
						
						if (window.innerWidth)
						{
							return {w:window.innerWidth, h:window.innerHeight};
						}
						if (document.documentElement && document.documentElement.clientWidth)
						{
							return {w:document.documentElement.clientWidth,
							h:document.documentElement.clientHeight};
						}
						if (document.body)
						{
							return {w:document.body.clientWidth, h:document.body.clientHeight};
						}
						
						return {w:0, h:0}
					}


function popupshowmessage(html,classname)
{
	var body=document.getElementById("index");
	
	var table,tbody,tr,td;
	
	
	table=document.createElement("TABLE");
	table.className=classname;
	table.style.position="absolute";
	table.style.zIndex=1000;
	var winsize=getWindowSize();
	var scroll=getScrollPos();
	table.style.top=(scroll.y+(winsize.h/2)-85)+"px";
	table.style.left=(scroll.x+(winsize.w/2-100))+"px";
	table.id="_popupshowmessage"
	tbody=document.createElement("TBODY");
	table.appendChild(tbody);
	tr=document.createElement("TR");
	tbody.appendChild(tr);
	td=document.createElement("TD");
	tr.appendChild(td);
	td.innerHTML='<BR/>'+html;
	td.innerHTML+='<BR/><BR/><CENTER><a href="#" onClick="document.getElementById(\'index\').removeChild(document.getElementById(\'_popupshowmessage\'))">[ Закрыть ]</a></CENTER>'
		
	body.appendChild(table);
}
