					// load the video as a child to the dialog box
					function loadflv(wxDB,vid,vidname){
						var v = document.getElementById("video");
						if(!v){
							var d = document.createElement("div");
							dojo.attr(d,"id","video");
							wxDB.domNode.appendChild(d);
						}
						
						 var att = { data:"/fileadmin/webex09/files_en_us/swf/getting_started/vidplayer-gettingstarted.swf", width:"640", height:"360" };
				         var par = { flashvars:"vidpath=/fileadmin/webex09/files_en_us/swf/getting_started/"+vid+".flv&vidname="+vidname };
				    	 var id = "video";
						 swfobject.createSWF(att, par, id); 
						 
			    	}
					
					//destroy the flv video 
					function destroyflv(){
						swfobject.removeSWF("video");
					}
					//handle video link clicks					
					function onClickHandler(wxDB,vid){
						dojo.marginBox(wxDB.domNode,{l:300,t:100,w:640,h:386});
						var vidname;
						switch(vid){
							case "vid1" : {var title="Schedule a meeting";vidname="Learn how to schedule a meeting - GETTING STARTED PAGE";break;}
							case "vid2" : {var title="Desktop sharing";vidname="See how desktop sharing works - GETTING STARTED PAGE"; break;}
							case "vid3" : {var title="Share documents";vidname="Learn how to share documents - GETTING STARTED PAGE";break;}
							case "vid4" : {var title="Webex whiteboard";vidname="Check out the WebEx whiteboard - GETTING STARTED PAGE"; break;}
							case "vid5" : {var title="Productivity tools";vidname="";break;}
							case "vid6" : {var title="Free iPhone app";vidname="";break;}
							case "vid7" : {var title="WebEx on smartphone";vidname="";break;}
						}
						dojo.byId(wxDB.id+"_title").innerHTML="Now playing : "+title;
						wxDB.show();
						loadflv(wxDB,vid,vidname);
						
					}
					// instantiate the dialog box and publish events (Not DOM) from the video links or buttons to the subscriber (onClickHandler)
					dojo.require("dojo.parser");dojo.require("dijit.form.Button");
					dojo.require("dijit.Dialog");
					dojo.addOnLoad(function(){
						
						
						dojo.addClass(dojo.query("body")[0],"tundra");
						var wxDBRef = new dijit.Dialog({id:"dbVid", title:"Video"}).placeAt(dojo.query("body")[0],"last");
						wxDBRef.onCancel=function(evt){this.hide();destroyflv();} 
						dojo.subscribe("videoClicked",onClickHandler);								
						dojo.byId("vid1").onclick=function(evt){dojo.stopEvent(evt);dojo.publish("videoClicked",[wxDBRef,"vid1"]);}
						dojo.byId("vid2").onclick=function(evt){dojo.stopEvent(evt);dojo.publish("videoClicked",[wxDBRef,"vid2"]);}
						dojo.byId("vid3").onclick=function(evt){dojo.stopEvent(evt);dojo.publish("videoClicked",[wxDBRef,"vid3"]);}
						dojo.byId("vid4").onclick=function(evt){dojo.stopEvent(evt);dojo.publish("videoClicked",[wxDBRef,"vid4"]);}
						
						var middleClickedVideo=location.href.match(/#(.*)$/i)
						if(middleClickedVideo){
							dojo.publish("videoClicked",[wxDBRef,middleClickedVideo[1]]);
						}
						

					});
					
