			var imgDir = "Images/"
		    var FigureHeader="";
			var SubTitle="";
			var Source="";
			var imPath="";
			var fWidth;
			var fHeight;
			var sHead=new String("");
			var figwidth;		
			var	crossobj;
			var	bPageLoaded=false
			var	ie=document.all
			var	dom=document.getElementById		
			var	ns4=document.layers

			var	imgsrc = new Array()
			var	img	= new Array()
		
			var bShow = false;
		    function hideElement( elmID, overDiv )
		    {
		      if( ie )
		      {
		        for( i = 0; i < document.all.tags( elmID ).length; i++ )
		        {
		          obj = document.all.tags( elmID )[i];
		          if( !obj || !obj.offsetParent )
		          {
		            continue;
		          }
		      
		          // Find the element's offsetTop and offsetLeft relative to the BODY tag.
		          objLeft   = obj.offsetLeft;
		          objTop    = obj.offsetTop;
		          objParent = obj.offsetParent;
		          
		          while( objParent.tagName.toUpperCase() != "BODY" )
		          {
		            objLeft  += objParent.offsetLeft;
		            objTop   += objParent.offsetTop;
		            objParent = objParent.offsetParent;
		          }
		      
		          objHeight = obj.offsetHeight;
		          objWidth = obj.offsetWidth;
		      
		          if(( overDiv.offsetLeft + overDiv.offsetWidth ) <= objLeft );
		          else if(( overDiv.offsetTop + overDiv.offsetHeight ) <= objTop );
		          else if( overDiv.offsetTop >= ( objTop + objHeight ));
		          else if( overDiv.offsetLeft >= ( objLeft + objWidth ));
		          else
		          {
		            obj.style.visibility = "hidden";
		          }
		        }
		      }
		    }
		
			if (dom)
			{
				for	(i=0;i<imgsrc.length;i++)
				{
					img[i] = new Image
					img[i].src = imgDir + imgsrc[i]
				}
				document.write ("<div onclick='bShow=true' id='calendar' style='z-index:+999;position:absolute;visibility:hidden;'><table width='' style='font-family:arial;font-size:11px;border-width:1;border-style:solid;border-color:#a0a0a0;font-family:arial; font-size:11px}' bgcolor='#fee7db'><tr bgcolor='#d42e12'><td width='100%'><table width='100%'><tr><td width='90%' style='padding:1px;font-family:arial; font-size:11px;'><font color='#ffffff'><B><span id='caption' style='width:100%'></span></B></font></td><td width='10%'align=right><a href='javascript:hideCalendar()'><IMG SRC='"+imgDir+"close.gif' WIDTH='15' HEIGHT='13' BORDER='0' ALT='Close the Figure'></a></td></tr></table></td></tr><tr><td style='padding:5px' bgcolor=#ffffff><span id='content'></span></td></tr>")
											
				document.write ("</table></div>");
			}

			var	styleAnchor="text-decoration:none;color:black;"
			var	styleLightBorder="border-style:solid;border-width:1px;border-color:#a0a0a0;"
			
			
				
			function init()	{
				if (!ns4)
				{
					crossobj=(dom)?document.getElementById("calendar").style : ie? document.all.calendar : document.calendar
					hideCalendar()
					sHTML1="";			
					document.getElementById("caption").innerHTML  =	sHTML1
					bPageLoaded=true
				}
			}

			function hideCalendar()	{
				crossobj.visibility="hidden";
				sHead="";
			}

			function closeCalendar() {
				hideCalendar();
				sHead="";
			}

			function constructCalendar () {		
				sHead=FigureHeader;
				//var curname="url('images/MagnifyMinus.cur')";
				var curname="style='cursor: url('images/MagnifyMinus.cur')'";
				
				//sHTML =	"<table	border=0 style='font-family:verdana;font-size:11px;'><tr><td><img src=images/space.gif width=5 height=8 border=0></td></tr><tr><td><a href='javascript:hideCalendar()'><img border='0' "+ curname +" src='Images/"+ imPath +"'></a></td></tr><tr><td>"+ SubTitle +"</td></tr><tr><td align=left><font size='1'>"+ Source +"</font></td></tr></Table>"; 
				sHTML =	"<table	border=0 style='font-family:verdana;font-size:11px;'><tr><td><img src=images/space.gif width=5 height=8 border=0></td></tr><tr><td><a href='javascript:hideCalendar()'><img border='0' "+ curname +" src='Images/"+ imPath +"'></a></td></tr><tr><td><span id='spstitle'></span></td></tr><tr><td align=left><font size='1'><span id='spsource'></span></font></td></tr></Table>"; 
				
				document.getElementById("content").innerHTML   = sHTML
				document.getElementById("caption").innerHTML  =	'<font size="2" color="white">' + FigureHeader + '</font>';
				document.getElementById("spstitle").innerHTML = SubTitle
				document.getElementById("spstitle").style.width=figwidth -50
				document.getElementById("spsource").innerHTML = Source
				document.getElementById("spsource").style.width=figwidth -50
			}

			function popUpImage(strHeader,strSubTitle,strSource,ImageFileName,fWidth,fHeight) {
				FigureHeader=strHeader;
				Source=strSource;
				figwidth =fWidth;
				//SubTitle='<br>'+strSubTitle;
				SubTitle=strSubTitle;
				
				imPath=ImageFileName;
				var cPos=0;
				var	leftpos=0
				var	toppos=0

				if( typeof( window.innerWidth ) == 'number' ) {
					//Non-IE
					myWidth = window.innerWidth;
					myHeight = window.innerHeight;
				} else if( document.documentElement &&
					  ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
					//IE 6+ in 'standards compliant mode'
					myWidth = document.documentElement.clientWidth;
					myHeight = document.documentElement.clientHeight;
					cPos=document.body.scrollTop;
				} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
					//IE 4 compatible
					myWidth = document.body.clientWidth;
					myHeight = document.body.clientHeight;
					cPos=document.body.scrollTop;
				}
				
				if (bPageLoaded)
				{						
					if(sHead==strHeader){
						hideCalendar();
						sHead="";
					}
					else{
						crossobj.left=(myWidth-fWidth)/2;
						crossobj.top =(myHeight-fHeight)/2-20+ cPos; 			
						constructCalendar ();
						crossobj.visibility=(dom||ie)? "visible" : "show"
						bShow = true;
					}

				}
			}


			if(ie)
			{
				init()
			}
			else
			{
				window.onload=init
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			