function getButtonSpecs(){return{size:'s',type:'r',outerWidth:85,corners:4,padding:1,logoHeight:15,logoWidth:12,fontSize:12,lineHeight:12,mouseover:'t',showads:'f',logo:'0095C8',text:'000000',background:'FFFFFF',border:'CCCCCC',fontFamily:'Arial, Helvetica, sans-serif',logox:'0095C8',textx:'000000',backgroundx:'F9F9F9',links:'0000CC',active:'FFFFFF',activebg:'0095C8',inactive:'FFFFFF',inactivebg:'CCCCCC',services:[1,101,102,103,104,105,106,107,108,110,111,115,122,33,44,46,49,5,50,51,]};}if(typeof _ow=="undefined"){_ow={};_ow.btn=getButtonSpecs();_ow.ie6=("".length>0);_ow.wwwurl=(("https:"==document.location.protocol)?"https://onlywire.com":"http://onlywire.com");_ow.imagesPath=(("https:"==document.location.protocol)?"https://onlywire.com":"http://onlywire.com");_ow.token=null;_ow.E=function(a){return document.createElement(a)};_ow.T=function(a){return document.createTextNode(a)};if(!document.getElementById("ow_css_tag")){var documentHeadArray=document.getElementsByTagName("head");if(documentHeadArray[0]){var documentHead=documentHeadArray[0];var cssTag=null;var scriptTag=null;if(document.createElementNS&&documentHead.tagName=="head"){cssTag=documentHead.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml","link"));if(_ow.ie6){scriptTag=documentHead.appendChild(document.createElementNS("http://www.w3.org/1999/xhtml","script"))}}else{cssTag=documentHead.appendChild(document.createElement("link")); if(_ow.ie6){scriptTag=documentHead.appendChild(document.createElement("script"))}}cssTag.id="ow_css_tag";cssTag.rel="stylesheet";cssTag.href=_ow.wwwurl+"/btn/button_"+_ow.btn.size+".css";cssTag.type="text/css"; if(_ow.ie6){scriptTag.type="text/javascript";scriptTag.src=_ow.wwwurl+"/js/pngfix.js"}}}_ow.DOMready=(function(){var a={};a.isReady=false;a.init=function(b){if(!this.isReady){this.bindReady(b)}else{b()}};a.bindReady=function(b){if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){a.isReady=true;a.init(b)},false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){a.isReady=true;a.init(b)}})}}};return a})();_ow.getScript=function(a,b,d){this.url=a;this.seperator=(a.match(/\?/))?"&":"?";this.jsonpCallback="jsonp"+(new Date()).getTime();this.jsonp="jsonp="+this.jsonpCallback;this.cache="_="+(new Date()).getTime();this.callback=d||function(){};window[this.jsonpCallback]=function(e){b(e)};var c=this;_ow.DOMready.init(function(){c.makeScriptTag()})};_ow.getScript.prototype={makeScriptTag:function(){var c=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.setAttribute("type","text/javascript");b.src=this.url+this.seperator+this.jsonp+"&"+this.cache;var a=false;var d=this;b.onload=b.onreadystatechange=function(){if(!a&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){a=true;d.callback();c.removeChild(b)}};c.appendChild(b)}};_ow.focusTo=function(b,a){if(typeof a=="undefined"){a=b.value.length}if(b.createTextRange){if(range==0){range=b.createTextRange()}range.moveEnd("character",b.value.length);range.moveStart("character",a);setTimeout("range.select()",10)}else{if(b.setSelectionRange){b.select();b.setSelectionRange(a,b.value.length)}else{b.blur()}}};_ow.class_select=function(b){var a=document.getElementById("tag_"+b);a.style.cursor="pointer";a.style.color="#000";a.style.textDecoration="none";a.className="tag_selected"};_ow.class_deselect=function(b){var a=document.getElementById("tag_"+b);a.style.color="#309acc";a.style.textDecoration="underline";a.style.cursor="pointer";a.className="tag_deselected"};_ow.swap=function(a){var g=document.getElementById("tags").value;var e=g.replace(/^\s+|\s+$/g,"");var c=e.split(" "),h=false,d,b=a.toLowerCase();if(c[0].replace(/^\s+|\s+$/g,"")==""){c.splice(0,1)}for(d=0;d1)?f+" ":f;_ow.focusTo(document.getElementById("tags"))};_ow.getTopLeft=function(e){var j=curtop=0;var f=e.clientHeight;var h=e.clientWidth;if(e.offsetParent){do{j+=e.offsetLeft;curtop+=e.offsetTop}while(e=e.offsetParent)}var b=curtop;var d=j;var i=f+b;var c=(document.body.offsetWidth>document.body.scrollWidth)?document.body.offsetWidth:document.body.scrollWidth;var a=(document.body.offsetHeight>document.body.scrollHeight)?document.body.offsetHeight:document.body.scrollHeight;if(d>c/2){d=d-_ow.Popup.popupWidth+h}var g=_ow.Popup.popup.clientHeight||_ow.Popup.getClientHeight();if(b>a/2){i=b-g}return[i,d]};_ow.Dom=(function(){function a(c){while(c.hasChildNodes()){c.removeChild(c.firstChild)}return c}function b(d){var c;return document.getElementById(d)||(c=document.getElementsByName(d)&&c[0])}b.clearChildren=a;return b})();_ow.Event={stop:function(a){if(!a){var a=window.event}a.cancelBubble=true;if(a.preventDefault){a.preventDefault()}else{a.returnValue=false}if(a.stopPropagation){a.stopPropagation()}},stopPropagation:function(a){if(!a){var a=window.event}a.cancelBubble=true;if(a.stopPropagation){a.stopPropagation()}}};_ow.Box=function(b){var a=function(){_ow.Dom.clearChildren(_ow.Popup.popup);var c=_ow.E("div");c.appendChild(_ow.Template.genHeader(1));c.appendChild(_ow.Template.genLogo());var g=document.createElement("div");g.style.clear="both";g.style.height="0px";c.appendChild(g);var h=document.createElement("div");h.className="success";h.style.position="relative";h.style.background='url("'+_ow.wwwurl+'/onlywire_button/images/success.png") no-repeat';h.style.width="372px";h.style.height="40px";h.style.margin="25px 0 0";var d=document.createElement("span");d.style.color="#65666a";d.style.position="absolute";d.style.top="13px";d.style.left="55px";d.style.fontSize="11px";d.style.fontWeight="bold";if(typeof b=="string"){var f=document.createTextNode(b);d.appendChild(f)}else{d.appendChild(b)}h.appendChild(d);c.appendChild(h);var e=document.createElement("div");e.style.clear="both";e.style.height="0px";c.appendChild(e);_ow.Popup.popup.appendChild(c);_ow.Popup.align(_ow.button)};return{success:a}};_ow.Auth=(function(){var a={};a.authData=null;a.init=function(){var b="url="+encodeURIComponent(document.domain);if(_ow.token){b+="&token="+encodeURIComponent(_ow.token)}new _ow.getScript(_ow.wwwurl+"/widget/getWidgetData?"+b,function(c){a.authData=c;_ow.Template.init();_ow.Popup.init()})};if(window.addEventListener){a.init()}else{window.attachEvent("onload",function(){a.init()})}a.isLoggedIn=function(){if(a.authData.error){return false}else{return true}};return a})();_ow.Submit=function(a){this.obj=a};_ow.Submit.prototype._analCheck=function(c){if(c.nodeName=="INPUT"){if(c.checked){return c.value}else{return""}}var a="";var d=0;for(var b=0;b0){a+=","}a+=c[b].value;d++}}return a};_ow.Submit.prototype.bookmark=function(d){var a=this;var c=this._analCheck(d);var b=c.split(",").length;if(this.obj.tags.value=="space separated"||this.obj.tags.value==""){this.obj.tags.value="onlywire"}if(this.obj.url.value==""){alert("URL field cant be blank");return}new _ow.getScript(_ow.wwwurl+"/widget/save?title="+encodeURIComponent(this.obj.title.value)+"&url="+encodeURIComponent(this.obj.url.value)+"&tags="+this.obj.tags.value+"&private="+this.obj.priv.checked+"&c="+this.obj.notes.value+"&service="+c+"&token="+(_ow.token?encodeURIComponent(_ow.token):""),function(f){var e=_ow.E("span");e.appendChild(_ow.T("Done! We'll send you an email shortly when your bookmark has been posted."));e.style.display="block";e.style.marginLeft="-4px";e.style.marginTop="-5px";_ow.Box(e).success()})};_ow.Submit.prototype.share=function(){var a=this;var d=encodeURIComponent(_ow.Popup.fieldsToUpdate.title.value);var b=encodeURIComponent(_ow.Popup.fieldsToUpdate.url.value);if(this.obj.from.value==""){alert("From email cant be blank");return}else{var c=/^[^@]+@[^@]+.[a-z]{2,}$/i;if(this.obj.from.value.search(c)==-1){alert("Invalid e-mail address");return}}if(this.obj.to.value=="comma separated"||this.obj.to.value==""){alert("To email cant be blank");return}var e=this.obj.to.value.split(",").length;new _ow.getScript(_ow.wwwurl+"/widget/sendemail?from="+encodeURIComponent(this.obj.from.value)+"&to="+encodeURIComponent(this.obj.to.value)+"&message="+encodeURIComponent(this.obj.message.value)+"&title="+d+"&url="+b,function(f){_ow.Box("Your email has been sent.").success()})};_ow.Submit.prototype.signup=function(){var a=this;new _ow.getScript(_ow.wwwurl+"/widget/signup?subscription=free&cardnumber=&cvv=&mm=-1&yy=-1&zip=&cardname=&cardtype=&username="+this.obj.username.value+"&email="+this.obj.email.value+"&m="+this.obj.password.value+"&captcha_code="+this.obj.captcha_code.value+"&industry=Button",function(b){if(b=="Success"){a.signin({username:{value:a.obj.username.value},password:{value:a.obj.password.value}})}else{alert(b)}})};_ow.Submit.prototype.signin=function(b){var a=this;if(b){this.obj=b}new _ow.getScript(_ow.wwwurl+"/widget/login?username="+this.obj.username.value+"&m="+this.obj.password.value,function(c){if(c.response=="Success"){_ow.token=c.token;_ow.Auth.init()}else{alert(c.response)}})};_ow.Template=(function(){var a={};a.homepage=null;a.bookmark=null;a.share=null;a.init=function(){a.homepage=a.genHomepage();a.bookmark=a.genBookmark();a.share=a.genShare();a.signup=a.genSignup();a.signin=a.genSignin()};a.genTitle=function(b){var c=document.createElement("div");c.style.height="22px";c.style.color="#"+_ow.btn.textx;c.style.fontSize="13px";c.style.fontWeight="bold";c.style.padding="18px 0 0 0px";c.appendChild(document.createTextNode(b));return c};a.genRound=function(f,d,c){var g=document.createElement("div");g.style.position="relative";g.style.height="21px";g.style.width="394px";g.style.background='url("'+_ow.wwwurl+'/onlywire_button/images/round.png") no-repeat top left';g.style.fontSize="10px";g.style.marginLeft="6px";var e=document.createElement("div");e.style.position="absolute";e.style.left="10px";e.style.top="3px";e.appendChild(document.createTextNode(f));if(d){var b=document.createElement("a");b.style.position="absolute";b.style.top="3px";b.style.right="10px";b.style.color="#309acc";b.href="#";b.onclick=function(){window.open(c);return false};b.appendChild(document.createTextNode(d));g.appendChild(b)}g.appendChild(e);return g};a.genHeader=function(d){var f=document.createElement("ul");f.style.padding="6px 0";f.style.margin="19px 0 0";f.style.borderBottom="1px solid #ccc";f.style.width="358px";f.style.top="19px";f.style.left="9px";var g=3;for(var e=0,b,c;e-1){p=true}}}if(p){b="label_"+q.pk_id;h=document.createElement("div");h.style.cssText="float:left";h.style.width="200px";h.style.fontSize="10px";h.style.marginBottom="4px";d=document.createElement("label");d.setAttribute("for",b);try{var l=document.createElement("")}catch(e){var l=document.createElement("input")}l.setAttribute("id",b);l.style.verticalAlign="middle";l.style.marginRight="3px";l.type="checkbox";l.value=q.pk_id;l.checked="true";o=document.createElement("img");o.style.verticalAlign="middle";o.style.marginRight="3px";o.src=_ow.imagesPath+"/i/"+q.small_icon;if(_ow.Auth.isLoggedIn()){h.appendChild(l)}d.appendChild(o);if(_ow.Auth.isLoggedIn()){d.appendChild(document.createTextNode(q.name))}else{var n=document.createElement("a");n.style.color="#000";var g=q.post_link;n.href=_ow.wwwurl+"/bounce?t="+encodeURIComponent(g);n.setAttribute("post_link",g);if(_ow.Auth.isLoggedIn()){n.setAttribute("title","Auto submission not yet supported, coming soon!")}n.setAttribute("rel","external");n.setAttribute("target","_blank");n.style.textDecoration="underline";n.appendChild(document.createTextNode(q.name));if(!g){d.appendChild(document.createTextNode(q.name))}else{d.appendChild(n)}}h.appendChild(d);c.appendChild(h);r.elements.push(l)}}r.list=c;return r};a.genWrapper=function(){var b=document.createElement("div");b.fontSize="10px";b.color="#000";b.style.margin="10px";b.style.textAlign="center";b.style.position="relative";return b};a.genWrapContent=function(){var d=document.createElement("div");d.style.marginTop="10px";d.style.textAlign="center";d.appendChild(document.createTextNode("By signing up, you agree to the "));var c=document.createElement("a");c.style.color="#309acc";c.appendChild(document.createTextNode("Terms of service"));c.href="#";c.onclick=function(){window.open(_ow.wwwurl+"/terms");return false};var b=document.createElement("a");b.style.color="#309acc";b.href="#";b.onclick=function(){window.open(_ow.wwwurl+"/terms");return false};b.appendChild(document.createTextNode("Privacy Policy."));d.appendChild(c);d.appendChild(document.createTextNode(" and "));d.appendChild(b);return d};a.genInfo=function(d){var e=document.createElement("div");e.style.border="1px solid #ffcc00";e.style.backgroundColor="#FDED8B";e.style.color="#000";e.style.fontWeight="bold";e.style.width="192px";e.style.height="42px";e.style.fontSize="10px";e.style.position="absolute";e.style.top="10px";e.style.right="10px";var c=document.createElement("span");c.style.position="absolute";c.style.top="8px";c.style.left="8px";c.appendChild(document.createTextNode(d));var b=document.createElement("div");b.style.position="absolute";b.style.top="42px !important";b.style.top="40px";b.style.right="10px";b.style.width="8px";b.style.height="15px";b.style.background='url("'+_ow.wwwurl+'/onlywire_button/images/arrow.gif") no-repeat';e.appendChild(b);e.appendChild(c);return e};a.genTags=function(b){var e=document.createElement("div");e.style.cssText="expression(this.scrollHeight > 59? '60px' : 'auto');";e.style.overflow="auto";e.style.background="none";e.style.maxHeight="60px";for(var c=0;cLogin",type:e},{id:"username",left:"Username",value:"",type:"input"},{id:"password",left:"Password",value:"",type:"input_password"},{id:"email",left:"Email",value:"",type:"input"},{id:"0",left:"",value:"",type:b},{id:"captcha_code",left:"Enter Code",value:"",type:"input"}];var d=this.genWrapper();var f=this.genTable(g);d.appendChild(f.table);d.appendChild(this.genWrapContent());i.appendChild(d);var c=this.genButton("Sign Up",function(){var j=new _ow.Submit(f.elements);j.signup()});i.appendChild(this.genFooter(c));return i};a.genSignin=function(){var i=_ow.E("div");i.appendChild(this.genHeader(0));i.appendChild(this.genLogo());i.appendChild(this.genTitle("Login"));var e=document.createElement("span");var h=document.createElement("a");h.style.color="#309acc";h.href="#";h.appendChild(document.createTextNode("Sign up"));h.onclick=function(){_ow.Popup.loadSignup();return false};var d=document.createElement("a");d.style.color="#309acc";d.href="#";d.appendChild(document.createTextNode("Forgot password?"));d.onclick=function(){window.open(_ow.wwwurl+"/forgotpassword");return false};e.appendChild(document.createTextNode("New to OnlyWire? "));e.appendChild(h);var g=[{id:"0",left:"",value:"",type:e},{id:"username",left:"Username",value:"",type:"input"},{id:"password",left:"Password",value:"",type:"input_password"},{id:"0",left:"",value:"Forgot password?",type:d}];var c=this.genWrapper();var f=this.genTable(g);c.appendChild(f.table);i.appendChild(c);var b=this.genButton("Login",function(){var j=new _ow.Submit(f.elements);j.signin()});i.appendChild(this.genFooter(b));return i};return a})();_ow.Popup=(function(){var a={};a.popup=null;a.currentTag=null;a.fieldsToUpdate={};a.popupHeight=200;a.popupWidth=432;a.init=function(){if(!this.popup){a.popup=a.genPopup();document.body.appendChild(a.popup);document.onclick=function(){_ow.Popup.hide()}}if(_ow.Auth.isLoggedIn()){this.updateFields();this.loadBookmark()}else{this.loadHomepage()}};a.show=function(b){if(!this.popup){return}var c=_ow.getTopLeft(b);this.popup.style.display="block";this.popup.style.top=c[0]+"px";this.popup.style.left=c[1]+"px";this.updateFields()};a.align=function(b){if(!this.popup){return}if(this.popup.style.display=="none"){return}var c=_ow.getTopLeft(b);this.popup.style.top=c[0]+"px";this.popup.style.left=c[1]+"px"};a.hide=function(b){this.popup.style.display="none"};a.updateFields=function(){if(!this.currentTag){return}var f=this.currentTag.getAttribute("title")||window.document.title;var c=this.currentTag.getAttribute("url")||window.location.href;var b=this.currentTag.getAttribute("tags")||"space separated";this.fieldsToUpdate.title.value=f;this.fieldsToUpdate.url.value=c;this.fieldsToUpdate.tags.value=b;for(var d=0,e;d