var PicLensLite={start:function(namedArgs){this.determineBrowserParams();clearTimeout(this.REMOVE_TIMER_ID);clearTimeout(this.AUTO_CLOSE_TIMER_ID);this.ARGS={};if(typeof namedArgs!=="undefined"&&namedArgs!==null){this.ARGS=namedArgs;if(namedArgs.feedUrl){this.THE_FEED_URL=namedArgs.feedUrl;if(this.checkForPluginAndLaunchIfPossible(namedArgs.feedUrl,namedArgs.guid)){return;}
if(namedArgs.loadFeedInFlash){this.showFlashUI("");}else{this.loadViaXHR(namedArgs.feedUrl);}}
if(typeof namedArgs.feedData!=='undefined'){this.showFlashUI(namedArgs.feedData);}}else{var feeds=this.indexFeeds();if(feeds.length!==0){var feed=feeds[0];this.THE_FEED_URL=feed.url;if(this.checkForPluginAndLaunchIfPossible(feed.url)){return;}
this.loadViaXHR(feed.url);}}},isRunning:function(){return this.LITE_IS_RUNNING;},hasClient:function(){return this.hasCooliris();},addCustomButton:function(buttonRESTUrl,buttonLabel,buttonIcon){this.CUSTOM_BUTTON={targetURL:buttonRESTUrl,labelText:buttonLabel,iconImage:buttonIcon};},setCallbacks:function(args){if(args.onNoPlugins){this.ON_NO_PLUGINS=args.onNoPlugins;}
if(args.onExit){this.ON_EXIT=args.onExit;}},setLiteURLs:function(args){if(!this.LITE_URL){if(args.swf){this.LITE_URL=args.swf;}else if(args.lite){this.LITE_URL=args.lite+"PicLensLite.swf";}}
if(!this.BUTTON_URL){if(args.button){this.BUTTON_URL=args.button;}else if(args.lite){this.BUTTON_URL=args.lite+"NoFlash.jpg";}}
var lboxUrl="";if(args.lbox){lboxUrl=args.lbox;}else if(args.lite){lboxUrl=args.lite+"../lytebox/";}
if(!this.LBOX_CSS_URL){if(args.lboxcss){this.LBOX_CSS_URL=args.lboxcss;}else if(lboxUrl!=""){this.LBOX_CSS_URL=lboxUrl+"lytebox.css";}}
if(!this.LBOX_JS_URL){if(args.lboxjs){this.LBOX_JS_URL=args.lboxjs;}else if(lboxUrl!=""){this.LBOX_JS_URL=lboxUrl+"lytebox.js";}}},ARGS:{},DEBUG_NOCLIENT:false,DEBUG_NOFLASH:false,HPAD:60,VPAD:20,LITE_BG_DIV:null,LITE_FG_DIV:null,LITE_URL:null,BUTTON_URL:null,LBOX_CSS_URL:null,LBOX_JS_URL:null,LBOX_COUNT:0,SHOW_LBOX:false,OS_WIN:false,OS_MAC:false,BROWSER_FFX:false,BROWSER_SAF:false,BROWSER_IE:false,BROWSER_IE6:false,OLD_B_MARGIN:null,OLD_B_OVERFLOW:null,OLD_B_HEIGHT:null,OLD_H_OVERFLOW:null,OLD_H_HEIGHT:null,THE_FEED:"",THE_FEED_URL:"",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/",PLC:null,LEARN_PL_URL:"http://affiliate.piclens.com/partner/",FONT:"font-family: Lucida Grande, Myriad Pro, Verdana, Helvetica, Arial, sans-serif;",KEY_HANDLERS:"",ON_NO_PLUGINS:null,ON_EXIT:null,AUTO_CLOSE_TIMER_ID:0,REMOVE_TIMER_ID:0,RESIZE_TIMER_IE6:null,RESIZE_HANDLER_EXISTS:false,CUSTOM_BUTTON:null,addKeyHandlers:function(){var self=this;if(typeof document.onkeydown!=='undefined'){this.KEY_HANDLERS=document.onkeydown;}
document.onkeydown=function(e){var keycode;if(typeof e==="undefined"||e===null){keycode=window.event.keyCode;}else{keycode=e.which;}
var val=self.handleKeyPress(keycode);if(typeof e!="undefined"&&e!=null){e.returnValue=val;}
return val;};},addMouseHandlers:function(){if(window.addEventListener){window.addEventListener("DOMMouseScroll",this.handleMouseWheel,false);}else if(document.attachEvent){document.attachEvent("onmousewheel",this.handleMouseWheel);}
window.onmousewheel=document.onmousewheel=this.handleMouseWheel;},appendElementsToDocument:function(){if(this.BROWSER_FFX&&this.OS_MAC){this.LITE_BG_DIV.style.display="none";}
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 size=this.getPageSize();var bg=this.LITE_BG_DIV;if(bg){bg.style.height=size.h+'px';bg.style.width=size.w+'px';}
if(this.LITE_FG_DIV){var fgs=this.LITE_FG_DIV.style;this.resizeToPaddedBox(fgs);this.resizeToFitPaddedBox(fgs,size);this.resizeFlashToFitPaddedBox();}},checkForPluginAndLaunchIfPossible:function(url,guid){if(this.hasCooliris()){if(typeof(guid)!="undefined"){this.PLC.launch(url,'uid',guid);}else{this.PLC.launch(url,'','');}
return true;}
return false;},createBackgroundOverlay:function(){var bg=document.createElement('div');this.LITE_BG_DIV=bg;bg.id="lite_bg_div";var bgs=bg.style;bgs.position='fixed';bgs.width=bgs.height="100%";if(this.BROWSER_IE6){var b=document.body;var bs=b.currentStyle;var de=document.documentElement;var ds=de.currentStyle;this.OLD_B_MARGIN=bs.margin;this.OLD_B_OVERFLOW=bs.overflow;this.OLD_B_HEIGHT=bs.height;this.OLD_H_OVERFLOW=ds.overflow;this.OLD_H_HEIGHT=ds.height;this.OLD_SCROLL_Y=de.scrollTop;b.style.margin="0";b.style.overflow="auto";b.style.height="100%";de.style.overflow="auto";de.style.height="100%";bgs.position='absolute';var page=this.getPageSize();bgs.height=page.h+'px';bgs.width=page.w+'px';}
bgs.left=bgs.right=bgs.top=bgs.bottom='0';bgs.backgroundColor='#000';bgs.zIndex=1000;bgs.opacity='0.5';bgs.filter='alpha(opacity=50)';var self=this;bg.onclick=function(){self.exitPicLensLite();};},createForegroundFlashComponent:function(){var fg=document.createElement('div');this.LITE_FG_DIV=fg;fg.id="lite_fg_div";var fgs=fg.style;fgs.backgroundColor='#000';fgs.position='fixed';fgs.border='2px solid #555';fgs.zIndex=1001;this.resizeToPaddedBox(fgs);if(this.BROWSER_IE6){fgs.position='absolute';this.resizeToFitPaddedBox(fgs);}},closeFlashUI:function(itemID){var doc=document;doc.onkeydown=this.KEY_HANDLERS;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=this.LITE_FG_DIV.style.display='none';this.REMOVE_TIMER_ID=setTimeout(function(){PicLensLite.removeChildren();},150);if(this.BROWSER_IE6){var b=document.body;var de=document.documentElement;b.style.margin=this.OLD_B_MARGIN;b.style.overflow=this.OLD_B_OVERFLOW;b.style.height=this.OLD_B_HEIGHT;de.style.overflow=this.OLD_H_OVERFLOW;de.style.height=this.OLD_H_HEIGHT;window.scrollTo(0,this.OLD_SCROLL_Y);}
if(this.ON_EXIT!==null){this.ON_EXIT(itemID);}
this.setRunningFlag(false);},determineBrowserParams:function(){var os=BrowserDetect.OS;var b=BrowserDetect.browser;this.OS_MAC=(os=="Mac");this.OS_WIN=(os=="Windows");this.BROWSER_FFX=(b=="Firefox");this.BROWSER_SAF=(b=="Safari");this.BROWSER_IE=(b=="Explorer");this.BROWSER_IE6=(this.BROWSER_IE&&BrowserDetect.version=="6");this.FLASH_VER=swfobjlite.getFlashPlayerVersion();},exitPicLensLite:function(){var fl=this.getFlash();if(fl!==null&&fl.fl_exitPicLensLite){fl.fl_exitPicLensLite();this.AUTO_CLOSE_TIMER_ID=setTimeout(function(){if(PicLensLite.isRunning()){PicLensLite.closeFlashUI();}},500);}else{this.closeFlashUI();}},findScriptLocation:function(){var scriptTags=document.getElementsByTagName("script");for(var i=0;i!=scriptTags.length;++i){var script=scriptTags[i];var type=script.getAttribute("type");if(type=="text/javascript"){var src=script.getAttribute("src");if(src===null){continue;}
var index=src.indexOf("piclens.js");if(index!=-1){this.setLiteURLs({lite:src.substring(0,index)});return;}else{index=src.indexOf("piclens_optimized.js");if(index!=-1){this.setLiteURLs({lite:src.substring(0,index)});return;}}}}},getPageSize:function(){var xScroll,yScroll,winW,winH;var doc=document;var body=doc.body;var html;if(window.innerHeight&&window.scrollMaxY){xScroll=doc.scrollWidth;yScroll=(this.isFrame?parent.innerHeight:self.innerHeight)+(this.isFrame?parent.scrollMaxY:self.scrollMaxY);}else if(body.scrollHeight>body.offsetHeight){xScroll=body.scrollWidth;yScroll=body.scrollHeight;}else{html=doc.getElementsByTagName("html").item(0);xScroll=html.offsetWidth;yScroll=html.offsetHeight;xScroll=(xScroll<body.offsetWidth)?body.offsetWidth:xScroll;yScroll=(yScroll<body.offsetHeight)?body.offsetHeight:yScroll;}
var docElement=doc.documentElement;if(self.innerHeight){winW=(this.isFrame)?parent.innerWidth:self.innerWidth;winH=(this.isFrame)?parent.innerHeight:self.innerHeight;}else if(docElement&&docElement.clientHeight){winW=docElement.clientWidth;winH=docElement.clientHeight;}else if(body){html=doc.getElementsByTagName("html").item(0);winW=html.clientWidth;winH=html.clientHeight;winW=(winW==0)?body.clientWidth:winW;winH=(winH==0)?body.clientHeight:winH;}
var pageHeight=(yScroll<winH)?winH:yScroll;var pageWidth=(xScroll<winW)?winW:xScroll;return{pw:pageWidth,ph:pageHeight,w:winW,h:winH};},getElementsFromXMLFeed:function(){var xmlDoc;if(window.ActiveXObject){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async=false;xmlDoc.loadXML(PicLensLite.THE_FEED);}else{var parser=new DOMParser();xmlDoc=parser.parseFromString(PicLensLite.THE_FEED,"text/xml");}
var elements=xmlDoc.getElementsByTagName('*');return elements;},getBasicSlideShowHTML:function(){if(!this.LBOX_JS_URL||!this.LBOX_CSS_URL){return"";}
var head=document.getElementsByTagName('head').item(0);var script=document.createElement('script');script.src=this.LBOX_JS_URL;script.type='text/javascript';head.appendChild(script);var link=document.createElement('link');link.rel="stylesheet";link.href=this.LBOX_CSS_URL;link.type="text/css";link.media="screen";head.appendChild(link);var xmlElements=this.getElementsFromXMLFeed();var i;var hiddenURLs="";for(i=0;i<xmlElements.length;i++){if(xmlElements[i].nodeName=="media:content"){var url=xmlElements[i].getAttribute("url");if(url.indexOf(".flv")==-1){hiddenURLs+='<a id="lboxImage" href="'+url+'" rel="lytebox[lite]"></a> ';}}}
var basicSlideShow="<div id='lightbox_images' align='center' style='display: none; padding-top:10px; color:#FFFFFF; font-size:.8em; "+this.FONT+" color:#999999;'>";basicSlideShow+='( Alternatively, <a onclick="javascript:PicLensLite.invokeLytebox();return false;" href="#" style="color:#656588">click here for a basic slideshow</a>. )';basicSlideShow+=hiddenURLs;basicSlideShow+="</div><br/>";return basicSlideShow;},generateAlternativeContent:function(){var altContentHTML='<div id="altContent" style="text-align:center; margin: 0 0 0 0; padding: 0 0 0 0; background-color: #000; min-width:860px;">';altContentHTML+='<div align="center" style="width: 100%; padding-top:60px; '+this.FONT+'">';var v=this.FLASH_VER;var flashMessage;if(v.major>0){flashMessage="update your Flash Player from version "+v.major+'.'+v.minor+'.'+v.release+" to version 9.0.28 or newer";}else{flashMessage="install the most recent Flash Player";}
var basicSlideShow="";if(this.THE_FEED!==""){basicSlideShow=this.getBasicSlideShowHTML();}
var downloadPL=this.PL_URL;var learnPL=this.LEARN_PL_URL;var pid=this.ARGS.pid;if(pid){downloadPL+=pid+"/";learnPL+=pid+"/";}else{var x="000000000001/";downloadPL+=x;learnPL+=x;}
if(this.SHOW_LBOX){}else{var sp="<span style='padding-left:25px; color:#C6C6C6; font-size:";altContentHTML+="<div style='padding:10px;'>"+
sp+"1.5em; font-weight: bold; "+this.FONT+"'>You're clicks away from going full screen!</span><br/>"+
sp+".9em; padding-bottom: 15px; "+this.FONT+"'>You must get the <a href='"+downloadPL+"' style='color:#656588'>Cooliris</a> browser plugin, or "+flashMessage+".</span>"+"</div>";if(!this.BUTTON_URL){altContentHTML+='<a href="'+downloadPL+'" style="color:#ACD">Get Cooliris Now!</a>';}else{var area='<area shape="rect" coords=';altContentHTML+='<img src="'+this.BUTTON_URL+'" alt="" border="0" usemap="#Map">'+'<map name="Map" id="Map">'+
area+'"0,0,33,33" href="#" onclick="javascript:PicLensLite.closeFlashUI();" />'+
area+'"35,35,325,325" href="'+downloadPL+'" />'+
area+'"593,209,825,301" href="'+this.FLASH_URL+'" />'+
area+'"327,148,448,178" href="'+learnPL+'" />'+'</map>';}}
altContentHTML+='</div>';altContentHTML+=basicSlideShow;altContentHTML+='<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>';altContentHTML+='</div>';return altContentHTML;},generateFlashVars:function(){var fv='';var args=this.ARGS;if(typeof args.guid!=='undefined'){fv+="&startItemGUID="+args.guid;}
if(args.loadFeedInFlash){fv+="&feedURL="+encodeURIComponent(this.THE_FEED_URL);}
if(args.paused){fv+="&paused="+args.paused;}
if(args.loop){fv+="&loop="+args.loop;}
if(args.delay){fv+="&delay="+args.delay;}
if(args.pid){fv+="&pid="+args.pid;}
if(typeof args.maxScale!='undefined'){fv+="&maxScale="+args.maxScale;}
if(typeof args.overlayToolbars!='undefined'){fv+="&overlayToolbars="+args.overlayToolbars;}
var cb=this.CUSTOM_BUTTON;if(cb!=null){fv+="&cButtonURL="+encodeURIComponent(cb.targetURL);if(cb.labelText!=null){fv+="&cButtonLabel="+encodeURIComponent(cb.labelText);}
if(cb.iconImage!=null){fv+="&cButtonIcon="+encodeURIComponent(cb.iconImage);}}
fv+="&swfURL="+encodeURIComponent(this.LITE_URL);fv=fv.substring(1);return fv;},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 docElement=document.documentElement;var docBody=document.body;var w=0,h=0;if(typeof(window.innerWidth)=='number'){w=window.innerWidth;h=window.innerHeight;}else if(docElement&&(docElement.clientWidth||docElement.clientHeight)){w=docElement.clientWidth;h=docElement.clientHeight;}else if(docBody&&(docBody.clientWidth||docBody.clientHeight)){w=docBody.clientWidth;h=docBody.clientHeight;}
return{w:w,h:h};},handleKeyPress:function(code){if(!this.isRunning()){return true;}
var fl=this.getFlash();if(fl!=null&&fl.fl_keyPressed){fl.fl_keyPressed(code);}else{if(code==27){this.closeFlashUI();return false;}}
if(code==9||code==13){return false;}
return true;},handleMouseWheel:function(e){var delta=0;if(!e){e=window.event;}
if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera){delta=-delta;}}else if(e.detail){var d=e.detail;if(Math.abs(d)<3){delta=-d;}else{delta=-d/3;}}
if(delta){PicLensLite.sendMouseScrollToFlash(delta);}
if(e.preventDefault){e.preventDefault();}
e.returnValue=false;return false;},hasPicLensClient:function(){return this.hasCooliris();},hasCooliris:function(){if(this.DEBUG_NOCLIENT){return false;}
var clientExists=false;if(this.PLC){clientExists=true;}else if(window.piclens&&window.piclens.launch){this.PLC=window.piclens;clientExists=true;}else{var context=null;if(typeof PicLensContext!='undefined'){context=new PicLensContext();}else{try{context=new ActiveXObject("PicLens.Context");}catch(e){if(navigator.mimeTypes['application/x-cooliris']){context=document.createElement('object');context.style.height="0px";context.style.width="0px";context.type='application/x-cooliris';document.documentElement.appendChild(context);}else{context=null;}}}
this.PLC=context;if(this.PLC){clientExists=true;}}
if(clientExists){if(this.BROWSER_SAF){return true;}
var version;try{version=this.PLC.version;}catch(e){return false;}
var parts=version.split('.');if(parts[0]>1){return true;}else if(parts[0]==1){if(parts[1]>6){return true;}else if(parts[1]==6){if(parts[2]>0){return true;}else if(parts[2]==0){if(parts[3]>=824){return true;}}}}
return false;}else{return false;}},invokeLytebox:function(){this.SHOW_LBOX=true;myLytebox.start(document.getElementById("lboxImage"),false,false);this.closeFlashUI();},showLyteboxLink:function(){myLytebox.updateLyteboxItems();myLytebox.doAnimations=false;var lboxImages=document.getElementById('lightbox_images');if(lboxImages!=null){lboxImages.style.display="block";if(this.SHOW_LBOX&&this.getFlash()==null){this.invokeLytebox();}}},startLytebox:function(){if(typeof myLytebox!="undefined"){this.showLyteboxLink();}else{if(typeof initLytebox!="undefined"){initLytebox();this.showLyteboxLink();}else{if(this.LBOX_COUNT>=4){return;}
setTimeout(function(){PicLensLite.startLytebox();},150);this.LBOX_COUNT++;}}},injectFlashPlayer:function(){var fg=this.LITE_FG_DIV;var flashWInner;var flashHInner;flashWInner=flashHInner='100%';if(this.BROWSER_IE6){flashWInner=flashHInner='0';}
var flashVars=this.generateFlashVars();var altContentHTML=this.generateAlternativeContent();if(this.meetsReqs()){var par='<param name=';fg.innerHTML='<object id="'+this.FLASH_ID_1+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">'+
par+'"movie" value="'+this.LITE_URL+'" />'+
par+'"quality" value="high"/> '+
par+'"bgcolor" value="#000000"/> '+
par+'"allowScriptAccess" value="always"/> '+
par+'"FlashVars" value="'+flashVars+'"/> '+
par+'"allowFullScreen" value="true"/> '+
par+'"wmode" value="window"/> '+
par+'"scale" value="noscale"/> '+'<object type="application/x-shockwave-flash" data="'+this.LITE_URL+'" width="'+flashWInner+'" height="'+flashHInner+'" '+'quality="high" '+'bgcolor="#000000" id="'+this.FLASH_ID_2+'" '+'quality="high" '+'FlashVars="'+flashVars+'" '+'allowFullScreen="true" '+'scale="noscale" '+'wmode="window" '+'allowScriptAccess="always">'+
altContentHTML+'</object>'+'</object>';}else{if(this.ON_NO_PLUGINS){this.ON_NO_PLUGINS();}else{fg.innerHTML=altContentHTML;fg.style.minWidth="860px";fg.style.minHeight="550px";}}
if(this.BROWSER_SAF){this.resizeUI();}},indexFeeds:function(){var linkTags=document.getElementsByTagName("link");var feeds=[];for(var i=0;i!=linkTags.length;++i){var link=linkTags[i],type=link.getAttribute("type");if(type=="application/rss+xml"||type=="text/xml"){feeds.push({title:link.getAttribute("title"),url:link.getAttribute("href")});}}
return feeds;},loadViaXHR:function(url){var self=this;var request=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");try{request.open("GET",url,true);request.onreadystatechange=function(){if(request.readyState==4){if((request.status==200||request.status==0)){if(request.responseText){self.showFlashUI(request.responseText);}}else{if(console){console.log("PicLens Lite could not load the RSS Feed: "+url);}}}};request.send("");}catch(err){this.ARGS.loadFeedInFlash=true;this.showFlashUI("");}},meetsReqs:function(){if(this.DEBUG_NOFLASH){return false;}
var ie7FlashDetectionWorkaround=(this.FLASH_VER.major==0)&&this.BROWSER_IE;var hasFlash=swfobjlite.hasFlashPlayerVersion("9.0.28");return hasFlash||ie7FlashDetectionWorkaround;},removeChildren:function(){this.REMOVE_TIMER_ID=0;if(this.LITE_BG_DIV!==null){document.body.removeChild(this.LITE_BG_DIV);this.LITE_BG_DIV=null;}
if(this.LITE_FG_DIV!==null){document.body.removeChild(this.LITE_FG_DIV);this.LITE_FG_DIV=null;}},resizeFlashToFitPaddedBox:function(){var flash=this.getFlash();if(flash){var size=this.getPageSize();var w=size.w-this.HPAD*2;var h=size.h-this.VPAD*2;flash.style.width=w;flash.style.height=h;flash.width=w;flash.height=h;}},resizeToFitPaddedBox:function(s,size){if(typeof size=='undefined'){size=this.getPageSize();}
s.width=(size.w-this.HPAD*2)+'px';s.height=(size.h-this.VPAD*2)+'px';},resizeToPaddedBox:function(s){s.left=s.right=this.HPAD+'px';s.top=s.bottom=this.VPAD+'px';},resizeUI:function(){if(this.LITE_FG_DIV){var fgs=this.LITE_FG_DIV.style;this.resizeToPaddedBox(fgs);this.resizeToFitPaddedBox(fgs);this.resizeFlashToFitPaddedBox();}},setRunningFlag:function(flag){this.LITE_IS_RUNNING=flag;this.piclensIsRunning_=flag;},setResizeHandler:function(){if(!this.RESIZE_HANDLER_EXISTS&&this.BROWSER_SAF){var self=this;window.addEventListener('resize',function(){self.resizeUI();},false);this.RESIZE_HANDLER_EXISTS=true;}},setResizeTimer:function(){if(this.BROWSER_IE6){this.RESIZE_TIMER_IE6=setInterval(function(){PicLensLite.autoResize();},1000);}},showFlashUI:function(feedText){this.THE_FEED=feedText;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(delta){if(!this.isRunning()){return;}
var fl=this.getFlash();if(fl!=null&&fl.fl_mouseMoved){fl.fl_mouseMoved(delta);}}};var swfobjlite=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",win=window,doc=document,nav=navigator;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF&&typeof doc.appendChild!=UNDEF&&typeof doc.replaceChild!=UNDEF&&typeof doc.removeChild!=UNDEF&&typeof doc.cloneNode!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0;}}
else if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7");}
catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always";}
catch(e){if(playerVersion[0]==6){fp6Crash=true;}}
if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX);}
catch(e){}}}
if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}
catch(e){}}}
var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac};}();return{hasFlashPlayerVersion:function(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10);v[2]=parseInt(v[2],10);return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]};}};}();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(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1){return data[i].identity;}}else if(dataProp){return data[i].identity;}}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1){return;}return parseFloat(dataString.substring(index+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();
