var divTop,divLeft,divWidth,docHeight,docWidth,objTimer,divHeight=0;
var spdivTop,spdivLeft,spdivWidth,spdivHeight,spdocHeight,spdocWidth,spobjTimer;
function fnGetShowMsg()
{
	try{
			if(document.getElementById("showMsg")){
					divTop = parseInt(document.getElementById("showMsg").style.top,10)
					divLeft = parseInt(document.getElementById("showMsg").style.left,10)
					divHeight = parseInt(document.getElementById("showMsg").offsetHeight,10)
					divWidth = parseInt(document.getElementById("showMsg").offsetWidth,10)
					docWidth = document.body.clientWidth;
					docHeight = document.body.clientHeight;
					document.getElementById("showMsg").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10 + 80;//  divHeight
					document.getElementById("showMsg").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth
					document.getElementById("showMsg").style.visibility="visible"
					objTimer = window.setInterval("moveDiv()",10)
			}
			
			
			if(document.getElementById("ipartSPMsg")){
					spdivTop = parseInt(document.getElementById("ipartSPMsg").style.top,10)
					spdivLeft = parseInt(document.getElementById("ipartSPMsg").style.left,10)
					spdivHeight = parseInt(document.getElementById("ipartSPMsg").offsetHeight,10)
					spdivWidth = parseInt(document.getElementById("ipartSPMsg").offsetWidth,10)
					spdocWidth = document.body.clientWidth;
					spdocHeight = document.body.clientHeight;
					document.getElementById("ipartSPMsg").style.top = parseInt(document.body.scrollTop,10) + spdocHeight - divHeight + 10 + 80;//  divHeight
					document.getElementById("ipartSPMsg").style.left = parseInt(document.body.scrollLeft,10) + spdocWidth - spdivWidth
					document.getElementById("ipartSPMsg").style.visibility="visible"
					tmp = (divHeight == 0) ? 10:50;
					spobjTimer = window.setInterval("moveDiv()", tmp)
			}
			
	}
	catch(e){}
}

function resizeDiv()
{
	try{
			if(document.getElementById("showMsg")){
					divHeight = parseInt(document.getElementById("showMsg").offsetHeight,10)
					divWidth = parseInt(document.getElementById("showMsg").offsetWidth,10)
					docWidth = document.body.clientWidth;
					docHeight = document.body.clientHeight;
					document.getElementById("showMsg").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)
					document.getElementById("showMsg").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
			}
			if(document.getElementById("ipartSPMsg")){
					spdivHeight = parseInt(document.getElementById("ipartSPMsg").offsetHeight,10)
					spdivWidth = parseInt(document.getElementById("ipartSPMsg").offsetWidth,10)
					spdocWidth = document.body.clientWidth;
					spdocHeight = document.body.clientHeight;
					document.getElementById("ipartSPMsg").style.top = spdocHeight - divHeight  - spdivHeight + parseInt(document.body.scrollTop,10)
					document.getElementById("ipartSPMsg").style.left = spdocWidth - spdivWidth + parseInt(document.body.scrollLeft,10)
			}
	}
	catch(e){}
}

function moveDiv()
{
	try{
			if(document.getElementById("showMsg")){
					if(parseInt(document.getElementById("showMsg").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10))){
							window.clearInterval(objTimer)
							objTimer = window.setInterval("resizeDiv()",1)
					}
					divTop = parseInt(document.getElementById("showMsg").style.top,10)
					document.getElementById("showMsg").style.top = divTop - 1
			}
			if(document.getElementById("ipartSPMsg")){
					if(parseInt(document.getElementById("ipartSPMsg").style.top,10) <= (spdocHeight - divHeight - spdivHeight + parseInt(document.body.scrollTop,10))){
							window.clearInterval(spobjTimer)
							spobjTimer = window.setInterval("resizeDiv()",1)
					}
					spdivTop = parseInt(document.getElementById("ipartSPMsg").style.top,10)
					document.getElementById("ipartSPMsg").style.top = spdivTop - 1
			}

	}
	catch(e){}
}
function closeDiv(msgName){
	document.getElementById(msgName).style.visibility='hidden';
}

