
/**
 * 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;


var widget_id = 403276446;

var video_list = document.getElementById('vidget_list_' + widget_id);
var video_player = document.getElementById('vidget_player_' + widget_id);
var loading_header = document.getElementById('loading_viddler_' + widget_id);
loading_header.style.display = "none";

var video_json = {"video_list":{"video":[{"permalink":"http://www.viddler.com/explore/beamz/videos/17/","html5_video_source":"http://www.viddler.com/file/a76ef047/html5","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2010-01-07T18:11:01-07:00","title":"Beamz Assessment - Dr. Barry Bittman","files":null,"url":"http://www.viddler.com/explore/beamz/videos/17/","id":"a76ef047","tags":null,"comment_count":0,"age_limit":"","impression_count":4376,"uploaded_at":"2010-01-07T18:03:35-07:00","description":"Beamz Assessment - Dr. Barry Bittman - Chief Innovations Officer - Meadville Medical Center","length":307,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_a76ef047.jpg","comments_moderation":null,"status":"ready","view_count":898},{"permalink":"http://www.viddler.com/explore/beamz/videos/16/","html5_video_source":"","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-12-08T00:01:01-07:00","title":"Phoenix Union High School District","files":null,"url":"http://www.viddler.com/explore/beamz/videos/16/","id":"d953a4fc","tags":null,"comment_count":1,"age_limit":"","impression_count":1457,"uploaded_at":"2009-12-07T23:52:32-07:00","description":"Interview with Louis Kiereopoulos - Technology Educator, Special Needs","length":186,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_d953a4fc.jpg","comments_moderation":null,"status":"ready","view_count":359},{"permalink":"http://www.viddler.com/explore/beamz/videos/15/","html5_video_source":"","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-11-23T21:29:00-07:00","title":"Phoenix Children's Hospital Interview","files":null,"url":"http://www.viddler.com/explore/beamz/videos/15/","id":"1fa58f7f","tags":null,"comment_count":0,"age_limit":"","impression_count":1041,"uploaded_at":"2009-11-23T21:23:31-07:00","description":"Interview with Phoenix Children's Hospital Teacher Rachael Lyndon","length":254,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_1fa58f7f.jpg","comments_moderation":null,"status":"ready","view_count":367},{"permalink":"http://www.viddler.com/explore/beamz/videos/14/","html5_video_source":"","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-10-08T15:58:02-07:00","title":"School Solutions - Beamz Usage in Phoenix Union High School District","files":null,"url":"http://www.viddler.com/explore/beamz/videos/14/","id":"e9eb6496","tags":null,"comment_count":1,"age_limit":"","impression_count":1350,"uploaded_at":"2009-10-08T15:46:44-07:00","description":"","length":211,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_e9eb6496.jpg","comments_moderation":null,"status":"ready","view_count":538},{"permalink":"http://www.viddler.com/explore/beamz/videos/9/","html5_video_source":"","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-07-09T12:28:01-07:00","title":"Beamz Kids - Old MacDonald","files":null,"url":"http://www.viddler.com/explore/beamz/videos/9/","id":"5f25d51","tags":null,"comment_count":0,"age_limit":"","impression_count":758,"uploaded_at":"2009-07-09T12:25:55-07:00","description":"Beamz Kids - Old MacDonald","length":33,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_5f25d51.jpg","comments_moderation":null,"status":"ready","view_count":577},{"permalink":"http://www.viddler.com/explore/beamz/videos/8/","html5_video_source":"","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-07-09T12:14:02-07:00","title":"Beamz Original - Club Techno","files":null,"url":"http://www.viddler.com/explore/beamz/videos/8/","id":"9054e4ba","tags":null,"comment_count":0,"age_limit":"","impression_count":904,"uploaded_at":"2009-07-09T12:12:11-07:00","description":"Beamz Original - Club Techno","length":46,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_9054e4ba.jpg","comments_moderation":null,"status":"ready","view_count":697},{"permalink":"http://www.viddler.com/explore/beamz/videos/4/","html5_video_source":"","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-06-24T18:28:04-07:00","title":"House of Cards","files":null,"url":"http://www.viddler.com/explore/beamz/videos/4/","id":"96e7b5fc","tags":null,"comment_count":0,"age_limit":"","impression_count":19613,"uploaded_at":"2009-06-24T18:17:30-07:00","description":"viddler testibg","length":278,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_96e7b5fc.jpg","comments_moderation":null,"status":"ready","view_count":2038},{"permalink":"http://www.viddler.com/explore/beamz/videos/3/","html5_video_source":"http://www.viddler.com/file/45dd7a10/html5","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-06-22T11:51:03-07:00","title":"Red Bank Bounce - Beamz Original","files":null,"url":"http://www.viddler.com/explore/beamz/videos/3/","id":"45dd7a10","tags":null,"comment_count":0,"age_limit":"","impression_count":3683,"uploaded_at":"2009-06-22T11:43:03-07:00","description":"testing viddler again","length":170,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_45dd7a10.jpg","comments_moderation":null,"status":"ready","view_count":906},{"permalink":"http://www.viddler.com/explore/beamz/videos/2/","html5_video_source":"","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-06-22T12:04:03-07:00","title":"Beamz Training Video","files":null,"url":"http://www.viddler.com/explore/beamz/videos/2/","id":"ce3fa0cd","tags":null,"comment_count":0,"age_limit":"","impression_count":4657,"uploaded_at":"2009-06-22T11:33:51-07:00","description":"Testing Viddler","length":1130,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_ce3fa0cd.jpg","comments_moderation":null,"status":"ready","view_count":1951},{"permalink":"http://www.viddler.com/explore/beamz/videos/1/","html5_video_source":"","embed_code":null,"favorited":0,"author":"beamz","made_public_at":"2009-06-11T16:06:12-07:00","title":"Beamz Introduction","files":null,"url":"http://www.viddler.com/explore/beamz/videos/1/","id":"486d266d","tags":null,"comment_count":0,"age_limit":"","impression_count":47490,"uploaded_at":"2009-06-11T15:59:37-07:00","description":"testing viddler","length":132,"permissions":null,"thumbnail_url":"http://cdn-thumbs.viddler.com/thumbnail_2_486d266d.jpg","comments_moderation":null,"status":"ready","view_count":10931}]},"video_list attr":{"total":10}};
var videos = video_json.video_list.video;

var show_titles = true;
var show_description = false;
var hide_thumbs = false;
var show_player = true;

var player_type = "simple";

var height = 245.321100917431;
var width = 400;
var autoplay = 'f';
var videos_per_row = 3;

var widget_width = 400;
var thumbnail_size = Math.floor((widget_width-(videos_per_row-1)*10)/videos_per_row);

var code = '';
var title = '';

function viddlerLink(i, inner) {
  if(show_player) {
    return '<a href="#" onclick="viddlerGetMovie(\'vidget_flash_' + widget_id + '\').setMovie(\'' + videos[i].id + '\', 0);return false;">' + inner + '</a>';
  } else {
    return '<a href="' + videos[i].url + '">' + inner + '</a>';
  }
}

function html_entity_decode(str) {
  var ta=document.createElement("textarea");
  ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");
  return ta.value;
}

if(show_player) {

  var flashvars = 'autoplay=' + autoplay;

  var so = new SWFObject("http://viddler.com/" + player_type + "/" + videos[0].id, "vidget_flash_" + widget_id, width, height, "8");
  so.addParam("flashVars", "autoplay=" + autoplay + "&key=" + videos[0].id);
  so.addParam("allowFullScreen", "true");
  so.addParam("allowScriptAccess", "always");
  so.addParam("wmode", "transparent");
  so.write(video_player);

  video_player.innerHTML += "<br /><br />";
}

var count = 1;

for(i=0;i<videos.length;i++) {
  code += '<li';

  classes = '';

  if(count == 1) {
    classes += 'first';
  }

  if(count % 2 == 0) {
    classes += ' even';
  }

  if(classes != '') {
    code += " class='" + classes + "'";
  }

  code += '>';

  title = '';

  if(!hide_thumbs) {
    title += '<img src="' + videos[i].thumbnail_url + '" height="' + thumbnail_size + '" title="' + videos[i].title + '" alt="' + videos[i].title + '" />';
  }

  if(show_titles) {
    title += viddlerLink(i, videos[i].title);
  }

  code += viddlerLink(i, title);

  if(show_description && videos[i].description) {
    code += "<br />" + html_entity_decode(videos[i].description);
  }
  code += '</a>';
  code +='</li>';

  if(count < videos_per_row) {
    count++;
  } else {
    count = 1;
  }
}

video_list.innerHTML = code;

