Index: /extensions/gsdl-video/trunk/web/flash/flowPlayer.js
===================================================================
--- /extensions/gsdl-video/trunk/web/flash/flowPlayer.js	(revision 19827)
+++ /extensions/gsdl-video/trunk/web/flash/flowPlayer.js	(revision 19827)
@@ -0,0 +1,450 @@
+/*
+ * FlowPlayer external configuration file.
+ * Copyright 2005-2006 Anssi Piirainen
+ *
+ * All settings defined in this file can be alternatively defined in the 
+ * embedding HTML object tag (as flashvars variables). Values defined in the
+ * object tag override values defined in this file. You could use this 
+ * config file to provide defaults for multiple player instances that 
+ * are used in a Web site. Individual instances can be then customized 
+ * with their embedding HTML.
+ *
+ * Note that you should probably remove all the comments from this file
+ * before using it. That way the file will be smaller and will load faster.
+ */
+{
+	/*
+	 * Instructs the player to load the configuration from an external config file.
+	 * This can be a abosulte URL or a relative url (relative to the HTML page
+	 * where the player is embedded).
+	 */
+//	configFileName: 'flowPlayer.js',
+
+	/*
+	 * Instructs the player to load the configuration from a RTMP server.
+	 * The player connects to the server listening in the address specified
+	 * by this URL and calls a method 'getStreamPlayerConfig' that should return a
+	 * valid FP configuration object.
+	 */
+//	rtmpConfigUrl: 'rtmp://localhost/myapp',
+
+	/*
+	 * A param value to be passed to getStreamPlayerConfig(). A value 'foobar'
+	 * will make the player to call getStreamPlayerConfig('foobsr')
+	 */
+//	rtmpConfigParam: 'anssi',
+	
+	/*
+	 * Name of the video file. Used if only one video is shown.
+	 *
+	 * Note for testing locally: Specify an empty baseURL '', if you want to load
+	 * the video from your local disk from the directory that contains
+	 * FlowPlayer.swf. In this case the videoFile parameter value should start
+	 * with a slash, for example '/video.flv'.
+	 *
+	 * See also: 'baseURL' that affects this variable
+	 */
+//	 videoFile: 'honda_accord.flv',
+
+	/*
+	 * Clip to be used if the file specified with 'videoFile' or any of the clips in the playlist
+	 * was not found.  The missing video clips are replaced by this clip. This can be
+	 * an image or a FLV clip. Typically this will contain an image/video saying
+	 * "the video you requested cannot be found.....".
+	 *
+	 * The syntax for the value is the same is with the clips in a playlist
+	 * including the possibility to have start/end and duration properties.
+	 *
+	 * See also: 'baseURL' that affects this variable
+	 */
+	 noVideoClip: { url: 'main_clickToPlay.jpg', duration: 10 },
+	 //noVideoClip: { url: 'MiltonFriedmanonLimi.flv' },
+
+	/*
+	 * Playlist is used to publish several videos using one player instance.
+	 * You can also have images in the playlist. The playback pauses in the
+	 * image unless a 'duration' property is given for the image:
+
+ * 	 * The clips in the playlist may have following properties:
+	 *
+	 * name: Name for the clip to be shown in the playlist view. If this is
+	 *       not given, the clip will be hidden from the view.
+	 *
+	 * url: The URL used to load the clip.
+	 * 
+	 * type: One of 'video', 'flv', 'swf', 'jpg'. Optional, determined from the URL's filename extension
+	 *       if that is present. 'video' means a video file in any format supported by Flash.
+	 *       'flv' is present here for backward compatibility, use 'video' in new FlowPlayer installations
+	 *       now. Defaults to 'video' if the extension is not present in the URL.
+	 *
+	 * start: The start time (seconds) from where to start the playback. A nonzero
+	 *        value can only be used when using a streaming server!!
+	 * end: The end time (seconds) where to stop the playback.
+	 *
+	 * duration: The duration the image is to be shown. If not given the playback
+	 *           pauses when the image is reached in the list.
+	 * 
+	 * protected: (true/false) Apply inlinine linking protection for this clip?
+	 *            Optional, defaults to false.
+	 * 
+	 * linkUrl: Associates a hyperlink pointing to the specified URL. The linked
+	 *          document will be opened to the browser when the clip area is clicked.
+	 * 			Specifying this parameter will replace the normal pause/resume behavior
+	 * 			that is associated to clicking the display area. If you specify an empty
+	 * 			linkUrl '' the pause/resume behavior is disabled but no hyperlink
+	 * 			is created.
+	 * linkWindow: Specifies the name of the browser window or frame into which to load
+	 *   the linked document. Can be a custom name or one of presets: '_blank', 
+	 *   '_parent', '_self', '_top'. (optional, defaults to '_blank')
+	 * 
+	 * controlEnabled: (true/false) Enable transport control buttons for this clip?
+	 *                 Optional, defaults to true.
+	 *
+	 * allowResize: (true/false) Allow resizing this clip according to the menu selection.
+	 *              Optional, defaults to true.
+	 *              
+	 * overlay: A filename pointing to an image that will be placed on top of this image clip. This
+	 *          is only applicable to image clips (jpg or png files). Essentially this layers two images
+	 *          on top of each other. Typically the image on top is a big play button that is used on
+	 *          top of an image taken from the main movie.
+	 * 
+	 * overlayId: ID that specifies a built-in overlay to be used. Currently the player supports
+	 * 			  one built-in overlay with ID 'play'. It renders a large play button with mouse hover color change.
+	 * 			  You can use this on top of image clips (one clip with both the 'url' property and
+	 * 			  'overlayId' property). 
+	 * 			  You can also specify a clip that only has this ID. In that
+	 * 			  case you should place it immediately before or after a FLV clip. This overlay-only
+	 * 			  clip is then rendered on top of the first or the last frame of the FLV video.
+	 * 
+	 * live: (true/false) Is this a live stream (played from a media server)?
+	 * 
+	 * showOnLoadBegin: (true/false) If true, make this clip visible when the fist bits have been loaded.
+	 * If false, do not show this clip (show the background instead) before the buffer is filled
+	 * and the playback starts. Optional, defaults to true.
+	 * 
+	 * maxPlayCount: The maximum play count for this clip. The clip is removed from the playlist when
+	 * the playcount reaches this amount.
+	 * 
+	 * suggestedClipsInfoUrl:  URL used to fetch suggestions (related videos) information from the server
+	 * 
+	 * See also: 'baseURL' is prefixed with each URL
+	 */
+	playList: [
+	{ url: 'main_clickToPlay.jpg' },
+	{ name: 'Honda Accord', url: '!honda_accord.flv' },
+	{ name: 'River', url: 'river.flv' },
+	{ name: 'Ounasvaara', url: 'ounasvaara.flv' }
+	],
+	
+	/*
+	 * Specifies wether the playlist control buttons should be shown in the player SWF component or not.
+	 * Optional, defaults to the value of showPlayList. 
+	 */
+	showPlayListButtons: true,
+
+	/*
+	 * Streaming server connection URL. 
+	 * You don't need this with lighttpd, just use the streamingServer setting (see below) with it.
+	 */
+//	 streamingServerURL: 'rtmp://localahost:oflaDemo',
+	
+	/*
+	 * Is this a live stream? Only makes sense when using a streaming server.
+	 * Optional, defaults to false.
+	 */
+//	liveStream: true,
+	
+	/* 
+	 * baseURL specifies the URL that is appended in front of different file names
+	 * given in this file.
+	 * 
+	 * You don't need to specify this at all if you place the video next to
+	 * the player SWF file on the Web server (to be available under the same URL path).
+	 */
+//	 baseURL: 'http://flowplayer.sourceforge.net/video',
+	
+	
+	/*
+	 * What kind of streaming server? Available options: 'fms', 'red5', 'lighttpd'
+	 */
+//	streamingServer: 'fms',
+	
+	/*
+	 * Specifies whether thumbnail information is contained in the FLV's cue point 
+	 * metadata. Cue points can be injected into the FLV file using 
+	 * for example Flvtool2. See the FlowPlayer web site for more info.
+	 * (optional, defaults to false)
+	 * 
+	 * See also: cuePoints below for an alternative way of specifying thumb metadata
+	 */
+//	thumbsOnFLV: true,
+	
+	/*
+	 * Thumbnails specific to cue points. Use this if you don't want to
+	 * embed thumbnail metadata into the FLV's cue points. 
+	 * If you have thumbNails defined here you should have thumbsOnFLV: false !
+	 * thumb times are given in seconds
+	 */
+// 	thumbs: [
+// 	{ thumbNail:  'Thumb1.jpg', time: 10 },
+// 	{ thumbNail:  'Thumb2.jpg', time: 24 },
+// 	{ thumbNail:  'Thumb3.jpg', time: 54 },
+// 	{ thumbNail:  'Thumb4.jpg', time: 74 },
+// 	{ thumbNail:  'Thumb5.jpg', time: 94 },
+// 	{ thumbNail:  'Thumb6.jpg', time: 110 }
+// 	],
+	// Location of the thumbnail files
+// 	thumbLocation: 'http://www.kolumbus.fi/apiirain/video',
+	
+	/* 
+	 * 'autoPlay' variable defines whether playback begins immediately or not.
+	 * 
+	 * Note that currently with red5 you should not have false in autoPlay 
+	 * when you specify a nonzero starting position for the video clip. This is because red5
+	 * does not send FLV metadata when the playback starts from a nonzero value.
+	 * 
+	 * (optional, defaults to true)
+	 */
+	autoPlay: true,
+
+	/*
+	 * 'autoBuffering' specifies wheter to start loading the video stream into
+	 *  buffer memory  immediately. Only meaningful if 'autoPlay' is set to
+	 * false. (optional, defaults to true)
+	 */
+	autoBuffering: true,
+
+	/*
+	 * 'startingBufferLength' specifies the video buffer length to be used to kick
+	 * off the playback. This is used in the beginning of the playback and every time
+	 * after the player has ran out of buffer memory. 
+	 * More info at: http://www.progettosinergia.com/flashvideo/flashvideoblog.htm#031205
+	 * (optional, defaults to the value of 'bufferLength' setting)
+	 * 
+	 * see also: bufferLength
+	 */
+//	startingBufferLength: 5,
+
+	/*
+	 * 'bufferLength' specifies the video buffer length in seconds. This is used
+	 * after the playback has started with the initial buffer length. You should
+	 * use an arbitrary large value here to ensure stable playback.
+	 * (optional, defaults to 10 seconds)
+	 * 
+	 * see also: startingBufferLength
+	 */
+	bufferLength: 20,
+
+	/*
+	 * 'loop' defines whether the playback should loop to the first clip after
+	 * all clips in the playlist have been shown. It is used as the
+	 * default state of the toggle button that controls looping. (optional,
+	 * defaults to true)
+	 */
+	loop: true,
+
+	/*
+	 * Rewind back to the fist clip in the playlist when end of the list has been reached?
+	 * This option only has effect if loop is false (please see loop variable above).
+	 * (optional, defaults to false)
+	 */
+	autoRewind: true,
+	
+	/*
+	 * Specifies wether the loop toggle button should be shown in the player SWF component or not.
+	 * Optional, defaults to false. 
+	 */
+//	showLoopButton: true,
+	
+	/*
+	 * Specifies the height to be allocated for the video display. This is the
+	 * maximum height available for the different resizing options.
+	 */
+	videoHeight: 320,
+	
+	/*
+	 * Specifies the width for the control buttons area. Optiona, defaults to the
+	 * width setting used in the embedding code. 
+	 */
+//	controlsWidth: 480,
+	
+	/*
+	 * Specifies how the video is scaled initially. This can be then changed by
+	 * the user through the menu. (optional, defaults to 'fit')
+	 * Possible values:
+	 * 'fit'   Fit to window by preserving the aspect ratios encoded in the FLV metadata.
+	 *         This is the default behavior.
+	 * 'half'  Half size (preserves aspect ratios)
+	 * 'orig'  Use the dimensions encoded in FLV. If the video is too big for the 
+	 *         available space the video is scaled as if using the 'fit' option.
+	 * 'scale' Scale the video to fill all available space for the video. Ignores
+	 *         the dimensions in metadata.
+	 * 
+	 */
+	initialScale: 'fit',
+	
+	/*
+	 * Specifies if the menu containing the size options should be shown or not.
+	 * (optional, defaults to true)
+//	showMenu: false,
+	
+	/*
+	 * 'hideControls' if set to true, hides all buttons and the progress bar
+	 * leaving only the video showing (optional, defaults to false)
+	 */
+	hideControls: false,
+
+	/*
+	 * URL that specifies a base URL that points to a folder containing
+	 * images used to skin the player. You must specify this if you intend
+	 * to load external button images (see 'loadButtonImages' below).
+	 */
+	skinImagesBaseURL: 'http://flowplayer.sourceforge.net/resources'
+
+	/*
+	 * Will button images be loaded from external files, or will images embedded
+	 * in the player SWF component be used? Set this to false if you want to "skin"
+	 * the buttons. Optional, defaults to true.
+	 * 
+	 * NOTE: If you set this to false, you need to have the skin images available
+	 * on the server! Otherwise the player will not show up at all or will show
+	 * up corrupted.
+	 *
+	 * See also: 'skinImagesBaseURL' that affects this variable
+	 */
+//	useEmbeddedButtonImages: false,
+	
+	/*
+	 * 'splashImageFile' specifies an image file to be used as a splash image.
+	 * This is useful if 'autoPlay' is set to false and you want to show a
+	 * welcome image before the video is played. Should be in JPG format. The
+	 * value of 'baseURL' is used similarily as with the video file name and
+	 * therefore the video and the image files should be placed in the Web
+	 * server next to each other.
+	 * 
+	 * NOTE: If you set a value for this, you need to have the splash image available
+	 * on the server! Otherwise the player will not show up at all or will show
+	 * up corrupted.
+	 *
+	 * NOTE2: You can also specify the splash in a playlist. This is just
+	 * an alternative way of doing it. It was preserved for backward compatibility.
+	 *
+	 * See also: 'baseURL' that affects this variable
+	 */
+//	splashImageFile: 'main_clickToPlay.jpg',
+	
+	/*
+	 * Should the splash image be scaled to fit the entire video area? If false,
+	 * the image will be centered. Optional, defaults to false.
+	 */
+//	scaleSplash: false,
+
+	/*
+	 * 'progressBarColor1' defines the color of the progress bar at the bottom
+	 * and top edges. Specified in hexadecimal triplet form indicating the RGB
+	 * color component values. (optional)
+	 */
+//	progressBarColor1: 0xFFFFFF,
+
+
+	/*
+	 * 'progressBarColor2' defines the color in the middle of the progress bar.
+	 * The value of this and 'progressBarColor1' variables define the gradient
+	 * color fill of the progress bar. (optional)
+	 */
+//	progressBarColor2: 0xDDFFDD,
+
+	/*
+	 * 'bufferBarColor1' defines the color of the buffer size indicator bar at the bottom
+	 * and top edges. (optional)
+	 */
+//	bufferBarColor1: 0xFFFFFF,
+
+
+	/*
+	 * 'bufferBarColor2' defines the color of the buffer size indicator bar in the middle
+	 * of the bar. (optional)
+	 */
+//	bufferBarColor2: 0xDDFFDD,
+
+	/*
+	 * 'progressBarBorderColor1' defines the color of the progress bar's border at the bottom
+	 * and top edges. (optional)
+	 */
+//	progressBarBorderColor1: 0xDDDDDD,
+
+
+	/*
+	 * 'progressBarBorderColor2' defines the color of the progress bar's border in the middle
+	 * of the bar. (optional)
+	 */
+//	progressBarBorderColor2: 0xEEEEEE,
+
+	/*
+	 * 'bufferingAnimationColor' defines the color of the moving bars used in the buffering 
+	 * animation. (optional)
+	 */
+//	bufferingAnimationColor: 0x0000FF,
+
+	/*
+	 * 'controlsAreaBorderColor' defines the color of the border behind buttons and progress bar 
+	 * (optional)
+	 */
+//	controlsAreaBorderColor: 0x1234,
+
+	/*
+	 * 'timeDisplayFontColor' defines the color of the progress/duration time display 
+	 * (optional)
+	 */
+//	timeDisplayFontColor: 0xAABBCC,
+
+	/*
+	 * Height of the progress bar. (optional)
+	 */
+//	progressBarHeight: 10,
+
+	/*
+	 * Height of the progress bar area. (optional)
+	 */
+//	progressBarAreaHeight: 10,
+
+	/*
+	 * Name of the authentication code file name that is used to prevent inline linking
+	 * of video and image files. This can be a complete URL or just a file name relative
+	 * to the location from where the player is loaded. (optional, defaults to flowplayer_auth.txt)
+	 */
+//	authFileName: 'http://www.mytube.org/authCode.txt',
+
+	/*
+	 * The URL pointing to a sctipt that opens the player full screen. 
+	 * If this is not configured explicitly, the default script, 
+	 * http://flowplayer.sourceforge.net/fullscreen.js, is used.
+	 */
+//	fullScreenScriptURL: 'http://mysite.org/fullscreen.js'
+
+	/**
+	 * Specifies which menu items will be show. This is an array that contains a boolean
+	 * value for each of the items. By default shows them all except "full screen".
+	 */
+//	menuItems[
+//		true, // show 'Fit to window'
+//		true, // show 'Half size'
+//		true, // show 'Original size'
+//		true, // show 'Fill window'
+//		true, // show 'Full screen'
+//		false // hide 'Embed...'
+//	],
+
+
+	/*
+	 * Specifies wether the full screen button should be shown in the player SWF component or not.
+	 * Optional, defaults to true. 
+	 */
+//	showFullScreenButton: false,
+
+	/*
+	 * Use the Flash 9 native full screen mode.
+	 */
+//	useNativeFullScreen: true,
+}
+
Index: /extensions/gsdl-video/trunk/web/flash/fullscreen.js
===================================================================
--- /extensions/gsdl-video/trunk/web/flash/fullscreen.js	(revision 19827)
+++ /extensions/gsdl-video/trunk/web/flash/fullscreen.js	(revision 19827)
@@ -0,0 +1,15 @@
+/*
+ * Default FlowPlayer fullscreen opener.
+ * http://flowplayer.sourceforge.net
+ */
+
+function flowPlayerOpenFullScreen(config) {
+  var winWidth = window.screen.availWidth;
+  var winHeight = window.screen.availHeight;
+  var fullScreenWindow = window.open('http://flowplayer.org/video/1_20/fullscreen.html?config='+config, 'FlowPlayer', 'left=0,top=0,width='+winWidth+',height='+winHeight+',status=no,resizable=yes');
+}
+
+function flowPlayerExitFullScreen(config) {
+  self.close();
+}
+
Index: /extensions/gsdl-video/trunk/web/flash/suggestions.js
===================================================================
--- /extensions/gsdl-video/trunk/web/flash/suggestions.js	(revision 19827)
+++ /extensions/gsdl-video/trunk/web/flash/suggestions.js	(revision 19827)
@@ -0,0 +1,10 @@
+{
+	clips: [
+		{ url: 'honda_accord.flv', name: 'Honda commercial', suggestedClipsInfoUrl: 'suggestions.js',
+					duration: 180, thumbnailUrl: 'Thumb1.jpg', 
+					info: { viewed: 631, category: 'ads' } },
+		{ url: 'river.flv', name: 'Skiing in Rovaniemi', suggestedClipsInfoUrl: 'suggestions.js',
+					duration: 180, thumbnailUrl: 'Thumb2.jpg',
+					info: { viewed: 2, category: 'sports' } }
+	]
+}
Index: /extensions/gsdl-video/trunk/web/flash/swfobject.js
===================================================================
--- /extensions/gsdl-video/trunk/web/flash/swfobject.js	(revision 19827)
+++ /extensions/gsdl-video/trunk/web/flash/swfobject.js	(revision 19827)
@@ -0,0 +1,138 @@
+/**
+ * SWFObject v1.4.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
+ *
+ * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ *
+ * **SWFObject is the SWF embed script formerly known as FlashObject. The name was changed for
+ *   legal reasons.
+ */
+if(typeof deconcept=="undefined"){var deconcept=new Object();}
+if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
+if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
+deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
+this.DETECT_KEY=_b?_b:"detectflash";
+this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
+this.params=new Object();
+this.variables=new Object();
+this.attributes=new Array();
+if(_1){this.setAttribute("swf",_1);}
+if(id){this.setAttribute("id",id);}
+if(w){this.setAttribute("width",w);}
+if(h){this.setAttribute("height",h);}
+if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
+this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
+if(c){this.addParam("bgcolor",c);}
+var q=_8?_8:"high";
+this.addParam("quality",q);
+this.setAttribute("useExpressInstall",_7);
+this.setAttribute("doExpressInstall",false);
+var _d=(_9)?_9:window.location;
+this.setAttribute("xiRedirectUrl",_d);
+this.setAttribute("redirectUrl","");
+if(_a){this.setAttribute("redirectUrl",_a);}};
+deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
+this.attributes[_e]=_f;
+},getAttribute:function(_10){
+return this.attributes[_10];
+},addParam:function(_11,_12){
+this.params[_11]=_12;
+},getParams:function(){
+return this.params;
+},addVariable:function(_13,_14){
+this.variables[_13]=_14;
+},getVariable:function(_15){
+return this.variables[_15];
+},getVariables:function(){
+return this.variables;
+},getVariablePairs:function(){
+var _16=new Array();
+var key;
+var _18=this.getVariables();
+for(key in _18){_16.push(key+"="+_18[key]);}
+return _16;},getSWFHTML:function(){var _19="";
+if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
+if(this.getAttribute("doExpressInstall")){
+this.addVariable("MMplayerType","PlugIn");}
+_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\"";
+_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";
+var _1a=this.getParams();
+for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}
+var _1c=this.getVariablePairs().join("&");
+if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";
+}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
+_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\">";
+_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";
+var _1d=this.getParams();
+for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}
+var _1f=this.getVariablePairs().join("&");
+if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}
+return _19;
+},write:function(_20){
+if(this.getAttribute("useExpressInstall")){
+var _21=new deconcept.PlayerVersion([6,0,65]);
+if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
+this.setAttribute("doExpressInstall",true);
+this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
+document.title=document.title.slice(0,47)+" - Flash Player Installation";
+this.addVariable("MMdoctitle",document.title);}}
+if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
+var n=(typeof _20=="string")?document.getElementById(_20):_20;
+n.innerHTML=this.getSWFHTML();return true;
+}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
+return false;}};
+deconcept.SWFObjectUtil.getPlayerVersion=function(){
+var _23=new deconcept.PlayerVersion([0,0,0]);
+if(navigator.plugins&&navigator.mimeTypes.length){
+var x=navigator.plugins["Shockwave Flash"];
+if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}
+}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}
+catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
+_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}
+catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}
+catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}
+return _23;};
+deconcept.PlayerVersion=function(_27){
+this.major=_27[0]!=null?parseInt(_27[0]):0;
+this.minor=_27[1]!=null?parseInt(_27[1]):0;
+this.rev=_27[2]!=null?parseInt(_27[2]):0;
+};
+deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
+if(this.major<fv.major){return false;}
+if(this.major>fv.major){return true;}
+if(this.minor<fv.minor){return false;}
+if(this.minor>fv.minor){return true;}
+if(this.rev<fv.rev){
+return false;
+}return true;};
+deconcept.util={getRequestParameter:function(_29){
+var q=document.location.search||document.location.hash;
+if(q){var _2b=q.substring(1).split("&");
+for(var i=0;i<_2b.length;i++){
+if(_2b[i].substring(0,_2b[i].indexOf("="))==_29){
+return _2b[i].substring((_2b[i].indexOf("=")+1));}}}
+return "";}};
+deconcept.SWFObjectUtil.cleanupSWFs=function(){if(window.opera||!document.all){return;}
+var _2d=document.getElementsByTagName("OBJECT");
+for(var i=0;i<_2d.length;i++){_2d[i].style.display="none";for(var x in _2d[i]){
+if(typeof _2d[i][x]=="function"){_2d[i][x]=function(){};}}}};
+deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};
+__flash_savedUnloadHandler=function(){};
+if(typeof window.onunload=="function"){
+var _30=window.onunload;
+window.onunload=function(){
+deconcept.SWFObjectUtil.cleanupSWFs();_30();};
+}else{window.onunload=deconcept.SWFObjectUtil.cleanupSWFs;}};
+if(typeof window.onbeforeunload=="function"){
+var oldBeforeUnload=window.onbeforeunload;
+window.onbeforeunload=function(){
+deconcept.SWFObjectUtil.prepUnload();
+oldBeforeUnload();};
+}else{window.onbeforeunload=deconcept.SWFObjectUtil.prepUnload;}
+if(Array.prototype.push==null){
+Array.prototype.push=function(_31){
+this[this.length]=_31;
+return this.length;};}
+var getQueryParamValue=deconcept.util.getRequestParameter;
+var FlashObject=deconcept.SWFObject;
+var SWFObject=deconcept.SWFObject;
Index: /extensions/gsdl-video/trunk/web/script/document.js
===================================================================
--- /extensions/gsdl-video/trunk/web/script/document.js	(revision 19827)
+++ /extensions/gsdl-video/trunk/web/script/document.js	(revision 19827)
@@ -0,0 +1,416 @@
+
+  function format_date (gsdate,mode) 
+  {
+       var year_num  = gsdate.substr(0,4);
+       var month_num = gsdate.substr(4,2);
+       var date_num  = gsdate.substr(6,2);
+
+       var date = new Date(year_num,month_num-1,date_num)
+
+       var date_str = date.toLocaleDateString();
+
+       if ((mode != undefined) && (mode == "alphanum"))
+       {
+           var dayname   = new Array("Sunday","Monday","Tuesday","Wednesday",
+                                     "Thursday","Friday","Saturday");
+           var monthname = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul",
+                                     "Aug","Sep","Oct","Nov","Dec");
+
+           var day_alpha   = dayname[date.getDay()];
+           var month_alpha = monthname[date.getMonth()];
+
+           date_str = day_alpha +", "
+                       + date_num +" "+ month_alpha +" "+ year_num;
+        }
+
+       document.write(date_str);
+  }
+
+  function format_filesize (gsfilesize) 
+  {
+      var filesize = gsfilesize + " bytes";
+
+      if (gsfilesize > 1048576) {
+        filesize = Math.round(gsfilesize / 1048576.0) + " Mb"
+      }
+      else if (gsfilesize > 1024) {
+        filesize = Math.round(gsfilesize / 1024.0) + " Kb"
+      }
+
+      document.write(filesize);
+  }
+
+
+
+function getOpenBookTable() {
+
+        var tabTocA = document.getElementById("toc");
+
+        // book icon and toc wrapper
+        var tablesOuter = tabTocA.parentNode.getElementsByTagName("table")
+
+        return tablesOuter.item(0);
+
+}
+
+function getTocTable() {
+
+        var tabTocA = document.getElementById("toc");
+
+        // book icon and toc wrapper
+        var tablesOuter = tabTocA.parentNode.getElementsByTagName("table")
+        
+        var tabWrap = tablesOuter.item(1);
+
+        var tables = tabWrap.getElementsByTagName("table")
+
+        return tables.item(0);
+
+}
+
+
+
+
+function manipulateTocTable() {
+
+	var tabOB= getOpenBookTable();
+
+	if (tabOB != null) {
+	  var expandText = document.getElementById("db-expand-text");
+	  var highlight  = document.getElementById("db-highlight");
+	  var parentDB = expandText.parentNode;
+
+	  parentDB.removeChild(expandText);
+	  parentDB.removeChild(highlight);
+
+	  var tbodyOB = tabOB.firstChild;
+	  var trOB = tbodyOB.firstChild;
+	  trOB.appendChild(expandText);
+	  trOB.appendChild(highlight);
+
+	  tabOB.setAttribute("width","100%");
+	  
+  	  // tabOB.setAttribute("bgcolor","red");
+	}
+
+
+	var tabToc= getTocTable();
+
+	if (tabToc != null) {
+
+	    var tablePack = document.createElement("table");
+	    var tbodyPack = document.createElement("tbody");
+	    tablePack.appendChild(tbodyPack);
+
+	    var trPack = document.createElement("tr");
+	    trPack.setAttribute("bgColor","#e0f0ff");
+
+
+  	    var trList = tabToc.getElementsByTagName("tr")
+
+	    // repack into 3-col table
+	    var i;
+	    for (i=0; i<trList.length; i++) {
+	      if ((i>0) && (i % 3 == 0)) {
+	        tbodyPack.appendChild(trPack);
+	        trPack = document.createElement("tr");
+		trPack.setAttribute("bgColor","#e0f0ff");
+	      }
+	      var tr = trList.item(i);
+	      var tdList = tr.getElementsByTagName("td");
+
+	      //console.log("tdList = " + tdList.length);
+
+	      var tdLink = tdList.item(0);
+	      var href = tdLink.firstChild.href;
+
+	      href = "javascript:htmlLoad(\""+href+"&onlytext=1\",\"ajaxtext\")";
+
+	      var tdText = tdList.item(2);
+
+	      var aPack = document.createElement("a");
+	      aPack.setAttribute("href",href);
+	      aPack.setAttribute("class","toc");
+	      aPack.innerHTML = tdText.innerHTML;
+
+	      var iPack = document.createElement("i");
+	      iPack.appendChild(aPack);
+
+	      //var tdPack = tdText.cloneNode(true);
+	      var tdPack = document.createElement("td");
+	      tdPack.appendChild(iPack);
+
+	      // var textText = document.createTextNode(tdText.innerHTML);
+
+	      // tdPack.appendChild(textText);
+
+	      // tdPack.setAttribute("bgcolor","blue");
+	      trPack.appendChild(tdPack);
+
+	    }
+
+	    tbodyPack.appendChild(trPack);
+
+	    // find outer table element, and replace with new compact TOC
+	    var newTocLoc = tabToc.parentNode;
+	    while (!newTocLoc.nodeName.match(/^table$/i)) {
+	        newTocLoc = newTocLoc.parentNode;
+	    }
+
+	    
+	    // set up list of TOC chapter headings (used when video player is shown)
+
+	    //var tocList = document.createElement("div");
+	    //tocList.setAttribute("style","display: block");
+
+	    var tocList  = document.getElementById("toclist");
+
+	    for (i=0; i<trList.length; i++) {
+	      var tr = trList.item(i);
+	      var tdList = tr.getElementsByTagName("td");
+	      var tdText = tdList.item(1);
+
+	      // alert("tdText = " + tdText.innerHTML);
+
+	      var tocEntry = document.createElement("div");
+	      tocEntry.style.display = "none";
+
+	      tocEntry.innerHTML = tdText.innerHTML;
+
+	      //tocEntry.appendChild(tdText);
+
+	      tocList.appendChild(tocEntry);
+	    }
+	
+
+	    // delay replace until here so toclist can access trList
+	    // in IE, doing replace earlier means trList becomes empty
+	    newTocLoc.parentNode.replaceChild(tablePack,newTocLoc);    
+
+	}
+	else {
+	  var mess = "Warning: Didn't find TOC table where expected in DOM";
+	  mess += "\n Found <" + tabToc.nodeName + ">instead of <table>";
+	  mess += "\n Unable to manipulate: " + tabToc.nodeValue;
+ 
+	  alert(mess);
+	}
+
+}
+
+
+    var flowplayervisible = 1;
+    var storedFlowplayerHeight = null;
+
+    function flowplayershow() 
+     {
+        if (flowplayervisible) return; // already visible
+
+        divTOCtableElem = document.getElementById("toctable");
+	divTOCtableElem.style.display = "none";
+
+        divTOCnextprevElem = document.getElementById("tocnextprev");
+	divTOCnextprevElem.style.display = "block";
+
+        var divFlowplayerElem = document.getElementById("FlowPlayerDiv");
+	divFlowplayerElem.style.visibility = "visible";
+
+	if (storedFlowplayerHeight != null) {
+	    divFlowplayerElem.style.height = storedFlowplayerHeight;
+        }
+
+	var flowPlayer = document.getElementById("FlowPlayer");
+
+	if (flowPlayer.DoPlay) {
+	    flowPlayer.DoPlay();
+	}
+
+        flowplayervisible = 1;
+      }
+
+    function flowplayerhide() 
+     {
+        if (!flowplayervisible) return; // already hidden
+
+
+        divTOCnextprevElem = document.getElementById("tocnextprev");
+	divTOCnextprevElem.style.display = "none";
+
+        var divFlowplayerElem = document.getElementById("FlowPlayerDiv");
+
+	if (parseInt(divFlowplayerElem.style.height) != "0") {
+	    storedFlowplayerHeight = divFlowplayerElem.style.height;
+	}
+	divFlowplayerElem.style.height = "0px";
+	divFlowplayerElem.style.visibility = "hidden";
+
+        divTOCtableElem = document.getElementById("toctable");
+	divTOCtableElem.style.display = "block";
+
+        var flowPlayer = document.getElementById("FlowPlayer");
+
+	if (flowPlayer.Pause) {
+	    flowPlayer.Pause();
+	}
+
+        flowplayervisible = 0;
+      }
+
+    var storedseek;
+    var delayedSafetyLimit = 0;
+
+    function videoplayerseekDelayed() 
+     {
+          var flowPlayer = document.getElementById("FlowPlayer");
+
+          if (flowPlayer.Seek) {
+	     flowPlayer.Pause();
+	     flowPlayer.Seek(storedseek);
+	     flowPlayer.DoPlay()
+          }
+	  else {
+	     if (delayedSafetyLimit<10) {
+	       delayedSafetyLimit++;
+	       setTimeout("videoplayerseekDelayed()",2000);
+             }
+	     else {
+	       alert("Failed to start at seeked position " + storedseek);
+	     }
+	  }
+
+      }
+
+
+    function videoplayerseek(hh,mm,ss) 
+     {
+	  flowplayershow();
+
+          storedseek = hh*3600 + mm*60 + ss -2;
+
+          var flowPlayer = document.getElementById("FlowPlayer");
+
+          if (flowPlayer.Seek) {
+	      videoplayerseekDelayed();
+          }
+	  else {
+	     delayedSafetyLimit = 0;
+	     setTimeout("videoplayerseekDelayed()",7000);
+	  }
+
+      }
+
+    function audioplayerseek(hh,mm,ss) 
+     {
+          storedseek = hh*3600 + mm*60 + ss -2;
+
+          var flowPlayer = document.getElementById("FlowPlayer");
+
+          if (flowPlayer.Seek) {
+	      videoplayerseekDelayed();
+          }
+	  else {
+	     delayedSafetyLimit = 0;
+	     setTimeout("videoplayerseekDelayed()",7000);
+	  }
+
+      }
+
+
+      function onCuePoint(cuePoint) 
+      {
+           if (cuePoint.type != "event") { return; }
+
+	  var tocList = document.getElementById("toclist");
+
+	  var tocEntries = tocList.getElementsByTagName("div");
+	  var parameters = cuePoint.parameters;
+	  var secNum = cuePoint.parameters.sectionnum;
+
+	  var tocNum = secNum-1;
+
+	  tocLen = tocEntries.length;
+
+	  var i;
+	  for (i=0; i<tocLen; i++)
+	  {
+	        var tocItem = tocEntries.item(i);
+
+	        if (i==tocNum-1) {
+		  var prevImg = document.getElementById("tocless");
+		  prevImg.setAttribute("title",tocItem.innerHTML);
+		}
+
+
+		if (i!=tocNum) {
+	          tocItem.style.display = "none";
+		}
+		else {
+	          tocItem.style.display = "block";
+
+		  // load in matching document-section text
+		  var url = document.location.toString();
+
+		  var nexturl = url;
+		  var nextSecNum = tocNum + 1;
+
+		  var doccutoff = url.lastIndexOf("&d=");
+		  var dotcutoff = url.lastIndexOf(".");
+
+		  if (dotcutoff>doccutoff) {
+		    nexturl = url.substring(0,dotcutoff);
+		  }
+
+		  nexturl = nexturl + "." + nextSecNum + "&onlytext=1";
+		  //alert("nexturl = " + nexturl);
+
+		  htmlLoad(nexturl,"ajaxtext");
+
+		}
+
+	        if (i==tocNum+1) {
+		  var moreImg = document.getElementById("tocmore");
+		  moreImg.setAttribute("title",tocItem.innerHTML);
+		}
+
+	  }
+
+
+      }
+
+
+
+
+  function htmlLoad(url,locid)
+  {
+    var xmlHttp;
+    try {
+      // Firefox, Opera 8.0+, Safari
+      xmlHttp=new XMLHttpRequest();
+    }
+    catch (e) {
+      // Internet Explorer
+      try {
+        xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
+      }
+      catch (e) {
+        try {
+          xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
+        }
+        catch (e) {
+          alert("Your browser does not support AJAX!");
+          return false;
+        }
+      }
+    }
+
+    xmlHttp.onreadystatechange=function() {
+      if(xmlHttp.readyState==4) {
+        var locelem = document.getElementById(locid);
+        
+        locelem.innerHTML = xmlHttp.responseText;
+      }
+    }
+
+    xmlHttp.open("GET",url,true);
+    xmlHttp.send(null);
+  }
