			
			var imgDir = "";  
		    var FigureHeader="";
		    var FigureNo="";
			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;
			
			var str= document.location.toString();
			str= str.substring(str.lastIndexOf("\/")+1,str.length);
			
				imgDir = "Images/vrid/";
				
			

		    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]
				}
    
				var strDiv="";
				strDiv=strDiv + "<div onclick='bShow=true' id='calendar' style='z-index:+999;position:absolute;visibility:hidden;'>";
				strDiv=strDiv + "	<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='#ffffff'>";
				strDiv=strDiv + "		<tr Class='PopupImageHeader'>";
				strDiv=strDiv + "			<td width='100%'>";
				strDiv=strDiv + "				<table width='100%' border='0' cellpadding='0' cellspacing='0'>";
				strDiv=strDiv + "					<tr>";
				//strDiv=strDiv + "						<td width='13%' align='left' class='PopupTitlehdrLft' ><B><span id='no' style='width:100%'></span></B></td>";
				//strDiv=strDiv + "						<td width='2' bgcolor='#ffffff'><IMG SRC='Images/space.gif' WIDTH='2' HEIGHT='1' BORDER='0' ></td>";
				strDiv=strDiv + "						<td width='97%' class='PopupTitlehdr' ><B><span id='caption' style='width:100%'></span></B></td>";
				strDiv=strDiv + "						<td class='PopupTitlehdr' width='3%' align='right' valign='center'><a onclick ='javascript:hideCalendar()'><IMG SRC='"+imgDir+"close.gif' BORDER='0' ALT='Close the Figure'></a></td>";
				strDiv=strDiv + "					</tr>";
				strDiv=strDiv + "				</table>";
				strDiv=strDiv + "			</td>";
				strDiv=strDiv + "		</tr>";
				strDiv=strDiv + "		<tr>";
				strDiv=strDiv + "			<td style='padding:5px' bgcolor=#ffffff><span id='content'></span></td>";
				strDiv=strDiv + "		</tr>";			

				strDiv=strDiv + "</table></div>";

		
				document.write (strDiv)



			//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='#ffffff'><tr Class='PopupImageHeader'><td width='100%'><table width='100%' border='0' cellpadding='0' cellspacing='0'><tr><td width='13%' align='left' class='PopupTitlehdrLft' ><B><span id='no' style='width:100%'></span></B></td><td width='2' bgcolor='#ffffff'><IMG SRC='Images/space.gif' WIDTH='2' HEIGHT='1' BORDER='0' ></td><td width='84%' class='PopupTitlehdrRgt' ><B><span id='caption' style='width:100%'></span></B></td><td class='PopupTitlehdrRgt' width='3%' align='right' valign='center'><a href='javascript:hideCalendar()'><IMG SRC='"+imgDir+"close.gif' 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
					//document.getElementById("no").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>"; 
				
				// latest used
				//sHTML =	"<table	border=0 style='font-family:verdana;font-size:11px;'><tr><td width='95%'><img src=images/space.gif width='5' height='1' border=0></td><td width='5%' align='right'><img src=images/space.gif width='5' height='1' border=0></td></tr><tr><td align='center' ><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>"; 
				
			//	sHTML =	"<table	border=0 style='font-family:verdana;font-size:11px;'><tr><td width='95%'><img src=images/space.gif width='5' height='1' border=0></td><td width='5%' align='right'><img src=images/space.gif width='5' height='1' border=0></td></tr><tr><td align='center' ><a href='javascript:hideCalendar()' ><img border='0' "+ curname +" src='" + imgDir + imPath +"'></a></td></tr><tr><td align=left><font size='1'><span id='spsource'></span></font></td></tr></Table>"; 
				var sHTML ="";
				sHTML = sHTML + "<table	border='0' cellpadding='0' cellspacing='0'>";
				/*sHTML = sHTML + "	<tr>";
				sHTML = sHTML + "		<td width='100%'><img src=images/space.gif width='5' height='1' border=0></td>";
				//sHTML = sHTML + "		<td width='5%' align='right'><img src=images/space.gif width='5' height='1' border=0></td>";
				sHTML = sHTML + "	</tr>";*/
				sHTML = sHTML + "	<tr>";
				sHTML = sHTML + "		<td align='center' width='100%'><a onclick ='javascript:hideCalendar()' ><img border='0' "+ curname +" src='" + imgDir + imPath +"'></a></td>";
				sHTML = sHTML + "	</tr>";
				/*sHTML = sHTML + "	<tr>";
				sHTML = sHTML + "		<td align=left><font size='1'><span id='spsource'></span></font></td>";
				sHTML = sHTML + "	</tr>";*/
				sHTML = sHTML + "</Table>";


				
				document.getElementById("content").innerHTML   = sHTML
				document.getElementById("caption").innerHTML  =	'<font size="3" color="white">' + FigureHeader + '</font>';
				//*document.getElementById("no").innerHTML  =	'<font size="3" color="white">' + FigureNo + '</font>';
				
			//	document.getElementById("spsource").innerHTML = '<font size="2" >' + Source +'</font>'
				//document.getElementById("spsource").style.width=figwidth -50
			}

			function popUpImage(strHeader,strNo,strSubTitle,strSource,ImageFileName,fWidth,fHeight) {
				FigureHeader=strHeader;
				FigureNo=strNo;
				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-30+ cPos; 			
						//crossobj.top =100; 			
						constructCalendar ();
						crossobj.visibility=(dom||ie)? "visible" : "show"
						bShow = true;
					}

				}
			}


			if(ie)
			{
				init()
			}
			else
			{
				window.onload=init
			}
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
			
