/* Executive View JavaScript File
   - Used for content display and cinematic effects
   - does NOT include global nav rollover, Ajax code, etc.--only visual/CSS effects
*/

/*
===========================================================================
 Show or Hide Progres/Loading Indicator on Ajax page
 ------------------------------------------------------
 - In the sample template this is triggered by a hyperlink to demonstrate
   effect
- In production this function should be triggered whenever an Ajax (XMLHTTPRequest)
  is made and the triggered again when the request is complete.
  --> Trigger to turn ON loading graphic graphic when data is being retrieved
  --> Trigger again to turn OFF loading graphic when data retreval is complete
===========================================================================
*/
function showorhideProgress() {

if(document.getElementById('expandControl')) {    //check the element exists and can be accessed
    var message = document.getElementById('message');    //get hold of the element message
    var loading = document.getElementById('contentDisplayArea');    //get hold of the element opacity level

    if(message.className == 'hideMessage'){   //see if display property is set to none, switch classe
       message.className = 'showMessage';
       loading.className = 'loading';

   	}
	else {
    message.className = 'hideMessage';
    loading.className = 'loaded';
    }
   }
}// END function



/*
===========================================================================
 Flash Embed Script   - DRAFT
 ---------------------------------
 - Needed to autoactivate Flash in IE without a user click
 --> NOTE:
     This function will be updated to dynamiacally set the "flashvars" variable
     based on the refering URL!!
===========================================================================
*/
function embedFlash (filename, width, height) {
document.write('<object type="application/x-shockwave-flash" data="' + filename + '" width="'+ width +'" height="'+ height +'">');
document.write('<param name="movie" value="' + filename +'" />');
document.write('<param name="wmode" value="transparent" />');
document.write('<param name="FlashVars" value="page=1">');
document.write('</object>');
}




