var objKPIEContentAPI = new KPIE_ContentAPI( parent.parent );
var objKPIEContent = new KPIE_Content( "Management Skills Online - Progressing and Closing the Sale", objKPIEContentAPI, parent.parent );

function init()
{

	var progress = "";

	// Configure the content heirarchy objects 


	// Section One
	objKPIEContent.addSection( "Opening the Call" ); 

	objKPIEContent.sections[0].addBlock( "Overview" );
	objKPIEContent.sections[0].blocks[0].addPage( "openingintro.htm" );
	objKPIEContent.sections[0].blocks[0].addPage( "openingintro2.htm" );

	objKPIEContent.sections[0].addBlock( "First Impressions" );
	objKPIEContent.sections[0].blocks[1].addPage( "blk0101a.htm" );
	objKPIEContent.sections[0].blocks[1].addPage( "blk0101b.htm" );
	objKPIEContent.sections[0].blocks[1].addPage( "blk0101c.htm" );
	objKPIEContent.sections[0].blocks[1].addPage( "blk0102.htm" );
	objKPIEContent.sections[0].blocks[1].addPage( "blk0103.htm" );
	objKPIEContent.sections[0].blocks[1].addPage( "blk0104.htm" );
	objKPIEContent.sections[0].blocks[1].addPage( "blk0105.htm" );

	objKPIEContent.sections[0].addBlock( "The Opening Statement" );
	objKPIEContent.sections[0].blocks[2].addPage( "blk0202.htm" );
	objKPIEContent.sections[0].blocks[2].addPage( "blk0203.htm" );
	objKPIEContent.sections[0].blocks[2].addPage( "blk0204.htm" );

	objKPIEContent.sections[0].addBlock( "Behaviour" );
	objKPIEContent.sections[0].blocks[3].addPage( "blk0302.htm" );
	objKPIEContent.sections[0].blocks[3].addPage( "blk0303.htm" );
	objKPIEContent.sections[0].blocks[3].addPage( "blk0304.htm" );

	objKPIEContent.sections[0].addBlock( "Check your Understanding" );
	objKPIEContent.sections[0].blocks[4].addPage( "quintro.htm" );


	// Section Two
	objKPIEContent.addSection( "Establishing Needs" ); 

	objKPIEContent.sections[1].addBlock( "Overview" );
	objKPIEContent.sections[1].blocks[0].addPage( "disabled.htm" );


	// Section Three
	objKPIEContent.addSection( "Presenting Benefits" ); 

	objKPIEContent.sections[2].addBlock( "Overview" );
	objKPIEContent.sections[2].blocks[0].addPage( "disabled.htm" );



	// Section Four
	objKPIEContent.addSection( "Closing the Sale" ); 

	objKPIEContent.sections[3].addBlock( "Overview" );
	objKPIEContent.sections[3].blocks[0].addPage( "disabled.htm" );



	// Get the progress data from the LMS.  This data contains the
	// progress data.

var apiAdapter = ""; 

if ( objKPIEContentAPI !=null ) 
{ 
        apiAdapter = objKPIEContentAPI.mappedLMSID;  

	if ( apiAdapter != "NULL" ) 
	{ 
		if (apiAdapter == "SVM" )	
		{
			getProgress();
		}
		else	
		{	
			// Get the progress data from the LMS.  This data contains the
			// progress data.

			progress = objKPIEContentAPI.LMSGetValue( "kpie.suspend_data" );
	
			if ( progress != null && progress != "")
			{
				objKPIEContent.setProgressMap( progress );
			}
		 }
	} 
}

}

function finish() 
{ 

        if ( objKPIEContentAPI != null ) 
        { 

                objKPIEContentAPI.LMSFinish(); 
                objKPIEContentAPI = null; 

                if ( objKPIEContent != null ) 
                { 
                        objKPIEContent = null; 
                } 

        } 

} 



function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
