// JavaScript Document
var MOVIES = new Array();
var IMAGES = new Array();
var WIDTH = "300";
var HEIGHT = "240";
var DELAY = 5;

var SECTION = "forum1008";
var SECTIONS = new Array();
SECTIONS["forum0207"] = "http://www.flexperienceconsulting.com/forum/forum1/";
SECTIONS["forum1007"] = "http://www.flexperienceconsulting.com/forum/forum2/";
SECTIONS["forum1008"] = "http://www.flexperienceconsulting.com/forum/2008.10/";
SECTIONS["forum0209"] = "http://www.flexperienceconsulting.com/forum/2009.02/";


function addImage(sec,info) {
	if ( ! IMAGES[sec] ) {
		IMAGES[sec] = new Array();
	}
	IMAGES[sec].push(info.split("|"));
}

function addMovie(sec,id,desc,title,who) {
	if ( ! MOVIES[sec] ) {
		MOVIES[sec] = new Array();
	}
	MOVIES[sec].push(new Array(id,desc,title,who));
}


// Fe3b 23, 2009 Forum
addImage("forum0209","desc|forum2/photos/pic5");
addImage("forum0209","desc|forum2/photos/pic1");
addImage("forum0209","desc|forum2/photos/pic2");
addImage("forum0209","desc|forum2/photos/pic3");
addImage("forum0209","desc|forum2/photos/pic4");
addImage("forum0209","desc|forum2/photos/pic6");

//addMovie("forum0209","FlexperienceMix1.flv","Listen to complete event","");
addMovie("forum0209","1_Intro_time_233.mp3","Introduction","");
addMovie("forum0209","2_Keynote_time2812.mp3","Keynote Address","");
addMovie("forum0209","3_introToPanelists_time3144.mp3","Panelist Introductions","");
addMovie("forum0209","4_PanelistsPresentStories_time5045.mp3","Why did your organization decide to take a flexible workforce path?","");
addMovie("forum0209","5_WhatMetricsAreYouTracking_time1-03-39.mp3","What metrics are you tracking to know whether you are on the right track?","");
addMovie("forum0209","6_HowDidYouAdoptThisSystem_time1-16-06.mp3","What kind of adoption or roll out  worked for your organization?","");
addMovie("forum0209","7_WhatIsYourTopCulturalIssue_time1-23-35.mp3","What is your top cultural issue?","");
addMovie("forum0209","8_HowIsFlexibilityAffectingYourCommunity_time1-35-13.mp3","How does flexibility affect collaboration and a sense of community?","");
addMovie("forum0209","9_AreEmployeesNeededToDoCertainWork_time1-41-03.mp3","How have you addressed the issue of managers knowing how to manage flexible workers?","");
addMovie("forum0209","10_EmployeesFirstAsACompetitiveAdvantage_time1-47-37.mp3","Employees first as a competitive advantage.","");
addMovie("forum0209","11_FlexibilityAsAnAttractionTool_time1-50-56.mp3","Flexibility as an attraction tool.","");
addMovie("forum0209","12_HowManagersMeasurePerformance_time1-57-18.mp3","How should managers measure performance?","");
addMovie("forum0209","13_HowAreSocialNetworksBeingIntegrated_time2-00-46.mp3","How are social networks being integrated?","");
addMovie("forum0209","14_DealingWithTheEmployeeBeingMarginalized_time2-07-04.mp3","How to deal with employees being marginalized?","");
addMovie("forum0209","15_AwardsCeremonyAndClosingComments_time2-21-10.mp3","Sloan Awards Ceremony & Closing Comments.","");


addImage("forum0207","desc|forum2/photos/photo1");
addImage("forum0207","desc|forum2/photos/photo2");
addImage("forum0207","desc|forum2/photos/photo3");
addImage("forum0207","desc|forum2/photos/photo4");
addImage("forum0207","desc|forum2/photos/photo5");
addImage("forum0207","desc|forum2/photos/photo6");
addImage("forum0207","desc|forum2/photos/photo7");
addImage("forum0207","desc|forum2/photos/photo8");
addImage("forum0207","desc|forum2/photos/photo9");
addImage("forum0207","desc|forum2/photos/photo10");
addImage("forum0207","desc|forum2/photos/photo11");

addImage("forum1007","desc|images/photo1" );
addImage("forum1007","desc|images/photo2" );
addImage("forum1007","desc|images/photo3" );
addImage("forum1007","desc|images/photo4" );
addImage("forum1007","desc|images/photo5" );
addImage("forum1007","desc|images/photo6" );
addImage("forum1007","desc|images/photo7" );
addImage("forum1007","desc|images/photo8" );
addImage("forum1007","desc|images/photo9" );
addImage("forum1007","desc|images/photo10" );
addImage("forum1007","desc|images/photo11" );
addImage("forum1007","desc|images/photo12" );
addImage("forum1007","desc|images/photo13" );
addImage("forum1007","desc|images/photo14" );
addImage("forum1007","desc|images/photo15" );
addImage("forum1007","desc|images/photo16" );

/**
10/20908 images
1. Four TV Stations covered our event
2. Cupcakes provided by ???(need to get name of sponsor)
3. 'How to Find Flexible Work' workshop 
4. Audience reaction to the debate
5. Cupcakes and book signing
6. Some of our sponsors
7. Watching the VP debate
8. The event's hosts join panelists to hear the debate
9. remove (I know it shows our logo, but it's just blah)
10. Lisa Belkin's keynote address
11. Attendees welcome the panelists
(12-15 are all about the same. I say delete 13 & 15)
12. Our panel
13. remove
14. Panelists share some motherhood moments
15. remove
16. Attendees enjoying the evening 
**/
addImage("forum1008","Four TV Stations covered our event|2008.10/images/1" );
addImage("forum1008","Cupcakes & shopping time |2008.10/images/2" );
addImage("forum1008","Flexperience's 'How to find flexible work' workshop|2008.10/images/3" );
addImage("forum1008","Audience reaction to the debate|2008.10/images/4" );
addImage("forum1008","Books by Chronicle Books |2008.10/images/5" );
addImage("forum1008","Sponsors who contributed to our Oprah-Like gift bags - led by Plantronics, HP, & Karen Neuburger|2008.10/images/6" );
addImage("forum1008","Watching the VP debate|2008.10/images/7" );
addImage("forum1008","The event's hosts join panelists to hear the debate|2008.10/images/8" );
//addImage("forum1008","desc|2008.10/images/9" );
addImage("forum1008","Lisa Belkin from the NY Times giving her keynote address|2008.10/images/10" );
addImage("forum1008","Attendees welcome the panelists|2008.10/images/11" );
addImage("forum1008","Our panel of &quot;Executive Moms&quot;|2008.10/images/12" );
//addImage("forum1008","desc|2008.10/images/13" );
addImage("forum1008","Panelists share some motherhood moments|2008.10/images/14" );
//addImage("forum1008","desc|2008.10/images/15" );
addImage("forum1008","Attendees enjoying the evening - they rated it a 8.9 out of 10!|2008.10/images/16" );








// Generated code 
addMovie("forum1008","intro.mp3","Welcome & summary of event","Introduction","Sally Thornton");
addMovie("forum1008","keynote.mp3","Keynote - Lisa Belkin of the New York Times","Keynote - Lisa Belkin of the New York Times","Lisa Belkin");
addMovie("forum1008","panel.mp3","Panelists share their stories","Panelists share their stories","Diane Dwyer");
addMovie("forum1008","topic1.mp3","How to address a flexible schedule with your company","How to address a flexible schedule with your company","");
addMovie("forum1008","topic2.mp3","Advice to new mothers","Advice to new mothers","");
addMovie("forum1008","topic3.mp3","How to manage instant communication (The blackberry question)","How to manage instant communication. (The blackberry question)","");
addMovie("forum1008","topic4.mp3","The Hiring Manager's perspective of asking for flexible work ","Making flexiblke work fulfilling","");
addMovie("forum1008","topic5.mp3","Final thoughts and funny stories","Final thoughts and funny stories.","");
addMovie("forum1008","qa.mp3","Questions and answers","Questions and answers","");


addMovie("forum0207","intro","Why we put this evening together and who is Flexperience?","Introduction"," Sally Thornton, President & Co-Founder of Flexperience");
addMovie("forum0207","panelists","Lizzie's off ramp story and meeting the panelists with a hilarious start!","Speaker","Lizzie Bermudez");
addMovie("forum0207","question_1","We often hear working moms say that they feel like a better mom when &quot; I am able to work on some level outside the home&quot;","Question 1 "," Holly Sutton, Robbie Baxter, Tamsin Smith, and Dawn Dobras");
addMovie("forum0207","question_2","What support systems worked really well for you practical advice you've learned through the years? ","Question 2  "," Holly Sutton, Robbie Baxter, Tamsin Smith, and Dawn Dobras");
addMovie("forum0207","question_3","Motherhood is full of surprises, what were the biggest surprises you discovered while doing interviews for the book I was a great mom before I had kids? ","Question 3 ","Amy Nobile and Trisha Ashworth");
addMovie("forum0207","question_4","Describe your most hilarious working moment","Question 4  ","Amy Nobile and Trisha Ashworth");
addMovie("forum0207","question_5"," How did you approach management about changing your work schedule? For those of you who tried part-time and it didn't work, what made it hard? For those who thrived in a part-time role, what made it work?","Question 5 ","  Holly Sutton, Dawn Dobras, Cindee Mock, Robbie Baxter, Catherine Lee, Dawn Dobras, and Jodi Bricker");
addMovie("forum0207","question_6"," For those who &quot;off ramped&quot; and &quot;on ramped,&quot; what did you learn/advice you have?(An off-ramp is defined as taking more than one year off of work)","Question 6"," Trisha Ashworth and Lizzie Bermudez");
addMovie("forum0207","question_7","For our one job share panelist, Cindee, what had made the job share arrangement a success?","Question 7 ","  Cindee Mock");
addMovie("forum0207","question_8","Discuss how you used the concept of flexibility, whether it was flex-time, part-time or consulting, in your career and how that evolved into your current situations   More specifically, Tamsin and Jodi were in flexible job situations then moved to full-time   How did this evolve for you? Robbie, what are the key benefits to consulting? Amy, how do you manage work and family? ","Question 8  ","Tamsin Smith, Jodi Bricker, Robbie Baxter, and Amy Nobile");
addMovie("forum0207","question_9","How was the transition from flexible job to your role at Red?","Question 9  ","  Tamsin Smith");
addMovie("forum0207","question10"," How do you positively explain the gap in your resume after taking time off to be at home with your children?","Question 10"," Catherine Lee");
addMovie("forum0207","question_11"," With all the focus on kids and work, how do you make time for your partner? ","Question 11 ","Amy Nobile, Trisha Ashworth and Holly Sutton ");
addMovie("forum0207","question_12","What if working is not a choice but a need to support the finances?  Is it selfish to scale back?","Question 12  "," Robbie Baxter");
addMovie("forum0207","question_13","Do you have any tips for dealing with the loss of energy when you have young children and go back to work? ","Question 13  ","Lizzie Bermudez, Dawn Dobras, and Jodi Bricker");
addMovie("forum0207","question_14","How do you get paid full-time rates for part-time work?","Question 14  "," Robbie Baxter");
addMovie("forum0207","question_15","We hear a lot about the so-called &quot;Mommy Wars&quot; but we want to talk about the incredible support that is often found among working mothers","Question 15  "," Robbie Baxter");
addMovie("forum0207","question_16","Concept of flexibility and creating a flexible career ","Question 16 ","Amy Nassisi, Founder of Flexibility Alliance");
addMovie("forum0207","closing","A final word from Sally.","Closing","Sally Thornton, President & Co-Founder of Flexperience");
addMovie("forum1007","intro","Formulas For Success","Introduction","Amy Keroes  ");
addMovie("forum1007","panelists","What You Ought to Know About the Panelists","Panelists","Sally Thornton, President & Co-Founder of Flexperience");
addMovie("forum1007","keynote","Keynote Address","Speaker","Leslie Morgan Steiner");
addMovie("forum1007","question_06","How do you negotiate and manage your relationships at work?","Panelist Discussion","Kirstin Hoefer, Natalie Mehta");
addMovie("forum1007","question_07","What is your most hilarious working mom moment?","Panelist Discussion","Sarah Clark, Leslie Morgan Steiner, MaryAnn McGrath");
addMovie("forum1007","question_08","What are the different ways you've blended work and family life and how have you negotiated that blend at home and at work?","Panelist Discussion","Lin Stillman, Lori McAdams, Leslie Morgan Steiner");
addMovie("forum1007","question_09","What are some of the tricks you use to help make the work/life blend work?","Panelist Discussion","Kirstin Hoefer, Lori McAdams, Sarah Clark, Risa Green");
addMovie("forum1007","question_10","How do you on-ramp after you have taken time off from work to be with your family?","Panelist Discussion","MaryAnn McGrath");
addMovie("forum1007","question_11","Name the one thing all women could do to help each other manage work and family life?","Panelist Discussion","Leslie Morgan Steiner, Sarah Clark, Lori McAdams, Risa Green, Kirstin Hoefer, Lin Stillman, Natalie Mehta, MaryAnn McGrath");
addMovie("forum1007","qa_01","How do you fit sex into your busy lives?","Audience Q&A","Sarah Clark, Lori McAdams, Risa Green, Lin Stillman");
addMovie("forum1007","qa_03","How do you negotiate a part-time or flexible schedule?","Audience Q&A","Kirstin Hoefer, Risa Green, Leslie Morgan Steiner, Sarah Clark");
addMovie("forum1007","qa_06","How do you decide what to stress about at work and at home and what not to stress about?  How do you become happy with the decisions you made?  When do you stop stressing about getting it all done?","Audience Q&A","Kirstin Hoefer, Lori McAdams, Lin Stillman ");
addMovie("forum1007","qa_07","How do you control the number of hours you work and have time for family?  Is it a generational shift in the way we think?","Audience Q&A","Lori McAdams, Sarah Clark, Leslie Morgan Steiner, Natalie Mehta ");

/**


Code below


**/

/**
var LINKS = new Array();
LINKS["forum0207"] = new Array();
LINKS["forum0207"].push(new Array("Event Transcript","http://www.flexperienceconsulting.com/forum/forum1/event_transcript.pdf"));
LINKS["forum0207"].push(new Array("Podcast/Audio MP3","http://www.flexperienceconsulting.com/forum/forum1/flexperience.zip"));
LINKS["forum1008"] = new Array();
LINKS["forum1008"].push(new Array("Podcast/Audio MP3","http://www.flexperienceconsulting.com/forum/forum2/flexperience_forum2.zip"));
**/




function sendEvent(swf,typ,prm) { 
  thisMovie(swf).sendEvent(typ,prm); 
};


function getUpdate(typ,pr1,pr2,swf) {};
function thisMovie(swf) {
  if(navigator.appName.indexOf("Microsoft") != -1) {
    return window[swf];
  } else {
    return document[swf];
  }
};

var slideNum = 0;
var movieNum = 0;
var currTimeout;
var movieDone = false;
function slideShow() {
	
	showImage(slideNum);
	slideNum = (slideNum + 1) % IMAGES[SECTION].length;
	currTimeout = setTimeout("slideShow()",DELAY * 1000);
}
function stopSlideShow() {
	
	//showImage(slideNum);
	//slideNum = (slideNum + 1) % IMAGES[SECTION].length;
	if ( currTimeout ) {
		clearTimeout( currTimeout );
	}
	// = setTimeout("slideShow()",DELAY * 1000);
}

function movieShow() {
    if ( movieDone ) {
	showMovie(movieNum);
	movieNum = (movieNum + 1) % MOVIES[SECTION].length;
	}
	currTimeout = setTimeout("movieShow()",1000);
}






var FO;



function showMovies(sect,autoplay){
	SECTION = sect;
	if ( autoplay == false ) {
		autoplay =  'false';
	} else {
		autoplay =  'true';
	}

// list movies 
  var html = "";
  var mov;
  
  html += "<ul>";  
  for ( i = 0; i < MOVIES[SECTION].length; i++ ) {
  		mov = MOVIES[SECTION][i];
    	html += '<li class="play"><a href="javascript:void();" onclick="showMovie(' + i + ')">' + mov[1] + '</a></li>'; 
  }
  html += "</ul>";
  
  /**
  if ( document.getElementById("mm_list") ) {
  document.getElementById("mm_list").innerHTML =  html;
  }
  **/
  
  	var s1 = new SWFObject("site/mediaplayer.swf","mediaplayer",WIDTH,HEIGHT,"8");
		s1.addParam("allowfullscreen","true");
		s1.addVariable("width",WIDTH);
		s1.addVariable("height",HEIGHT);
		s1.addVariable('enablejs','true');
		s1.addVariable("file","http://www.flexperienceconsulting.com/forum/forum2/intro.flv&enablejs=true&overstretch=false");
		//s1.write("player");
  
  //return html;
  document.write( html );

  //showMovie(0,autoplay);
}

function initImages(tot,w) {
   var img;
   if ( !w ) {
   		w = 100;
   }
   if (! tot ) {
   	tot = 	IMAGES[SECTION].length;
	}
   var html = "";
  
  //html += "<h2>Downloads</h2>";
 // html += "<ul>";  
  //for ( i =0; i < LINKS[SECTION].length; i ++ ){
  //	html += '<li class="download"><a target="_blank" href="' + LINKS[SECTION][i][1] + '">' + LINKS[SECTION][i][0]   + '</a></li>';
 // }
 // html += "</ul>";
  
 // html += "<h2>Photos</h2>";
  //html += "";  
  html += '<a href="javascript:slideShow()">slideshow</a><br>'
  for ( i = 0; i < tot; i++ ) {
  		img = IMAGES[SECTION][i];
    	html += '<a href="javascript:showImage(' + i + ')">' + 
		'<img hspace="5" vspace="5" width="' + w + '" border="0" src="' + "http://www.flexperienceconsulting.com/forum/" + img[1] + "_thumb.jpg"  + '"></a>'; 
 	}
  html += "";
  //document.getElementById("mm_imglist").innerHTML =  html ;
   return html;
}

function showSummary(id) {
	SECTION = id;
	initVideo(false);
	//for ( i = 0; i < SECTIONS.length; i ++ ) {
	//	document.getElementById(SECTIONS[i]).style.fontWeight = "normal";
	//}
	//document.getElementById(id).style.fontWeight = "bold";
	//document.getElementById("event_details").innerHTML = BLURBS[id];
	initImages(9);
}
function showImages(sect) {
	SECTION = sect;
	var html = initImages(null,90);
	document.write( html );
}


function showSection(id) {
	SECTION = id;
	initVideo();
	for ( i = 0; i < SECTIONS.length; i ++ ) {
		document.getElementById(SECTIONS[i]).style.fontWeight = "normal";
	}
	document.getElementById(id).style.fontWeight = "bold";
	document.getElementById("event_details").innerHTML = BLURBS[id];
	
}
function nextMovie() {
	movieNum ++;
	showMovie( movieNum , 'true');
}
function showMovie(ndx,autoplay) {
movieNum = ndx;
clearTimeout(currTimeout);
  var mov = MOVIES[SECTION][ndx];
  var urlbase = SECTIONS[SECTION];
 
// id,desc,title,who
  var name = mov[2];
  var id = mov[0];
  var title = mov[2];
  var description = mov[1];
  var who = mov[3];
  
  newMovie(urlbase,name,id,title,description,who,autoplay);
}
function showImage(ndx) {
  var img = IMAGES[SECTION][ndx];
  var urlbase = "http://www.flexperienceconsulting.com/forum/";
  var path =  img[1] ;
  var desc = img[0];
	var url = "http://www.flexperienceconsulting.com/forum/" + path + ".jpg";  
	
	if( document.getElementById("viewer") ) {
	  document.getElementById("viewer").innerHTML = '<a href="' + url + '" target="nwwind"><img id="curr_img" src="' + url + '" border="0"  width="100%"/></a>'
	
	}
	if( document.getElementById("viewer_desc") ) {
	  document.getElementById("viewer_desc").innerHTML = desc;	
	}
	

}


var currentPosition;
var currentVolume;


function newMovie(urlbase,name,id,title,description,who, autoplay) {
//
// This function will load the movie file into the player
// (Note, the URL and a bunch of other possible parameters are not 
// given to the loadFile function (see above), only the defaults are
// you should be able to modify this code to do that as you see fit.
//
// This function also attempts to modify the text of some divs to update
// a detail view.  You will need the id's specified below to appear
// somewhere in one of your templates.
//  
//
// Note: the id's used in the getElementById calls below must match those
// in your detail view.  This is used  to perform dynamic updating of the
// detail view when clicking on an item in the summary view.
//
if ( id.match(/\.mp3/) ) {
  movie = urlbase+''+id;
} else {
  movie = urlbase+''+id+'.flv';
}

  image = urlbase+''+id+'.jpg';
  
  		var s1 = new SWFObject("mediaplayer.swf","mediaplayer",WIDTH,HEIGHT,"8");
		s1.addParam("allowfullscreen","true");
		s1.addVariable("width",WIDTH);
		s1.addVariable("height",HEIGHT);
		//if ( autoplay == 'true' ) {
		s1.addVariable("autostart","1");
		//}
		s1.addVariable("file",movie);
		s1.write("player");

  /**
  //loadFile(movie,title,movie,id,image,member);
  document.getElementById("mm_id").innerHTML = id;
  document.getElementById("mm_name").innerHTML = name;
  document.getElementById("mm_title").innerHTML = title;
  document.getElementById("mm_description").innerHTML = description;
  document.getElementById("mm_who").innerHTML = who;
  **/
};
