SKYPE.namespace("navigation");SKYPE.namespace("util");SKYPE.namespace("user");SKYPE.navigation.mouseOverTabs=function(){var b=YAHOO.util.Dom;var a=YAHOO.util.Event;a.onDOMReady(function(){var c=b.getElementsBy(function(e){return e},"li","mainNavigation");for(var d=0;d<c.length;d++){if(!b.hasClass(c[d],"active")){a.addListener(c[d],"mouseover",function(){b.addClass(this,"hover")});a.addListener(c[d],"mouseout",function(){b.removeClass(this,"hover")})}}})}();SKYPE.navigation.removeIEFlicker=function(){var b=YAHOO.util.Dom;var a=YAHOO.util.Event;a.onDOMReady(function(){if(SKYPE.util.Browser.isIE&&!SKYPE.util.Browser.isIE7){try{document.execCommand("BackgroundImageCache",false,true)}catch(c){}}})}();SKYPE.navigation.clearSearchInput=function(){var b=YAHOO.util.Dom;var a=YAHOO.util.Event;a.onDOMReady(function(){if(b.get("google-input")){var d=b.get("google-input");var c=d.value;a.addListener(d,"focus",function(){if(d.value==c){d.value=""}});a.addListener(d,"blur",function(){if(d.value==""){d.value=c}})}})}();SKYPE.navigation.changeLanguage=function(){var b=YAHOO.util.Dom;var a=YAHOO.util.Event;a.onDOMReady(function(){a.addListener(b.get("userLanguage"),"change",function(){var c=b.get("userPreferencesForm").action.replace(/(%5B|\[)LC(%5D|\])/g,b.get("userLanguage").options[b.get("userLanguage").selectedIndex].value);SKYPE.user.Preferences.setLanguage(b.get("userLanguage").options[b.get("userLanguage").selectedIndex].value.toUpperCase());SKYPE.user.Preferences.save();if(b.get("userLanguage").options[b.get("userLanguage").selectedIndex].value=="en"){c="/"}window.location=c})})}();SKYPE.navigation.buttonHovers=function(){var b=YAHOO.util.Dom;var a=YAHOO.util.Event;a.onDOMReady(function(){var d=b.getElementsByClassName("button","a");for(var c=0;c<d.length;c++){a.addListener(d[c],"mouseover",function(){b.addClass(this,"buttonHover")});a.addListener(d[c],"mouseout",function(){b.removeClass(this,"buttonHover")});a.addListener(d[c],"mousedown",function(){b.addClass(this,"buttonActive")})}})}();SKYPE.imgPngAlpha=function(){var b=YAHOO.util.Dom;var a=YAHOO.util.Event;a.addListener(window,"load",function(){if(navigator.platform=="Win32"&&navigator.appName=="Microsoft Internet Explorer"){for(var j=0;j<document.images.length;j++){var f=document.images[j];var h=f.src.toUpperCase();if(h.substring(h.length-3,h.length)=="PNG"&&f.className.indexOf("alphaPng",0)!=-1){var d=(f.id)?"id='"+f.id+"' ":"";var g=(f.className)?"class='"+f.className+"' ":"";var k=(f.title)?"title='"+f.title+"' ":"title='"+f.alt+"' ";var e="display:inline-block;"+f.style.cssText;if(f.align=="left"){e="float:left;"+e}if(f.align=="right"){e="float:right;"+e}if(f.parentElement.href){e="cursor:hand;"+e}var c="<span "+d+g+k+' style="width:'+f.width+"px; height:"+f.height+"px;"+e+";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+f.src+"', sizingMethod='scale');\"></span>";f.outerHTML=c;j=j-1}}}})}();SKYPE.util.StringLib={trim:function(a){return SKYPE.util.StringLib.rtrim(SKYPE.util.StringLib.ltrim(a))},ltrim:function(b){var a=" \n\t\f";while(a.indexOf(b.charAt(0))!=-1&&b.length!=0){b=b.substring(1)}return b},rtrim:function(b){var a=" \n\t\f";while(a.indexOf(b.charAt(b.length-1))!=-1&&b.length!=0){b=b.substring(0,b.length-1)}return b}};SKYPE.util.Cookie=function(a,c,b,g,e,f,d,h){this.document=a;this.name=c;if(b){this.expiration=new Date((new Date()).getTime()+b*3600000)}else{this.expiration=null}this.path=g?g:null;this.domain=e?e:null;this.secure=f?true:false;this.fieldsep=d?d:":";this.valuesep=h?h:"&";this.isSimpleValue=false;this.data={}};SKYPE.util.Cookie.prototype={store:function(e){var d="";var b="";var c=[];if(typeof this.data=="object"){for(var f in this.data){c.push(f)}if(e){c.sort()}for(var a=0;a<c.length;a++){if(d!=""){d+=this.fieldsep}d+=c[a]+this.valuesep+escape(this.data[c[a]])}}else{d=escape(this.data.toString())}b=this.name+"="+d;if(this.expiration){b+="; expires="+this.expiration.toGMTString()}if(this.path){b+="; path="+this.path}if(this.domain){b+="; domain="+this.domain}if(this.secure){b+="; secure"}this.document.cookie=b},load:function(){if(this.isSimpleValue&&typeof this.data!="string"){this.data=this.data.toString()}var e=this.document.cookie;if(e==""){return false}var g=e.indexOf(this.name+"=");if(g==-1){return false}g+=this.name.length+1;var c=e.indexOf(";",g);if(c==-1){c=e.length}var f=e.substring(g,c);if(!this.isSimpleValue){var b=f.split(this.fieldsep);for(var d=0;d<b.length;d++){b[d]=b[d].split(this.valuesep)}for(var d=0;d<b.length;d++){this.data[b[d][0]]=unescape(b[d][1])}}else{this.data=f}return true},remove:function(){var a=this.name+"=";if(this.path){a+="; path="+this.path}if(this.domain){a+="; domain="+this.domain}a+="; expires=Fri, 02-Jan-1970 00:00:00 GMT";this.document.cookie=a}};SKYPE.user.Preferences=function(){var h={LC:"",CCY:"",CC:"",TZ:"",VER:"",TS:"",TM:""};var d=null;var g="SC";var b=null;var i="/";var a=false;var c=null;var f=false;var e={"0":"windows","1":"pocketpc","2":"linux","3":"osx"};return{init:function(){this.setDomain();c=365;this.parseCookie()},getCookie:function(){var j=new SKYPE.util.Cookie(document,g,c,i,d,a,":","=");j.load();return j},scrubCookieValue:function(j){return j.replace(/[\n\r]/g,"").replace(/</g,"&lt;").replace(/>/g,"&gt;")},setDomain:function(l){if(l){d=l}else{if(location&&location.hostname){var k=location.hostname.split(".");var j=k.length;if(j>=2&&isNaN(parseInt(k[j-1]))){d="."+k[j-2]+"."+k[j-1]}}}},parseCookie:function(){b=this.getCookie();var k={LC:"setLanguage",CCY:"setCurrency",CC:"setCountryCode",TZ:"setTimezone",VER:"setVersion",TS:"setTimeStamp",TM:"setTimeModified",VAT:"setVatEligible"};f=true;for(var j in b.data){if(j.search(/[A-Z]+/)!=-1){if(k[j]){this[k[j]](b.data[j])}else{this.setValue(j,b.data[j])}}}f=false;return true},save:function(){for(var j in h){b.data[j]=h[j]}b.store(true)},clear:function(){b.remove()},getValue:function(j,k){if(typeof k=="undefined"){k=""}if(h[j]&&h[j]!=null&&h[j].length){return h[j]}return k},setValue:function(j,k){h[j]=k},touchCookie:function(){var j=parseInt(new Date().getTime()/1000);if(f){return false}if(!this.getTimeStamp().length){this.setValue("TS",j)}this.setValue("TM",j);return true},setLanguage:function(j){this.setValue("LC",j.replace(/_/g,"-"));this.touchCookie();return true},getLanguage:function(j){return this.getValue("LC",j)},setCurrency:function(j){if(/^([A-Z]{3}|[0-9]{3})$/.test(j)==false){j=""}this.setValue("CCY",j);this.touchCookie();return true},getCurrency:function(j){return this.getValue("CCY",j)},setCountryCode:function(j){if(/^([A-Z]{2,3}|[0-9]{3})$/.test(j)==false){j=""}this.setValue("CC",j);this.touchCookie();return true},getCountryCode:function(j){return this.getValue("CC",j)},formatDecimal:function(j){if(j<10){return"0"+j}return j},setTimezone:function(n){if(/^([-+]((0[0-9]|1[0-3]):[0-5][0-9]|14:00)|Z)$/.test(n)==false){var m=n.match(/^([-+]?)([0-9]{1,2})(\.[0-9])?$/);if(m){var k=m[1]&&m[1].length?m[1]:"+";var j=parseInt(m[2]);var l=m[3]&&m[3].length?parseInt(60*parseFloat(m[3])):0;if(j>14){j=14}if(j==14){l=0}if(l>59){l=0}n=k+this.formatDecimal(j)+":"+this.formatDecimal(l)}}this.setValue("TZ",n);this.touchCookie();return true},getTimezone:function(j){return this.getValue("TZ",j)},setVersion:function(k){if(typeof k=="object"){var m={platform:"",platformname:"",version:"",campaign:"",partner:"",partnername:""};for(var l in m){if(k[l]==null){k[l]=m[l]}}var j=k.version.split(".");k=k.platform+"/"+j[0]+"."+j[1]+"."+(k.partner.length?k.partner:j[2])+"."+j[3]+"/"+k.campaign}if(/^[0-9]?\/[0-9]{1,2}(\.[0-9]{1,3}){3}\/[0-9]*$/.test(k)==false){return false}this.setValue("VER",k);this.touchCookie();return true},getVersion:function(j){return this.getValue("VER",j)},getParsedVersion:function(m){var k={platform:"",platformname:"",version:"",campaign:"",partner:"",partnername:""};var j=this.getVersion(m);if(!j.length){return k}var l=j.split("/");k.platform=l[0];k.version=l[1];k.campaign=l[2];l=k.version.split(".");k.partner=(l.length>2&&l[2])?l[2]:0;return k},setTimeStamp:function(j){this.setValue("TS",j);this.touchCookie()},getTimeStamp:function(j){return this.getValue("TS",j)},setTimeModified:function(j){if(this._parsing){this.setValue("TM",j)}this.touchCookie()},getTimeModified:function(j){return this.getValue("TM",j)},setVatEligible:function(k){var j="";if(typeof k=="string"){if(k=="true"){j="true"}else{if(k=="false"){j="false"}else{j=""}}}else{if(typeof k=="boolean"){j=k?"true":"false"}else{if(typeof k=="number"){if(k==1){j="true"}else{if(k==0){j="false"}else{j=""}}}}}this.setValue("VAT",j);this.touchCookie()},isVatEligible:function(){var j=this.getValue("VAT");if(j=="true"){return true}else{if(j=="false"){return false}else{return null}}},debug:function(){var j="";for(var k in h){j=j+k+" = "+h[k]+"\n"}return j}}}();SKYPE.findParentTag=function(b,a){a=a.toUpperCase();while(b.parentNode){if(b.parentNode.tagName.toUpperCase()==a){return b.parentNode}b=b.parentNode}return null};SKYPE.loadCss=function(a){var b=document.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("type","text/css");b.setAttribute("href",a);if(typeof b!="undefined"){document.getElementsByTagName("head")[0].appendChild(b)}};SKYPE.submitButtons=function(){var b=YAHOO.util.Dom;var a=YAHOO.util.Event;a.onDOMReady(function(){var n=document.getElementsByTagName("form");for(var k=0;k<n.length;k++){var o=n[k].getElementsByTagName("button");if(o[0]!=undefined){if(o[0].className.indexOf("submitButton")>-1){var r=o[0].className.split(" ");var m=o[0].innerHTML;var d=document.createElement("span");var q=document.createElement("a");var e=document.createElement("span");var h=true;var p,s;b.addClass(d,"buttonSmall");for(var g=0;g<r.length;g++){if(r[g]=="blue"||r[g]=="green"||r[g]=="yellow"){h=false;p=r[g]}else{if(r[g].match("shop")||r[g].match("skypeCredit")||r[g].match("skypeOnlineNr")||r[g].match("skypeVoicemail")){s=r[g]}else{b.addClass(d,r[g])}}}if(h){b.addClass(q,"gray")}else{b.addClass(q,p)}b.addClass(q,s);d.appendChild(q);var l="submitButton_"+k;d.setAttribute("id",l);q.appendChild(e);q.setAttribute("href","#");e.innerHTML=m;o[0].parentNode.appendChild(d);var f=o[0].parentNode.removeChild(o[0])}}}var c=b.get(l);a.addListener(c,"click",function(){SKYPE.findParentTag(c,"form").submit()})})}();SKYPE.user.Preferences.init();function hide(b){var a=document.getElementById(b);if(a){a.style.display="none"}}function show(b){var a=document.getElementById(b);if(a){a.style.display=""}}function selecttab(c){var b=c.parentNode.parentNode.childNodes;for(var a=0;a<b.length;a++){if(b[a].tagName=="LI"){b[a].className=""}}c.parentNode.className="selected"};