


 showLayeredDiv=function(divId){
				 
			
				 	divdim= calculateCentre(divId);
				 	divObj=document.getElementById(divId);
				 	layerObj=document.getElementById('Layer');
				 	
				 	if(divObj.style.display=='none')
					{

		
				 		dimensions=myDimensionsTemp();
				 		
				 		layerObj.style.left=0+"px"
				 		layerObj.style.width=dimensions.scrollWidth+10;
				 		layerObj.style.height=dimensions.scrollHeight;


				 		layerObj.style.display='block';
				 		layerObj.style.filter = 'alpha(opacity=60)';
				 		
				 		divObj.style.display='block'
				 		divObj.style.left=divdim.l+"px";
				 		divObj.style.top=divdim.t+"px";				 		
				 	}else{
				 		divObj.style.display='none'
				 		layerObj.style.display='none';
						
						
					
				 	}
				 }
				 
				 
calculateCentre=function(divId){
					 
				 	dims= new Object();
				 	divObj=document.getElementById(divId);
				 	divWidth=parseInt(divObj.style.width);
				 	
				 	divHeight=parseInt(divObj.style.height);

				 	if(!divHeight){
				 		divHeight=400;
				 	}
				 	
				 	
				 	pageDims=myDimensions();
				 	frameWidth=pageDims.frameWidth;
				 	
				 	frameHeight=pageDims.frameHeight;
				 						
				 	hpw=frameWidth/2;
				 	hph=frameHeight/2-50;
				 	dw=divWidth/2;
				 	dh=(divHeight/2)+50;
				 	dims.l=hpw-dw;
				 	dims.t=hph-dh;
				 	return dims;
				 }
				 
function myDimensions(){
				var frame= new Object;
				
				if (self.innerWidth)
				{
					frame.frameWidth = self.innerWidth;
					frame.frameHeight = self.innerHeight;
					
					frame.scrollHeight=document.body.scrollHeight;
					frame.scrollWidth=document.body.scrollWidth;
					
					frame.screenWidth=screen.width;
					frame.screenHeight=screen.height;
					
					return frame;
				}
				else if (document.documentElement && document.documentElement.clientWidth)
				{
					frame.frameWidth = document.documentElement.clientWidth;
					frame.frameHeight = document.documentElement.clientHeight;
					
					frame.scrollHeight=document.body.scrollHeight;
					frame.scrollWidth=document.body.scrollWidth;
					
					frame.screenWidth=screen.width;
					frame.screenHeight=screen.height;
					
					return frame;
				}
				else if (document.body)
				{
					frame.frameWidth = document.body.clientWidth;
					frame.frameHeight = document.body.clientHeight;
					
					frame.scrollHeight=document.body.scrollHeight; 
					frame.scrollWidth=document.body.scrollWidth;
					
					frame.screenWidth=screen.width;
					frame.screenHeight=screen.height;
					
					return frame;
				}
				else return;
			
			}

function myDimensionsTemp(){
				var frame= new Object;
				
				if (self.innerWidth)
				{					
					frame.frameWidth = self.innerWidth;
					frame.frameHeight = self.innerHeight;
					
					frame.scrollHeight=document.body.scrollHeight;
					frame.scrollWidth=document.body.scrollWidth;
					
					frame.screenWidth=screen.width;
					frame.screenHeight=screen.height;
					
					return frame;
				}
				else if (document.documentElement && document.documentElement.clientWidth)
				{					
					frame.frameWidth = document.documentElement.clientWidth;
					frame.frameHeight = document.documentElement.clientHeight;
					
					frame.scrollHeight=document.body.scrollHeight;
					frame.scrollWidth=document.body.scrollWidth;
					
					frame.screenWidth=screen.width;
					frame.screenHeight=screen.height;
					
					return frame;
				}
				else if (document.body)
				{					
					frame.frameWidth = document.body.clientWidth;
					frame.frameHeight = document.body.clientHeight;
					
					frame.scrollHeight=document.body.scrollHeight; 
					frame.scrollWidth=document.body.scrollWidth;
					
					frame.screenWidth=screen.width;
					frame.screenHeight=screen.height;
					
					return frame;
				}
				else return;
			
			}
