/*codebaby{Context.Project=Symmetree Web Site}*/
/*codebaby{Context.SceneGroup=Codebaby}*/
/*codebaby{Context.Stage=Stage1}*/
/*
  CodeBaby JavaScript Library
  Copyright (c) 2004-2006 CodeBaby Corp.
  All rights reserved.
  This source code can only be distributed in accordance with the terms of the license agreement entered into
  with CodeBaby.

  Version: LEX
  $Rev: 3834 $
  $Date: 2007-08-01 09:39:45 -0600 (Wed, 01 Aug 2007) $
  $URL: http://svn/svn/Development/JSLib/Trunk/PubSet/cb/javascript/scenegroups/${PubSet(%Name%)}.js $
*/	 

/**
  This sets up the CodeBaby object with all of the customized data for this 
  publish set.
  
  @author stevem
*/
function setupCodeBaby() {

    // create a new CodeBaby instance (must be within the global namespace)
    codebaby = new CodeBaby();
    
    // names
    codebaby.projectName = /*codebaby{Project("\"%Name%\"")*/
                           "Symmetree Web Site"

                           /*}*/ // Name of the project 

    codebaby.stageName = /*codebaby{Stage("\"%Name%\"")*/
                         "Stage1"

                         /*}*/  // Stage used on this page

    codebaby.sceneGroupName = /*codebaby{SceneGroup("\"%Name%\"")*/
                              "Codebaby"

                              /*}*/ // The publish set used for this page

    
    // publish root
    codebaby.publishRoot = "./"; // This is the path from the HTML to the publish folder
    
    // XML
    codebaby.projectXML =   /*codebaby{Project("\"%XMLRelativeURL%\"")*/
                            "cb/xml/"

                            /*}*/ 

                            + "project.xml";  // relative path to the xml file for this page.
    
    // gateway
    codebaby.gatewayMovie = "cb/swf/gateway/JavaScriptFlashGateway.swf"; 
    
    // container
    codebaby.containerId = "CodeBabyContainer"; // The players div tag's id.
    codebaby.containerX = 0; // x (horizontal) position of where the player will show up on the page relative to its parent.
    codebaby.containerY = 18; // y (vertical) position of where the player will show up on the page relative to its parent
    codebaby.containerWidth = /*codebaby{Stage("%ContainerWidth%")*/
                              240

                              /*}*/ // The console width

    codebaby.containerHeight = /*codebaby{Stage("%ContainerHeight%")*/
                               180

                               /*}*/ // the consoles height

    codebaby.containerWindowMode = "transparent"; // opaque, transparent or window. for the flash object tag. See implementation guild for special cases with transparent mode.
    codebaby.containerPath = "cb/swf/containers/"; // path to where the container swf is contained. *** must have trailing "/" 
    codebaby.containerFlashVersion = "7,0,14,0"; // Flash version to use.
    
    // speech bubble
    codebaby.speechBubbleMovie = "cb/swf/speechbubble/SpeechBubble.swf"; // path to speech bubble swf
    codebaby.speechBubbleId = "CodeBabySpeechBubble"; //The speech bubble div tag's id.
    codebaby.speechBubbleWidth = /*codebaby{Project("%SpeechBubbleWidth%")*/
                                 300

                                 /*}*/ // The width of the speech swf

    codebaby.speechBubbleHeight = /*codebaby{Project("%SpeechBubbleMaxHeight%")*/
                                  200

                                  /*}*/ // The height of the speech swf

    codebaby.speechBubbleX = codebaby.containerX + codebaby.containerWidth + 5; // x (left) position of where the speech swf will show up on the page.
    codebaby.speechBubbleY = codebaby.containerY; // y (top) position of where the speech swf will show up on the page
    codebaby.speechBubbleAlternateX = codebaby.containerX - codebaby.speechBubbleWidth - 5; // where the speech bubble will appear if it is not visible at speechBubbleX, speechBubblY
    codebaby.speechBubbleAlternateY = codebaby.containerY; // where the speech bubble will appear if it is not visible at speechBubbleX, speechBubblY
    codebaby.speechBubbleWindowMode = "transparent"; // opaque, transparent or window. for the flash object tag. See implementation guild for special cases with transparent mode. 
    codebaby.defaultSpeechBubbleFadeSpeed = 20; // percentage of fade per a frame e.g. 20 = 5 frames fade time (20% per frame)
    codebaby.speechBubbleFlashVersion = "7,0,14,0"; // Flash version to use

}

////////////////////////////////////////////////////////////////////////////////
// Publish Set Listener Class //////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////

/**
  This class is used for listening to CodeBaby events on the publish set level.
*/
function CBSceneGroupListener() {};

/**
  Called by the container when it is ready to receive events from JavaScript.
  This is called for the first time after the console is loaded.
*/
CBSceneGroupListener.prototype.onContainerReady = function() {

    // insert your custom event handling code here
    
}

 
/**
  Called by the container when a new scene is loaded.
  
  @param sceneName The name of the new scene.
*/
CBSceneGroupListener.prototype.onSceneLoad = function(sceneName) {

    // insert your custom event handling code here
    
}

 
/**
  Called by the container when the play state has changed.  E.g. the user has
  hit the "pause" button.
  
  @param newState The number corresponding to the new play state:
         playing = 0, stopped = 1, paused = 2, buffering = 3.
*/
CBSceneGroupListener.prototype.onPlayStateChange = function(newState) {
    
    // insert your custom event handling code here
    
} 

/**
  Called by the flash container movie when the initialization is complete:
  XML data and the console movie is loaded.
  
  @param sceneList An array of the scenes for this publish set (e.g. "Scene1") 
*/ 
CBSceneGroupListener.prototype.onSceneGroupLoad = function(sceneList) { 
    
    // insert your custom event handling code here
}

  
/**
  Called when the player is shown.
*/	
CBSceneGroupListener.prototype.onPlayerShow = function() {  

    // insert your custom event handling code here

}

 
/**
  Call when the player is hidden.
*/	
CBSceneGroupListener.prototype.onPlayerHide = function() { 
   
    // insert your custom event handling code here

}

 
/**
  Called when the user clicks anywhere on the scene movie.
*/ 
CBSceneGroupListener.prototype.onSceneClick = function() {

    // insert your custom event handling code here

}


/**
  Called when the user has clicked the "draggable" area of the console.
  This tells the JavaScript to start dragging.
*/
CBSceneGroupListener.prototype.onConsoleDrag = function() {

    // insert your custom event handling code here

}


/**
  Called when the console sends a "custom" event.  This way, you can add custom
  controls to your console which causes some action in JavaScript.
  
  @param param Custom parameter, sent by the console movie.
*/	
CBSceneGroupListener.prototype.onConsoleCustomEvent = function(param) { 

    // insert your custom event handling code here

}


/**
  Called when an "external action", as entered in Production Composer, is fired.
  
  @param name The name of the external action
  @param description The description entered in Production Composer
*/
CBSceneGroupListener.prototype.onExternalAction = function(name, description) {
    
        switch(name){
		case "referenceExpertsSay":
			// hide the links and show the "further assistance" information
			document.getElementById("furtherAssistance3").style.display = 'block';
            // circle the content referencing the user's documentation (using circle.js )
            circle("expertsSay");
            break;
        case "referenceUsersDocumentation":
			// hide the links and show the "further assistance" information
			document.getElementById("furtherAssistance1").style.display = 'block';
			// clears the circle from the page
            // circle the content referencing the user's documentation (using circle.js )
             canvas.clear();
			 circle("usersDocumentation");
            break;
        case "referenceSampleContent":
			// hide the links and show the "further assistance" information
			document.getElementById("furtherAssistance2").style.display = 'block';
			// clears the circle from the page
            // circle the content referencing the sample content (using circle.js )
             canvas.clear();
			 circle("sampleContent");
            break;
		case "referenceClearCircle":
			// clears the circle from the page
            // canvas.clear();
            break;
    }
        
        
}


/**
  Called when the flash movie is requesting a url change.  

  @param url The url we need to go to.
  @param target The target for the url (e.g. "_blank", "_self")
*/
CBSceneGroupListener.prototype.onGetURL = function(url, target) {
    
    // insert your custom event handling code here
        
}


/**
  Called by the container when a "nav to pubset" is requested.  Currently,
  this just opens <PublishSetName>.html, but you can customize this in the
  case that you move your publish set files around.
  
  @param sceneGroupName The name of the publish set.
*/
CBSceneGroupListener.prototype.onNavigateToSceneGroup = function(sceneGroupName) {

    // insert your custom event handling code here

}


/**
  Called when a debug message is sent from the CodeBaby flash container.  When
  debugging, you might write these messages to a DIV for example.
  
  @param message The debug message as a string.   
*/	
CBSceneGroupListener.prototype.onDebugMessage = function(message) { 
   
    // insert your custom event handling code here

}


/**
  Called when any speech bubble is displayed.
*/	
CBSceneGroupListener.prototype.onShowSpeechBubble = function() { 
    
    // insert your custom event handling code here
    
}


/**
  Called when any speech bubble starts to fade out.
*/	
CBSceneGroupListener.prototype.onHideSpeechBubble = function() { 

    // insert your custom event handling code here

}


/**
  Called when any speech bubble is hidden/closed.
*/	
CBSceneGroupListener.prototype.onSpeechBubbleHidden = function() { 
   
    // insert your custom event handling code here

}


/**
  Called when a speech bubble link is clicked (i.e. the user has responded to
  a speech bubble question).
  
  @param speechBubbleName The name of the speech bubble that send the response
  @param linkId The ID of the link that was clicked.
*/	
CBSceneGroupListener.prototype.onResponse = function(speechBubbleName, linkId) {

    // insert your custom event handling code here

}
