
	//function to get frame dimension
	function getFrameDimension (dim)
	{
		//only supports frame width and height
		//find the width and height of the iFrame
		if (self.innerWidth)
		{
			oframeWidth = self.innerWidth;
			oframeHeight = self.innerHeight;
		}
		else if (document.documentElement && document.documentElement.clientWidth)
		{
			oframeWidth = document.documentElement.clientWidth;
			oframeHeight = document.documentElement.clientHeight;
		}
		else if (document.body)
		{
			oframeWidth = document.body.clientWidth;
			oframeHeight = document.body.clientHeight;
		}
		//
		if (dim == 'width')
		{
			return (oframeWidth);
		}else if (dim == 'height')
		{
			return (oframeHeight);
		}else{
			return false;
		}
	}

	function openPopUp(modelWindowName){				
		//var availableHeight = getFrameDimension('height');
		var availableWidth = getFrameDimension('width');
		var widthAdjustment = 0;
		if (!is_ie)
		{
			widthAdjustment = 9;
		}

		document.getElementById('modal').style.display="";
		document.getElementById(modelWindowName).style.display="";	
		document.getElementById(modelWindowName).style.top = 5 + "px";
		document.getElementById(modelWindowName).style.left = ((availableWidth/2)- widthAdjustment - (parseInt(document.getElementById(modelWindowName).style.width)/2)) + "px";
	}
	
	
	function closeModalWindow(modelWindowName){
		document.getElementById('modal').style.display="none";
		document.getElementById(modelWindowName).style.display="none";	
	}
			