/* PicLens Lite JavaScript: version 1.0
 * Copyright (c) 2008 Cooliris, Inc.
 * All Rights Reserved.
 * 
 * The JavaScript portion of PicLens Lite is licensed under BSD (http://lite.piclens.com/bsdlicense)
 * This launcher includes and interacts with SWFObject (MIT), BrowserDetect (BSD Compatible), and Lytebox (CC Attribution 3.0).
 * 
 * There are two versions of this JS: 
 * http://lite.piclens.com/current/piclens.js            full file with comments    (~43KB)
 * http://lite.piclens.com/current/piclens_optimized.js  light version for deployment (~29KB)
 */
var PicLensLite={start:function(_1){
this.determineBrowserParameters();
clearTimeout(this.REMOVE_TIMER_ID);
if(_1){
this.ARGS=_1;
}
this.START_ITEM_GUID=null;
if(typeof _1!="undefined"){
if(_1.guid){
this.START_ITEM_GUID=_1.guid;
}
if(_1.feedUrl){
this.THE_FEED_URL=_1.feedUrl;
if(this.checkForPluginAndLaunchIfPossible(_1.feedUrl)){
return;
}
if(_1.loadFeedInFlash){
this.LOAD_FEED_IN_FLASH=true;
this.showFlashUI();
}else{
this.loadViaXHR(_1.feedUrl);
}
}
if(_1.feedData){
this.showFlashUI(_1.feedData);
}
}else{
var _2=this.indexFeeds();
if(_2.length!=0){
var _3=_2[0];
this.loadViaXHR(_3.url);
}
}
},isRunning:function(){
return this.LITE_IS_RUNNING;
},setLiteURLs:function(_4){
if(_4.swf){
this.LITE_URL=_4.swf;
}else{
if(_4.lite){
this.LITE_URL=_4.lite+"PicLensLite.swf";
}
}
if(_4.button){
this.BUTTON_URL=_4.button;
}else{
if(_4.lite){
this.BUTTON_URL=_4.lite+"NoFlash.jpg";
}
}
var _5="";
if(_4.lbox){
_5=_4.lbox;
}else{
if(_4.lite){
_5=_4.lite+"../lytebox/";
}
}
if(_4.lboxcss){
this.LBOX_CSS_URL=_4.lboxcss;
}else{
if(_5!=""){
this.LBOX_CSS_URL=_5+"lytebox.css";
}
}
if(_4.lboxjs){
this.LBOX_JS_URL=_4.lboxjs;
}else{
if(_5!=""){
this.LBOX_JS_URL=_5+"lytebox.js";
}
}
this.URLS_DETERMINED=true;
},ARGS:{},DEBUG_NOCLIENT:false,DEBUG_NOFLASH:false,MARGIN_W:60,MARGIN_H:20,LITE_BG_DIV:null,LITE_FG_DIV:null,URLS_DETERMINED:false,LITE_URL:null,BUTTON_URL:null,LBOX_CSS_URL:null,LBOX_JS_URL:null,LBOX_COUNT:0,OS_WIN:false,OS_MAC:false,BROWSER_FFX:false,BROWSER_SAF:false,BROWSER_IE:false,BROWSER_IE6:false,THE_FEED:"",THE_FEED_URL:"",LOAD_FEED_IN_FLASH:false,LITE_IS_RUNNING:false,piclensIsRunning_:false,FLASH_ID_1:"pllflash1",FLASH_ID_2:"pllflash2",FLASH_VER:null,FLASH_URL:"http://www.adobe.com/go/getflashplayer",PL_URL:"http://download.piclens.com/partner/",LEARN_PL_URL:"http://affiliate.piclens.com/partner/",START_ITEM_GUID:null,REMOVE_TIMER_ID:0,RESIZE_TIMER_IE6:null,RESIZE_HANDLER_EXISTS:false,FONT:"font-family: Lucida Grande, Myriad Pro, Verdana, Helvetica, Arial, sans-serif;",addKeyHandlers:function(){
var _6=this;
document.onkeydown=function(e){
var _8;
if(e==null){
_8=window.event.keyCode;
}else{
_8=e.which;
}
_6.handleKeyPress(_8);
return false;
};
},addMouseHandlers:function(){
if(window.addEventListener){
window.addEventListener("DOMMouseScroll",this.handleMouseWheel,false);
}
if(document.attachEvent){
document.attachEvent("onmousewheel",this.handleMouseWheel);
}
window.onmousewheel=document.onmousewheel=this.handleMouseWheel;
},appendElementsToDocument:function(){
document.body.appendChild(this.LITE_BG_DIV);
document.body.appendChild(this.LITE_FG_DIV);
},autoResize:function(){
if(!this.isRunning()){
clearInterval(this.RESIZE_TIMER_IE6);
return;
}
var _9=this.getPageSize();
if(this.LITE_BG_DIV){
this.LITE_BG_DIV.style.height=_9.h+"px";
this.LITE_BG_DIV.style.width=_9.w+"px";
}
if(this.LITE_FG_DIV){
var w=(_9.w-this.MARGIN_W*2);
var h=(_9.h-this.MARGIN_H*2);
var fg=this.LITE_FG_DIV;
fg.style.left=fg.style.right=this.MARGIN_W+"px";
fg.style.top=fg.style.bottom=this.MARGIN_H+"px";
fg.style.width=w+"px";
fg.style.height=h+"px";
var _d=this.getFlash();
if(_d){
_d.width=w;
_d.height=h;
}
}
},checkForPluginAndLaunchIfPossible:function(_e){
if(this.hasPicLensClient()){
window.piclens.launch(_e,"","");
return true;
}
return false;
},createBackgroundOverlay:function(){
var bg=document.createElement("div");
this.LITE_BG_DIV=bg;
var _10=this;
bg.id="lite_bg_div";
bg.style.position="fixed";
var _11=bg.style;
_11.width="100%";
_11.height="100%";
if(this.BROWSER_IE6){
_11.position="absolute";
var _12=this.getPageSize();
_11.height=_12.h+"px";
_11.width=_12.w+"px";
}
_11.left="0px";
_11.right="0px";
_11.top="0px";
_11.bottom="0px";
_11.backgroundColor="#000";
_11.opacity="0.5";
_11.filter="alpha(opacity=50)";
if(this.BROWSER_FFX&&this.OS_MAC){
_11.opacity="1";
}
_11.zIndex=1000;
bg.onclick=function(){
_10.exitPicLensLite();
};
},createForegroundFlashComponent:function(){
var fg=document.createElement("div");
this.LITE_FG_DIV=fg;
fg.id="lite_fg_div";
var _14=fg.style;
_14.backgroundColor="#000";
_14.position="fixed";
_14.left=_14.right=this.MARGIN_W+"px";
_14.top=_14.bottom=this.MARGIN_H+"px";
_14.border="2px solid #555";
_14.zIndex=1001;
if(this.BROWSER_IE6){
_14.position="absolute";
var _15=this.getPageSize();
_14.width=(_15.w-this.MARGIN_W*2)+"px";
_14.height=(_15.h-this.MARGIN_H*2)+"px";
}
},closeFlashUI:function(){
var doc=document;
doc.onkeydown="";
window.onmousewheel=doc.onmousewheel="";
if(window.removeEventListener){
window.removeEventListener("DOMMouseScroll",this.handleMouseWheel,false);
}
if(doc.detachEvent){
doc.detachEvent("onmousewheel",this.handleMouseWheel);
}
this.LITE_BG_DIV.style.display="none";
this.LITE_FG_DIV.style.display="none";
this.REMOVE_TIMER_ID=setTimeout("PicLensLite.removeChildren()",150);
},determineBrowserParameters:function(){
this.OS_MAC=(BrowserDetect.OS=="Mac");
this.OS_WIN=(BrowserDetect.OS=="Windows");
this.BROWSER_FFX=(BrowserDetect.browser=="Firefox");
this.BROWSER_SAF=(BrowserDetect.browser=="Safari");
this.BROWSER_IE=(BrowserDetect.browser=="Explorer");
this.BROWSER_IE6=(this.BROWSER_IE&&BrowserDetect.version=="6");
this.FLASH_VER=swfobject.getFlashPlayerVersion();
},exitPicLensLite:function(){
this.setRunningFlag(false);
var fl=this.getFlash();
if(fl!=null&&fl.fl_exitPicLensLite){
fl.fl_exitPicLensLite();
}else{
this.closeFlashUI();
}
},findScriptLocation:function(){
if(this.URLS_DETERMINED){
return;
}
var _18=document.getElementsByTagName("script");
for(var i=0;i!=_18.length;++i){
var _1a=_18[i];
var _1b=_1a.getAttribute("type");
if(_1b=="text/javascript"){
var _1c=_1a.getAttribute("src");
if(_1c==null){
continue;
}
var _1d=_1c.indexOf("piclens.js");
if(_1d!=-1){
this.setLiteURLs({lite:_1c.substring(0,_1d)});
return;
}else{
_1d=_1c.indexOf("piclens_optimized.js");
if(_1d!=-1){
this.setLiteURLs({lite:_1c.substring(0,_1d)});
return;
}
}
}
}
},getCurrentURL:function(){
return location.href;
},getFeedURL:function(){
return encodeURIComponent(this.THE_FEED_URL);
},getPageSize:function(){
var _1e,_1f,_20,_21;
var doc=document;
var _23=doc.body;
if(window.innerHeight&&window.scrollMaxY){
_1e=doc.scrollWidth;
_1f=(this.isFrame?parent.innerHeight:self.innerHeight)+(this.isFrame?parent.scrollMaxY:self.scrollMaxY);
}else{
if(_23.scrollHeight>_23.offsetHeight){
_1e=_23.scrollWidth;
_1f=_23.scrollHeight;
}else{
var _24=doc.getElementsByTagName("html").item(0);
_1e=_24.offsetWidth;
_1f=_24.offsetHeight;
_1e=(_1e<_23.offsetWidth)?_23.offsetWidth:_1e;
_1f=(_1f<_23.offsetHeight)?_23.offsetHeight:_1f;
}
}
var _25=doc.documentElement;
if(self.innerHeight){
_20=(this.isFrame)?parent.innerWidth:self.innerWidth;
_21=(this.isFrame)?parent.innerHeight:self.innerHeight;
}else{
if(_25&&_25.clientHeight){
_20=_25.clientWidth;
_21=_25.clientHeight;
}else{
if(_23){
var _24=doc.getElementsByTagName("html").item(0);
_20=_24.clientWidth;
_21=_24.clientHeight;
_20=(_20==0)?_23.clientWidth:_20;
_21=(_21==0)?_23.clientHeight:_21;
}
}
}
var _26=(_1f<_21)?_21:_1f;
var _27=(_1e<_20)?_20:_1e;
return {pw:_27,ph:_26,w:_20,h:_21};
},getElementsFromXMLFeed:function(){
var _28;
if(window.ActiveXObject){
_28=new ActiveXObject("Microsoft.XMLDOM");
_28.async=false;
_28.loadXML(PicLensLite.THE_FEED);
}else{
var _29=new DOMParser();
_28=_29.parseFromString(PicLensLite.THE_FEED,"text/xml");
}
var _2a=_28.getElementsByTagName("*");
return _2a;
},getBasicSlideShowHTML:function(){
var _2b=document.getElementsByTagName("head").item(0);
var _2c=document.createElement("script");
_2c.src=this.LBOX_JS_URL;
_2c.type="text/javascript";
_2b.appendChild(_2c);
var _2d=document.createElement("link");
_2d.rel="stylesheet";
_2d.href=this.LBOX_CSS_URL;
_2d.type="text/css";
_2d.media="screen";
_2b.appendChild(_2d);
var _2e=this.getElementsFromXMLFeed();
var _2f=true;
var _30;
var i;
var _32="";
for(i=0;i<_2e.length;i++){
if(_2e[i].nodeName=="media:content"){
var _33=_2e[i].getAttribute("url");
if(_33.indexOf(".flv")==-1){
var _34=_2e[i].getAttribute("url");
if(_2f){
_30=_34;
_2f=false;
}else{
_32+="<a href=\""+_2e[i].getAttribute("url")+"\" rel=\"lytebox[lite]\"></a> ";
}
}
}
}
var _35="<div id='lightbox_images' align='center' style='display: none; padding-top:10px; color:#FFFFFF; font-size:.8em; "+this.FONT+" color:#999999;'>";
_35+="( Alternatively, <a href=\""+_30+"\" rel=\"lytebox[lite]\" style=\"color:#656588\">click here</a> for a basic slideshow. )";
_35+=_32;
_35+="</div><br/>";
return _35;
},generateAlternativeContent:function(){
var _36="<div id=\"altContent\" style=\"text-align:center; margin: 0 0 0 0; padding: 0 0 0 0; background-color: #252525; min-width:860px;\">";
_36+="<div align=\"center\" style=\"width: 100%; padding-top:60px; "+this.FONT+"\">";
var v=this.FLASH_VER;
var _38;
if(v.major>0){
_38="update your Flash Player from version "+v.major+"."+v.minor+"."+v.release+" to version 9.0.28 or newer";
}else{
_38="install the most recent Flash Player";
}
var _39="";
if(this.THE_FEED){
_39=this.getBasicSlideShowHTML();
}
var _3a=this.PL_URL;
var _3b=this.LEARN_PL_URL;
var pid=this.ARGS.pid;
if(pid){
_3a+=pid+"/";
_3b+=pid+"/";
}
_36+="<div style='padding:10px;'>"+"<span style='padding-left:25px; color:#C6C6C6; font-size:1.5em; font-weight: bold; "+this.FONT+"'>You're just a few clicks away from going full screen!</span><br/>"+"<span style='padding-left:25px; padding-bottom: 15px; color:#C6C6C6; font-size:.9em; "+this.FONT+"'>You must get the PicLens browser plugin, or "+_38+".</span>"+"</div>"+"<img src=\""+this.BUTTON_URL+"\" alt=\"\" border=\"0\" usemap=\"#Map\">"+"<map name=\"Map\" id=\"Map\">"+"<area shape=\"rect\" coords=\"31,34,316,293\" href=\""+_3a+"\" alt=\"\" />"+"<area shape=\"rect\" coords=\"593,209,825,301\" href=\""+this.FLASH_URL+"\" alt=\"\" />"+"<area shape=\"rect\" coords=\"328,136,448,158\" href=\""+_3b+"\" alt=\"\" />"+"</map>";
_36+="</div>";
_36+=_39;
_36+="<div align=\"center\" style=\"color:#666666; font-size:11px; "+this.FONT+"\">&copy; 2008 Cooliris, Inc. All trademarks are property of their respective holders.<br/><br/><br/></div>";
_36+="</div>";
return _36;
},generateFlashVars:function(){
var _3d="";
if(this.START_ITEM_GUID!=null){
_3d+="&startItemGUID="+this.START_ITEM_GUID;
}
if(this.LOAD_FEED_IN_FLASH){
_3d+="&feedURL="+this.getFeedURL();
}
if(this.ARGS.pid){
_3d+="&pid="+this.ARGS.pid;
}
if(this.ARGS.maxScale){
_3d+="&maxScale="+this.ARGS.maxScale;
}
if(_3d!=""){
_3d=_3d.substring(1);
}
return _3d;
},getFlash:function(){
if(this.BROWSER_SAF||this.BROWSER_IE){
return document.getElementById(this.FLASH_ID_1);
}else{
return document.getElementById(this.FLASH_ID_2);
}
},getWindowSize:function(){
var _3e=document.documentElement;
var _3f=document.body;
var w=0,h=0;
if(typeof (window.innerWidth)=="number"){
w=window.innerWidth;
h=window.innerHeight;
}else{
if(_3e&&(_3e.clientWidth||_3e.clientHeight)){
w=_3e.clientWidth;
h=_3e.clientHeight;
}else{
if(_3f&&(_3f.clientWidth||_3f.clientHeight)){
w=_3f.clientWidth;
h=_3f.clientHeight;
}
}
}
return {w:w,h:h};
},getFeedFromJS:function(){
return this.THE_FEED;
},handleKeyPress:function(_42){
if(!this.isRunning()){
return;
}
var fl=this.getFlash();
if(fl!=null&&fl.fl_keyPressed){
fl.fl_keyPressed(_42);
}else{
if(_42==27){
this.closeFlashUI();
}
}
},handleMouseWheel:function(e){
var _45=0;
if(!e){
e=window.event;
}
if(e.wheelDelta){
_45=e.wheelDelta/120;
if(window.opera){
_45=-_45;
}
}else{
if(e.detail){
if(Math.abs(e.detail)<3){
_45=-e.detail;
}else{
_45=-e.detail/3;
}
}
}
if(_45){
PicLensLite.sendMouseScrollToFlash(_45);
}
if(e.preventDefault){
e.preventDefault();
}
e.returnValue=false;
return false;
},hasPicLensClient:function(url){
if(this.DEBUG_NOCLIENT){
return false;
}
var _47=false;
if(window.piclens){
_47=true;
}else{
var _48=null;
if(typeof PicLensContext!="undefined"){
_48=new PicLensContext();
}else{
try{
_48=new ActiveXObject("PicLens.Context");
}
catch(e){
_48=null;
}
}
window.piclens=_48;
if(window.piclens){
_47=true;
}
}
if(_47){
var _49;
try{
_49=window.piclens.version;
}
catch(e){
return false;
}
var _4a=_49.split(".");
if(_4a[0]>1){
return true;
}else{
if(_4a[0]==1){
if(_4a[1]>6){
return true;
}else{
if(_4a[1]==6){
if(_4a[2]>0){
return true;
}else{
if(_4a[2]==0){
if(_4a[3]>=824){
return true;
}
}
}
}
}
}
}
return false;
}else{
return false;
}
},showLyteboxLink:function(){
myLytebox.updateLyteboxItems();
myLytebox.doAnimations=false;
var _4b=document.getElementById("lightbox_images");
if(_4b!=null){
_4b.style.display="block";
}
},startLytebox:function(){
if(typeof myLytebox!="undefined"){
this.showLyteboxLink();
}else{
if(typeof initLytebox!="undefined"){
initLytebox();
this.showLyteboxLink();
}else{
if(this.LBOX_COUNT>=4){
return;
}
setTimeout("PicLensLite.startLytebox()",150);
this.LBOX_COUNT++;
}
}
},injectFlashPlayer:function(){
var fg=this.LITE_FG_DIV;
var _4d="100%";
var _4e="100%";
var _4f="100%";
var _50="100%";
if(this.BROWSER_IE6){
_4f="0";
_50="0";
}
var _51=this.generateFlashVars();
var _52=this.generateAlternativeContent();
if(this.meetsRequirements()){
fg.innerHTML="<object id=\""+this.FLASH_ID_1+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+_4d+"\" height=\""+_4e+"\">"+"<param name=\"movie\" value=\""+this.LITE_URL+"\" />"+"<param name=\"quality\" value=\"high\"/> "+"<param name=\"bgcolor\" value=\"#000000\"/> "+"<param name=\"allowScriptAccess\" value=\"always\"/> "+"<param name=\"FlashVars\" value=\""+_51+"\"/> "+"<param name=\"allowFullScreen\" value=\"true\"/> "+"<param name=\"wmode\" value=\"window\"/> "+"<param name=\"scale\" value=\"noscale\"/> "+"<object type=\"application/x-shockwave-flash\" data=\""+this.LITE_URL+"\" width=\""+_4f+"\" height=\""+_50+"\" "+"quality=\"high\" "+"bgcolor=\"#000000\" id=\""+this.FLASH_ID_2+"\" "+"quality=\"high\" "+"FlashVars=\""+_51+"\" "+"allowFullScreen=\"true\" "+"scale=\"noscale\" "+"wmode=\"window\" "+"allowScriptAccess=\"always\">"+"<div>"+_52+"</div>"+"</object>"+"</object>";
}else{
fg.innerHTML=_52;
fg.style.minWidth="860px";
fg.style.minHeight="550px";
fg.style.backgroundColor="#252525";
}
if(this.BROWSER_SAF){
this.resizeUI();
}
},indexFeeds:function(){
var _53=document.getElementsByTagName("link");
var _54=[];
for(var i=0;i!=_53.length;++i){
var _56=_53[i],_57=_56.getAttribute("type");
if(_57=="application/rss+xml"||_57=="text/xml"){
_54.push({title:_56.getAttribute("title"),url:_56.getAttribute("href")});
}
}
return _54;
},loadViaXHR:function(url){
var _59=this;
var _5a=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");
_5a.open("GET",url,true);
_5a.onreadystatechange=function(){
if(_5a.readyState==4&&(_5a.status==200||_5a.status==0)){
if(_5a.responseText){
_59.showFlashUI(_5a.responseText);
}
}
};
_5a.send("");
},meetsRequirements:function(){
if(this.DEBUG_NOFLASH){
return false;
}
var _5b=(this.FLASH_VER.major==0)&&this.BROWSER_IE;
return swfobject.hasFlashPlayerVersion("9.0.28")||_5b;
},removeChildren:function(){
document.body.removeChild(this.LITE_BG_DIV);
document.body.removeChild(this.LITE_FG_DIV);
},resizeUI:function(){
if(this.LITE_FG_DIV){
var _5c=this.getPageSize();
var w=(_5c.w-this.MARGIN_W*2);
var h=(_5c.h-this.MARGIN_H*2);
var fg=this.LITE_FG_DIV;
fg.style.left=fg.style.right=this.MARGIN_W+"px";
fg.style.top=fg.style.bottom=this.MARGIN_H+"px";
fg.style.width=w+"px";
fg.style.height=h+"px";
var _60=this.getFlash();
if(_60){
_60.style.width=w;
_60.style.height=h;
_60.width=w;
_60.height=h;
}
}
},setRunningFlag:function(_61){
this.LITE_IS_RUNNING=_61;
this.piclensIsRunning_=_61;
},setResizeHandler:function(){
if(!this.RESIZE_HANDLER_EXISTS&&this.BROWSER_SAF){
var _62=this;
window.addEventListener("resize",function(){
_62.resizeUI();
},false);
this.RESIZE_HANDLER_EXISTS=true;
}
},setResizeTimer:function(){
if(this.BROWSER_IE6){
this.RESIZE_TIMER_IE6=setInterval("PicLensLite.autoResize()",1000);
}
},showFlashUI:function(_63){
this.THE_FEED=_63;
this.findScriptLocation();
this.createBackgroundOverlay();
this.createForegroundFlashComponent();
if(this.BROWSER_IE){
this.appendElementsToDocument();
}
this.injectFlashPlayer();
if(!this.BROWSER_IE){
this.appendElementsToDocument();
}
this.addKeyHandlers();
this.addMouseHandlers();
this.setRunningFlag(true);
this.setResizeTimer();
this.setResizeHandler();
this.startLytebox();
},sendMouseScrollToFlash:function(_64){
if(!this.isRunning()){
return;
}
var fl=this.getFlash();
if(fl!=null&&fl.fl_mouseMoved){
fl.fl_mouseMoved(_64);
}
}};
var swfobject=function(){
var _1=[];
var _2=[];
var _3=null;
var _4=null;
var _5=false;
var _6=false;
var ua=function(){
var _8=typeof document.getElementById!="undefined"&&typeof document.getElementsByTagName!="undefined"&&typeof document.createElement!="undefined"&&typeof document.appendChild!="undefined"&&typeof document.replaceChild!="undefined"&&typeof document.removeChild!="undefined"&&typeof document.cloneNode!="undefined";
var _9=[0,0,0];
var d=null;
if(typeof navigator.plugins!="undefined"&&typeof navigator.plugins["Shockwave Flash"]=="object"){
d=navigator.plugins["Shockwave Flash"].description;
if(d){
d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");
_9[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);
_9[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);
_9[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0;
}
}else{
if(typeof window.ActiveXObject!="undefined"){
var a=null;
var _c=false;
try{
a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
}
catch(e){
try{
a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
_9=[6,0,21];
a.AllowScriptAccess="always";
}
catch(e){
if(_9[0]==6){
_c=true;
}
}
if(!_c){
try{
a=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
}
catch(e){
}
}
}
if(!_c&&typeof a=="object"){
try{
d=a.GetVariable("$version");
if(d){
d=d.split(" ")[1].split(",");
_9=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];
}
}
catch(e){
}
}
}
}
var u=navigator.userAgent.toLowerCase();
var p=navigator.platform.toLowerCase();
var _f=/webkit/.test(u);
var _10=_f?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):0;
var ie=false;
var win=p?/win/.test(p):/win/.test(u);
var mac=p?/mac/.test(p):/mac/.test(u);
return {w3cdom:_8,playerVersion:_9,webkit:_f,webkitVersion:_10,ie:ie,win:win,mac:mac};
}();
var _14=function(){
if(!ua.w3cdom){
return;
}
addDomLoadEvent(main);
if(ua.ie&&ua.win){
try{
document.write("<script id=__ie_ondomload defer=true src=//:></script>");
var s=document.getElementById("__ie_ondomload");
if(s){
s.onreadystatechange=function(){
if(this.readyState=="complete"){
this.parentNode.removeChild(this);
callDomLoadFunctions();
}
};
}
}
catch(e){
}
}
if(ua.webkit&&typeof document.readyState!="undefined"){
_3=setInterval(function(){
if(/loaded|complete/.test(document.readyState)){
callDomLoadFunctions();
}
},10);
}
if(typeof document.addEventListener!="undefined"){
document.addEventListener("DOMContentLoaded",callDomLoadFunctions,null);
}
addLoadEvent(callDomLoadFunctions);
}();
function callDomLoadFunctions(){
if(_5){
return;
}
if(ua.ie&&ua.win){
var s=document.createElement("span");
try{
var t=document.getElementsByTagName("body")[0].appendChild(s);
t.parentNode.removeChild(t);
}
catch(e){
return;
}
}
_5=true;
if(_3){
clearInterval(_3);
_3=null;
}
var dl=_1.length;
for(var i=0;i<dl;i++){
_1[i]();
}
}
function addDomLoadEvent(fn){
if(_5){
fn();
}else{
_1[_1.length]=fn;
}
}
function addLoadEvent(fn){
if(typeof window.addEventListener!="undefined"){
window.addEventListener("load",fn,false);
}else{
if(typeof document.addEventListener!="undefined"){
document.addEventListener("load",fn,false);
}else{
if(typeof window.attachEvent!="undefined"){
window.attachEvent("onload",fn);
}else{
if(typeof window.onload=="function"){
var _1c=window.onload;
window.onload=function(){
_1c();
fn();
};
}else{
window.onload=fn;
}
}
}
}
}
function main(){
var rl=_2.length;
for(var i=0;i<rl;i++){
var id=_2[i].id;
if(ua.playerVersion[0]>0){
var obj=document.getElementById(id);
if(obj){
if(hasPlayerVersion(_2[i].swfVersion)){
if(ua.webkit&&ua.webkitVersion<312){
fixParams(obj);
}
}else{
if(_2[i].expressInstall&&!_6&&hasPlayerVersion([6,0,65])&&(ua.win||ua.mac)){
showExpressInstall(_2[i]);
}else{
displayAltContent(obj);
}
}
}
}
createCSS("#"+id,"visibility:visible");
}
}
function fixParams(obj){
var _22=obj.getElementsByTagName("object")[0];
if(_22){
var e=document.createElement("embed");
var a=_22.attributes;
if(a){
var al=a.length;
for(var i=0;i<al;i++){
if(a[i].nodeName.toLowerCase()=="data"){
e.setAttribute("src",a[i].nodeValue);
}else{
e.setAttribute(a[i].nodeName,a[i].nodeValue);
}
}
}
var c=_22.childNodes;
if(c){
var cl=c.length;
for(var j=0;j<cl;j++){
if(c[j].nodeType==1&&c[j].nodeName.toLowerCase()=="param"){
e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"));
}
}
}
obj.parentNode.replaceChild(e,obj);
}
}
function fixObjectLeaks(){
if(ua.ie&&ua.win&&hasPlayerVersion([8,0,0])){
window.attachEvent("onunload",function(){
var o=document.getElementsByTagName("object");
if(o){
var ol=o.length;
for(var i=0;i<ol;i++){
o[i].style.display="none";
for(var x in o[i]){
if(typeof o[i][x]=="function"){
o[i][x]=function(){
};
}
}
}
}
});
}
}
function showExpressInstall(_2e){
_6=true;
var obj=document.getElementById(_2e.id);
if(obj){
if(_2e.altContentId){
var ac=document.getElementById(_2e.altContentId);
if(ac){
_4=ac;
}
}else{
_4=abstractAltContent(obj);
}
var w=_2e.width?_2e.width:(obj.getAttribute("width")?obj.getAttribute("width"):0);
if(parseInt(w,10)<310){
w="310";
}
var h=_2e.height?_2e.height:(obj.getAttribute("height")?obj.getAttribute("height"):0);
if(parseInt(h,10)<137){
h="137";
}
var pt=ua.ie&&ua.win?"ActiveX":"PlugIn";
document.title=document.title.slice(0,47)+" - Flash Player Installation";
var dt=document.title;
var fv="MMredirectURL="+window.location+"&MMplayerType="+pt+"&MMdoctitle="+dt;
var el=obj;
if(ua.ie&&ua.win&&obj.readyState!=4){
el=document.createElement("div");
obj.parentNode.insertBefore(el,obj);
obj.style.display="none";
window.attachEvent("onload",function(){
obj.parentNode.removeChild(obj);
});
}
createSWF({data:_2e.expressInstall,id:"SWFObjectExprInst",width:w,height:h},{flashvars:fv},el);
}
}
function displayAltContent(obj){
if(ua.ie&&ua.win&&obj.readyState!=4){
var el=document.createElement("div");
obj.parentNode.insertBefore(el,obj);
el.parentNode.replaceChild(abstractAltContent(obj),el);
obj.style.display="none";
window.attachEvent("onload",function(){
obj.parentNode.removeChild(obj);
});
}else{
obj.parentNode.replaceChild(abstractAltContent(obj),obj);
}
}
function abstractAltContent(obj){
var ac=document.createElement("div");
if(ua.win&&ua.ie){
ac.innerHTML=obj.innerHTML;
}else{
var _3b=obj.getElementsByTagName("object")[0];
if(_3b){
var c=_3b.childNodes;
if(c){
var cl=c.length;
for(var i=0;i<cl;i++){
if(!(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param")&&!(c[i].nodeType==8)){
ac.appendChild(c[i].cloneNode(true));
}
}
}
}
}
return ac;
}
function createSWF(_3f,_40,el){
if(ua.ie&&ua.win){
var att="";
for(var i in _3f){
if(typeof _3f[i]=="string"){
if(i=="data"){
_40.movie=_3f[i];
}else{
if(i.toLowerCase()=="styleclass"){
att+=" class=\""+_3f[i]+"\"";
}else{
if(i!="classid"){
att+=" "+i+"=\""+_3f[i]+"\"";
}
}
}
}
}
var par="";
for(var j in _40){
if(typeof _40[j]=="string"){
par+="<param name=\""+j+"\" value=\""+_40[j]+"\" />";
}
}
el.outerHTML="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\""+att+">"+par+"</object>";
fixObjectLeaks();
}else{
if(ua.webkit&&ua.webkitVersion<312){
var e=document.createElement("embed");
e.setAttribute("type","application/x-shockwave-flash");
for(var k in _3f){
if(typeof _3f[k]=="string"){
if(k=="data"){
e.setAttribute("src",_3f[k]);
}else{
if(k.toLowerCase()=="styleclass"){
e.setAttribute("class",_3f[k]);
}else{
if(k!="classid"){
e.setAttribute(k,_3f[k]);
}
}
}
}
}
for(var l in _40){
if(typeof _40[l]=="string"){
if(l!="movie"){
e.setAttribute(l,_40[l]);
}
}
}
el.parentNode.replaceChild(e,el);
}else{
var o=document.createElement("object");
o.setAttribute("type","application/x-shockwave-flash");
for(var m in _3f){
if(typeof _3f[m]=="string"){
if(m.toLowerCase()=="styleclass"){
o.setAttribute("class",_3f[m]);
}else{
if(m!="classid"){
o.setAttribute(m,_3f[m]);
}
}
}
}
for(var n in _40){
if(typeof _40[n]=="string"&&n!="movie"){
createObjParam(o,n,_40[n]);
}
}
el.parentNode.replaceChild(o,el);
}
}
}
function createObjParam(el,_4d,_4e){
var p=document.createElement("param");
p.setAttribute("name",_4d);
p.setAttribute("value",_4e);
el.appendChild(p);
}
function hasPlayerVersion(rv){
return (ua.playerVersion[0]>rv[0]||(ua.playerVersion[0]==rv[0]&&ua.playerVersion[1]>rv[1])||(ua.playerVersion[0]==rv[0]&&ua.playerVersion[1]==rv[1]&&ua.playerVersion[2]>=rv[2]))?true:false;
}
function createCSS(sel,_52){
if(ua.ie&&ua.mac){
return;
}
var h=document.getElementsByTagName("head")[0];
var s=document.createElement("style");
s.setAttribute("type","text/css");
s.setAttribute("media","screen");
if(!(ua.ie&&ua.win)&&typeof document.createTextNode!="undefined"){
s.appendChild(document.createTextNode(sel+" {"+_52+"}"));
}
h.appendChild(s);
if(ua.ie&&ua.win&&typeof document.styleSheets!="undefined"&&document.styleSheets.length>0){
var ls=document.styleSheets[document.styleSheets.length-1];
if(typeof ls.addRule=="object"){
ls.addRule(sel,_52);
}
}
}
return {registerObject:function(_56,_57,_58){
if(!ua.w3cdom||!_56||!_57){
return;
}
var _59={};
_59.id=_56;
var v=_57.split(".");
_59.swfVersion=[parseInt(v[0],10),parseInt(v[1],10),parseInt(v[2],10)];
_59.expressInstall=_58?_58:false;
_2[_2.length]=_59;
createCSS("#"+_56,"visibility:hidden");
},getObjectById:function(_5b){
var r=null;
if(ua.w3cdom&&_5){
var o=document.getElementById(_5b);
if(o){
var n=o.getElementsByTagName("object")[0];
if(!n||(n&&typeof o.SetVariable!="undefined")){
r=o;
}else{
if(typeof n.SetVariable!="undefined"){
r=n;
}
}
}
}
return r;
},embedSWF:function(_5f,_60,_61,_62,_63,_64,_65,_66,_67){
if(!ua.w3cdom||!_5f||!_60||!_61||!_62||!_63){
return;
}
if(hasPlayerVersion(_63.split("."))){
createCSS("#"+_60,"visibility:hidden");
var att=(typeof _67=="object")?_67:{};
att.data=_5f;
att.width=_61;
att.height=_62;
var par=(typeof _66=="object")?_66:{};
if(typeof _65=="object"){
for(var i in _65){
if(typeof _65[i]=="string"){
if(typeof par.flashvars!="undefined"){
par.flashvars+="&"+i+"="+_65[i];
}else{
par.flashvars=i+"="+_65[i];
}
}
}
}
addDomLoadEvent(function(){
createSWF(att,par,document.getElementById(_60));
createCSS("#"+_60,"visibility:visible");
});
}else{
if(_64&&!_6&&hasPlayerVersion([6,0,65])&&(ua.win||ua.mac)){
createCSS("#"+_60,"visibility:hidden");
addDomLoadEvent(function(){
var _6b={};
_6b.id=_6b.altContentId=_60;
_6b.width=_61;
_6b.height=_62;
_6b.expressInstall=_64;
showExpressInstall(_6b);
createCSS("#"+_60,"visibility:visible");
});
}
}
},getFlashPlayerVersion:function(){
return {major:ua.playerVersion[0],minor:ua.playerVersion[1],release:ua.playerVersion[2]};
},hasFlashPlayerVersion:function(_6c){
return hasPlayerVersion(_6c.split("."));
},createSWF:function(_6d,_6e,el){
if(ua.w3cdom&&_5){
createSWF(_6d,_6e,el);
}
},createCSS:function(sel,_71){
if(ua.w3cdom){
createCSS(sel,_71);
}
},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(_72){
var q=document.location.search||document.location.hash;
if(_72==null){
return q;
}
if(q){
var _74=q.substring(1).split("&");
for(var i=0;i<_74.length;i++){
if(_74[i].substring(0,_74[i].indexOf("="))==_72){
return _74[i].substring((_74[i].indexOf("=")+1));
}
}
}
return "";
},expressInstallCallback:function(){
if(_6&&_4){
var obj=document.getElementById("SWFObjectExprInst");
if(obj){
obj.parentNode.replaceChild(_4,obj);
_4=null;
_6=false;
}
}
}};
}();
var BrowserDetect={init:function(){
this.browser=this.searchString(this.dataBrowser)||"Unknown Browser";
this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"Unknown Version";
this.OS=this.searchString(this.dataOS)||"Unknown OS";
},searchString:function(_dc){
for(var i=0;i<_dc.length;i++){
var _de=_dc[i].string;
var _df=_dc[i].prop;
this.versionSearchString=_dc[i].versionSearch||_dc[i].identity;
if(_de){
if(_de.indexOf(_dc[i].subString)!=-1){
return _dc[i].identity;
}
}else{
if(_df){
return _dc[i].identity;
}
}
}
},searchVersion:function(_e0){
var _e1=_e0.indexOf(this.versionSearchString);
if(_e1==-1){
return;
}
return parseFloat(_e0.substring(_e1+this.versionSearchString.length+1));
},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};
BrowserDetect.init();


