function SetTopMargin( )
{
		var wh = 0;
		var dh = 0;
		var dt = 0;
		var od = null;
	
		if( typeof( window.innerHeight ) == 'number' ) 
		{
			//Non-IE
			wh = window.innerHeight;
		} 
		else
		{
			if( document.documentElement && document.documentElement.clientHeight ) 
			{
				//IE 6+ in 'standards compliant mode'
				wh = document.documentElement.clientHeight;
			} 
			else
			{ 
				if( document.body && document.body.clientHeight )
				{
					//IE 4+ compatible
					wh = document.body.clientHeight;
				}
			}
		}
	
		od = document.getElementById( 'container' );
	
		if( od != null )
		{
			dh = parseInt( od.style.height );
			
			if( dh != null && dh > 0 )
				dt = ( wh > dh ? Math.max( Math.floor( ( wh - dh ) / 2 ), 0 ) : 0 );
		}

	return ( dt > 0 ? ( dt + "px" ) : "0px" );
}

function SetLeftMargin( )
{
		var ww = 0;
		var dw = 0;
		var dt = 0;
		var od = null;
	
		if( typeof( window.innerWidth ) == 'number' ) 
		{
			//Non-IE
			ww = window.clientWidth;
		} 
		else
		{
			if( document.documentElement && document.documentElement.clientWidth ) 
			{
				//IE 6+ in 'standards compliant mode'
				ww = document.documentElement.clientWidth;
			} 
			else
			{ 
				if( document.body && document.body.clientWidth ) 
				{
					//IE 4+ compatible
					ww = document.body.clientWidth;
				}
			}
		}
	
		od = document.getElementById( 'container' );
	
		if( od != null )
		{
			dw = parseInt( od.style.width );
			
			if( dw != null && dw > 0 )
				dt = ( ww > dw ? Math.max( Math.floor( ( ww - dw ) / 2 ), 0 ) : 0 );
		}

	return ( dt > 0 ? ( dt + "px" ) : "0px" );
}


     		
var iPageNo = 1;
     
function GoForward( )
 {
	   //Hide the current divs
	   div = document.getElementById( 'pg' + iPageNo ); 
	   if( div == null )
	    return;
	    
	   div.style.display = 'none';
	   
	  
	   div = document.getElementById( 'pg' + (iPageNo + 1) ); 
	   if( div == null )
	    return;
	    
	   div.style.display = 'none';
	   
	   iPageNo += 2;
	   
	      
	   div = document.getElementById( 'pg' + iPageNo ); 
	   if( div == null )
	    return;
	    
	   div.style.display = 'block';
	   
	   
	   div = document.getElementById( 'pg' + (iPageNo + 1) ); 
	   if( div == null )
	    return;
	    
	   div.style.display = 'block';
	   
	   div = document.getElementById( 'nxtpg' ); 
	   if( div == null )
	   return;
	   
	   if(iPageNo == 25)
	   {
	   	div.style.display = 'none';
	   }
	   else
	   {
	   	div.style.display = 'block';
	   }
	   	
	}

function GoBackward( )
	{
		//Hide the current divs
	   div = document.getElementById( 'pg' + iPageNo ); 
	   if( div == null )
	    return;
	    
	   div.style.display = 'none';
	   
	  
	   div = document.getElementById( 'pg' + (iPageNo + 1) ); 
	   if( div == null )
	    return;
	    
	   div.style.display = 'none';
	   
	   iPageNo -= 2;
	   
	      
	   div = document.getElementById( 'pg' + iPageNo ); 
	   if( div == null )
	    return;
	    
	   div.style.display = 'block';
	   
	   
	   div = document.getElementById( 'pg' + (iPageNo + 1) ); 
	   if( div == null )
	    return;
	    
	   div.style.display = 'block';
	   
	   div = document.getElementById( 'prvpg' ); 
	   if( div == null )
	   return;
	   
	   if(iPageNo == 1)
	   {
	   	div.style.display = 'none';
	   }
	   else
	   {
	   	div.style.display = 'block';
	   }
	}

function PageMarker()
	{
		div = document.getElementById( 'nxtpg' ); 
	   if( div == null )
	   return;
		
		
		if(iPageNo == 25)
	   {
	   	div.style.display = 'none';
	   }
	   else
	   {
	   	div.style.display = 'block';
	   }
	   
	   div = document.getElementById( 'prvpg' ); 
    	if( div == null )
    	return;
	   
	    if(iPageNo == 1)
	   {
	   	div.style.display = 'none';
	   }
	   else
	   {
	   	div.style.display = 'block';
	   }
	 }
