SKYPE.namespace("util");SKYPE.util.ClientDetection=function(){var n=false;var d=false;var e="/i/common/swf/clientdetection.swf";var h="detectionswf";var l="detection-container";var i=5000;var a=YAHOO.util.Dom;var o=YAHOO.util.Event;var k={};var f={};var b=function(){if(n){return}if(typeof SWFObject=="undefined"){return}var p=a.get(l);if(!p){p=document.createElement("DIV");p.id=l;a.setStyle(p,"position","absolute");a.setStyle(p,"width","10px");a.setStyle(p,"height","10px");a.setStyle(p,"font","1px monospace");a.setStyle(p,"bottom","0px");a.setStyle(p,"left","0px");a.setStyle(p,"overflow","hidden");document.body.appendChild(p)}var q=new SWFObject(e,h,"10","10","8","#FFFFFF");q.addParam("allowScriptAccess","always");q.write(l);n=true;window.setTimeout(g,i)};var c=function(p){if(typeof k[p]=="undefined"||k[p]==null||(typeof k[p]=="string"&&!k[p].length)||k[p]=="null"){return null}return k[p]};var g=function(){if(!d){m.fire()}};var j=new YAHOO.util.CustomEvent("onDetectionAvailable");var m=new YAHOO.util.CustomEvent("onDetectionFailure");j.subscribe(function(){d=true;YAHOO.util.Dom.setStyle(l,"visibility","hidden")});return{setSWF:function(p){e=p},isReady:function(){return d},setSharedObjectData:function(q,p){k=q;f=p||{};j.fire();return true},isInstalled:function(){return c("ui_version")!=null},isAbandonedInstall:function(){var u=c("ui_installdate");var r=(new Date()).getTime()/1000;var t=c("download_date");var s=r-t;var q=5*60;var p=8*24*60*60;return(u==null&&t!=null&&s>q&&s<p)},getVersion:function(){return c("ui_version")},getPlatform:function(){var p=c("os_version");if(p){if(p.indexOf("Macintosh")!=-1){return"macosx"}else{if(p.indexOf("Linux")!=-1){return"linux"}}return"windows"}return null},getPlatformID:function(){switch(SKYPE.util.ClientDetection.getPlatform()){case"windows":return 0;case"macosx":return 3;case"linux":return 2}return""},getOSTimezone:function(){return c("os_timezone")||parseInt(new Date().getTimezoneOffset()/60)},getProfileTimezone:function(){return c("ui_timezone")},getSessionUsername:function(){if(typeof f.username=="string"){var p=(new Date()).getTime()/1000;if(typeof f.expires!="undefined"&&f.expires<p){try{a.get(h).clearSessionData()}catch(q){}return""}return f.username}return""},getSkypeUserAge:function(){var q=c("ui_installdate");if(typeof q=="string"){q=parseInt(q)}if(q==null||isNaN(q)||q==0){return -1}var p=Math.floor(((new Date()).getTime()/1000-q)/60/60/24);return p},isQualifiedVersion:function(q,r){var p=(r||c("ui_version")).split(".");q=q.split(".");try{if(parseInt(p[0])>parseInt(q[0])||(parseInt(p[0])==parseInt(q[0])&&parseInt(p[1])>parseInt(q[1]))||(parseInt(p[0])==parseInt(q[0])&&parseInt(p[1])==parseInt(q[1])&&parseInt(p[3])>=parseInt(q[3]))){return true}}catch(s){}return false},subscribe:function(r,s,q,p){j.subscribe(r,s,q);o.onDOMReady(b,null,this);if(typeof p=="function"){m.subscribe(p,s,q)}}}}();