var luGears=function(blog_name,plugin_url,plugin_ver){this.blog_name=blog_name;this.plugin_url=plugin_url;this.plugin_ver=plugin_ver;this.already_init=false;this.testBrowser=function(){if(navigator.userAgent.indexOf('MSIE')!=-1&&'undefined'==typeof window.opera){var start=navigator.userAgent.indexOf('MSIE')+5;var v=parseFloat(navigator.userAgent.substring(start,start+3));if(v>=6.0)return true;else return false;}
if(navigator.userAgent.indexOf('Firefox')!=-1){var start=navigator.userAgent.indexOf('Firefox')+8;var v=parseFloat(navigator.userAgent.substring(start,start+3));if(v>=1.5)return true;else return false;}
if(navigator.userAgent.indexOf('Chrome')!=-1){return true;}
return false;}
this.testGears=function(){if(navigator.userAgent.indexOf('Chrome')!=-1){return true;}else{return('undefined'!=typeof google&&google.gears);}};this.init=function(){if(!this.testGears)return;var gf=false;if('undefined'!=typeof GearsFactory){gf=new GearsFactory();}else{try{gf=new ActiveXObject('Gears.Factory');if(factory.getBuildInfo().indexOf('ie_mobile')!=-1)
gf.privateSetGlobalObject(this);}catch(e){if(('undefined'!=typeof navigator.mimeTypes)&&navigator.mimeTypes['application/x-googlegears']){gf=document.createElement("object");gf.style.display="none";gf.width=0;gf.height=0;gf.type="application/x-googlegears";document.documentElement.appendChild(gf);}}}
if(!gf){return;}
if('undefined'==typeof google)google={};if(!google.gears)google.gears={factory:gf};this.already_init=true;};this.createStore=function(){if(!this.testGears)return;if('undefined'==typeof gLS)gLS=google.gears.factory.create("beta.localserver");gMS=gLS.createManagedStore(this.storeName());gMS.manifestUrl=this.plugin_url+"/manifest.php";gMS.checkForUpdate();this.message();};this.getPermission=function(){if(!this.testGears())return;if(!google.gears.factory.hasPermission)
google.gears.factory.getPermission(this.blog_name,this.plugin_url+"/wp-turbo.png","Download all static files of this blog to boost your surfing! -- Powered by WP-Turbo");try{this.createStore();}catch(e){}};this.installGears=function(){var gearsurl="http://gears.google.com";var wnd=window.open(gearsurl);if('undefined'==wnd)alert("Please turn off the popup blocker of your browser to install Google Gears");this.hidemsg();}
this.storeName=function(){var n="LU_WP_TURBO_";n+=this.plugin_ver;n=n.replace(/[\/\\:*"?<>|;,]+/g,'_');return n;};this.message=function(t,auto){var m0=this.d('wp-turbo-msg0');if(!this.testBrowser()){if(auto)document.cookie="wp-turbo-auto-mode=deny; expires=12/31/2038 00:00:00";if(t&&auto&&(this.c('wp-turbo-auto-mode')=='yes'||this.c('wp-turbo-auto-mode')=='deny'))return true;m0.style.display='block';if(t)this.d('wp-turbo-msgbox').style.display='block';return;}
var m1=this.d('wp-turbo-msg1'),m2=this.d('wp-turbo-msg2'),m3=this.d('wp-turbo-msg3'),sw=this.d('wp-turbo-wait'),swn=this.d('wp-turbo-wait-num');if(!m1)return;if(!this.testGears()){m1.style.display='block';m2.style.display=m3.style.display='none';}else{if(!this.already_init){return;}
if(!google.gears.factory.hasPermission){m1.style.display=m3.style.display='none';m2.style.display='block';}else{m1.style.display=m2.style.display='none';m3.style.display='block';if('undefined'==typeof gMS)this.createStore();gMS.oncomplete=function(){sw.innerHTML='Complete!';swn.innerHTML='';if(auto)document.cookie="wp-turbo-auto-mode=yes; expires=12/31/2038 00:00:00";};gMS.onerror=function(){sw.innerHTML='Error: '+gMS.lastErrorMessage;if(auto)document.cookie="wp-turbo-auto-mode=yes; expires=12/31/2038 00:00:00";};gMS.onprogress=function(e){swn.innerHTML=(e.filesComplete+'/'+e.filesTotal);};}}
if(t&&auto&&(this.c('wp-turbo-auto-mode')=='yes'||this.c('wp-turbo-auto-mode')=='deny'))return true;if(t)this.d('wp-turbo-msgbox').style.display='block';};this.hidemsg=function(){this.d('wp-turbo-msgbox').style.display='none';};this.disableautoturbo=function(){document.cookie="wp-turbo-auto-mode=deny; expires=12/31/2038 00:00:00";this.d('wp-turbo-n1').style.display='none';this.d('wp-turbo-n2').style.display='none';this.d('wp-turbo-msgbox').style.display='none';};this.d=function(id){return document.getElementById(id);};this.c=function(cookie_name){var results=document.cookie.match('(^|;) ?'+cookie_name+'=([^;]*)(;|$)');if(results)return(unescape(results[2]));else return null;};};