function getButtonSpecs(){return{size:'s',type:'r',outerWidth:85,corners:4,padding:1,logoHeight:15,logoWidth:12,fontSize:12,lineHeight:12,mouseover:'t',showads:'t',logo:'190C18',text:'000000',background:'FFFFFF',border:'CCCCCC',fontFamily:'Arial, Helvetica, sans-serif',logox:'0095C8',textx:'000000',backgroundx:'F9F9F9',links:'0000FF',active:'FFFFFF',activebg:'0095C8',inactive:'FFFFFF',inactivebg:'CCCCCC',services:[1,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,122,3,33,34,36,4,43,44,46,47,48,49,5,50,51,]};}var isIE6="",swwwurl="https://onlywire.com",wwwurl="http://onlywire.com";if(typeof _ow=="undefined"){_ow={};_ow.btn=getButtonSpecs();_ow.ie6=(isIE6.length>0);_ow.wwwurl=swwwurl;_ow.adurl="http://onlywire.com/";_ow.imagesPath=swwwurl;_ow.token=null;_ow.E=function(a){return document.createElement(a)};_ow.T=function(a){return document.createTextNode(a)};_ow.H=function(b){var a=document.createElement("span");a.innerHTML=b;return a.children[0]};_ow.isArray=function(a){return !(!a||(!a.length||a.length==0)||typeof a!=="object"||!a.constructor||a.nodeType||a.item)};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()});if(typeof(_bookmarklet)!="undefined"){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=_ow.Popup.fieldsToUpdate.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;d<c.length;d++){if(c[d].toLowerCase()==b){c.splice(d,1);_ow.class_deselect(a);h=true;d-=1}}if(!h){c.push(a);_ow.class_select(a)}var f=c.join(" ");_ow.Popup.fieldsToUpdate.tags.value=(f.length>1)?f+" ":f};_ow.getTopLeft=function(e){function j(){var q=0,p=0;if(typeof(window.pageYOffset)=="number"){p=window.pageYOffset;q=window.pageXOffset}else{if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){p=document.body.scrollTop;q=document.body.scrollLeft}else{if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){p=document.documentElement.scrollTop;q=document.documentElement.scrollLeft}}}return[q,p]}function f(){var q=0,p=0;if(typeof(window.innerWidth)=="number"){q=window.innerWidth;p=window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){q=document.documentElement.clientWidth;p=document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){q=document.body.clientWidth;p=document.body.clientHeight}}}return[q,p]}var o=curtop=0;var h=e.clientHeight;var n=e.clientWidth;if(e.offsetParent){do{o+=e.offsetLeft;curtop+=e.offsetTop}while(e=e.offsetParent)}var c=curtop;var d=o;var m=h+c;var l=f();var b=l[0];var a=l[1];if(d>b/2){d=d-_ow.Popup.popupWidth+n}var g=j();var i=c-g[1];var k=_ow.Popup.popup.clientHeight||_ow.Popup.getClientHeight();if(i>a/2&&(c>k)){m=c-k}return[m,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(2));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.Popup.currentButton)};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(typeof(_bookmarklet)!="undefined"){a.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}};a.logout=function(){new _ow.getScript(_ow.wwwurl+"/widget/logout.php",function(){},function(){_ow.Auth.init()})};return a})();_ow.Submit=function(b,a){this.obj=b};_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;b<c.length;b++){if(c[b].checked){if(d>0){a+=","}a+=c[b].value;d++}}return a};_ow.Submit.prototype.form2obj=function(f){var e={};if(typeof(f)=="string"){f=document.getElementById(f)}if(f){for(var b=0;b<f.elements.length;b++){var d=f.elements[b];if(d.name){var c=undefined;if((d.tagName.toUpperCase()=="INPUT"&&d.type.match(/^text|hidden|password$/i))||d.tagName.toUpperCase()=="TEXTAREA"||(d.type.match(/^CHECKBOX|RADIO$/i)&&d.checked)){c=d.value.length>0?d.value:undefined}else{if(d.tagName.toUpperCase()=="SELECT"){if(d.multiple){var c=[];for(var a=0;a<d.options.length;a++){if(d.options[a].selected){c.push(d.options[a].value)}}if(c.length==0){c=undefined}}else{c=d.options[d.selectedIndex].value}}}if(c!=undefined){if(e.hasOwnProperty(d.name)){if(e[d.name] instanceof Array){e[d.name]=e[d.name].concat(c)}else{e[d.name]=[].concat(e[d.name],c)}}else{e[d.name]=d.value}}}}}return e};_ow.Submit.prototype.obj2query=function(d,a,c){if(typeof d!="object"){return""}if(arguments.length==1){a=/\.php$/.test(document.location.href)}var g="";for(var f in d){if(d.hasOwnProperty(f)){var e=c?c+"."+f:f;if(d[f] instanceof Array){for(var b=0;b<d[f].length;b++){if(typeof d[f][b]=="object"){g+="&"+obj2query(d[f][b],a,e)}else{g+="&"+encodeURIComponent(e)+(a?"[]":"")+"="+encodeURIComponent(d[f][b])}}}else{if(d[f] instanceof Date){g+="&"+encodeURIComponent(e)+"="+d[f].getTime()}else{if(d[f] instanceof Object){if(d.toString&&d.toString!==Object.prototype.toString){g+="&"+encodeURIComponent(e)+"="+encodeURIComponent(d[f].toString())}else{g+="&"+obj2query(d[f],a,e)}}else{g+="&"+encodeURIComponent(e)+"="+encodeURIComponent(d[f])}}}}}return g.replace(/^&/,"")};_ow.Submit.prototype.bookmark=function(a){var p=this;var f=this._analCheck(a);var l=f.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}if(document.getElementById("caldd").selectedIndex==1&&(this.obj.cal.value=="null"||this.obj.cal.value==""||(!this.obj.cal.value))){alert("Select time for timely submission");return}if(this.obj.cal.value!=""&&this.obj.cal.value!="null"){var q=this.obj.cal.value.split(" ");var x=q[0].split("-");var b=x[2];var k=x[1];var j=x[0]-1;var B=q[1].split(":");var h=B[0];var i=B[1].substr(0,2);var m=q[1].substring(5);if(m=="PM"&&h<12){h=parseInt(h)+12}if(m=="AM"&&h>=12){h=parseInt(h)-12}var z=new Date(b,j,k,h,i);var o=new Date();var v=o.getTime();var u=z.getTime();if(v>u){alert("Selected time should be current or in the future");return}var w=new Date(o.getFullYear(),0,1,0,0,0,0);var t=new Date(o.getFullYear(),6,1,0,0,0,0);var y=w.toGMTString();var s=new Date(y.substring(0,y.lastIndexOf(" ")));var y=t.toGMTString();var n=new Date(y.substring(0,y.lastIndexOf(" ")));var A=(w-s)/(1000*60*60);var e=(t-n)/(1000*60*60);var c;if(e==A){c=A}else{c=A}var r=(z.toGMTString())}else{if(this.obj.cal.value=="null"||this.obj.cal.value==""){var r="";var c=""}}var C=document.getElementById("shortener").value;var g=_ow.wwwurl+"/widget/save?title="+encodeURIComponent(this.obj.title.value)+"&url="+encodeURIComponent(this.obj.url.value)+"&shortener="+C+"&tags="+this.obj.tags.value+"&cal="+r+"&std="+c+"&c="+encodeURIComponent(this.obj.notes.value)+"&ent_userid="+_ow.Auth.authData.ent_userid+"&cat="+this.obj.category.value+"&service="+encodeURIComponent(f)+"&token="+(_ow.token?encodeURIComponent(_ow.token):"");new _ow.getScript(g,function(){var d=_ow.E("span");if(_ow.Auth.authData.user_suspended=="true"){d.appendChild(_ow.H("<span>Your request cannot be processed at this time. Your account has been suspended</span>"))}else{d.appendChild(_ow.H('<span>Your submission will be processed by the <strong>OnlyWire Submitter</strong>. <a target="_blank" href="'+wwwurl+'/download">Click Here to Download</a></span>'))}d.style.display="block";d.style.marginLeft="-4px";d.style.marginTop="-5px";_ow.Box(d).success()})};_ow.Submit.prototype.status=function(){var a=this.form2obj(this.obj);if(!a.status){alert("Please enter a status.");return}if(!a["service[]"]){alert("Please select at least 1 service.");return}var c=a["service[]"];if(_ow.isArray(c)){c=c.join(",")}var d=_ow.Auth.authData.ent_userid;var e=this.obj2query({services:c,status:a.status,ent_userid:d});var b=_ow.wwwurl+"/widget/updatestatus?"+e;new _ow.getScript(b,function(){},function(){var f=_ow.E("span");if(_ow.Auth.authData.user_suspended=="true"){f.appendChild(_ow.H("<span>Your request cannot be processed. Your account has been suspended.</span>"))}else{f.appendChild(_ow.H('<span>Your submission will be processed by the <strong>OnlyWire Submitter</strong>. <a target="_blank" href="'+wwwurl+'/download">Click Here to Download</a></span>'))}f.style.display="block";f.style.marginLeft="-4px";f.style.marginTop="-5px";_ow.Box(f).success()})};_ow.Submit.prototype.mylogins=function(){var a=this.obj.getElementsByTagName("input");for(var d=0;d<a.length;d++){if(a[d].value=="username"||a[d].value=="password"){a[d].value=""}}var b=this.form2obj(this.obj);var f=this.obj2query(b);if(!f){alert("Please enter your login info.");return}var g=_ow.Auth.authData.username;var c=_ow.wwwurl+"/widget/save_services?do=update_bookmark_logins&u="+g+"&"+f;new _ow.getScript(c,function(){});var e=_ow.E("span");e.appendChild(_ow.T("Your login information has been saved"));e.style.display="block";e.style.marginLeft="-4px";e.style.marginTop="-5px";_ow.Box(e).success();setTimeout(function(){_ow.Auth.init()},3000)};_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"){_ow.Box("Your account has been created, please login.").success();_ow.Popup.loadSignin()}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.myloginspage=a.genMyLoginsPage();a.homepage=a.genHomepage();a.bookmark=a.genBookmark();a.share=a.genShare();a.signup=a.genSignup();a.signin=a.genSignin();a.status=a.genStatus();a.tags=a.genTags()};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.marginBottom="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(){_ow.Popup.loadMyLoginsPage();return false};b.appendChild(document.createTextNode(d));g.appendChild(b)}g.appendChild(e);return g};a.genHeader=function(h){var l=document.createElement("ul");l.style.padding="6px 0";l.style.margin="19px 0 0";l.style.borderBottom="1px solid #ccc";l.style.width="358px";l.style.top="19px";l.style.left="9px";var j=4;for(var f=0,o,n;f<j;f++){o=document.createElement("li");o.style.display="inline";o.style.listStyle="none";o.style.padding="0px";o.style.margin="6px 10px 0 0";o.style.cursor="pointer";n=document.createElement("a");n.style.padding="7px 7px";n.style.margin="0";n.style.border="1px solid #ccc";n.style.borderBottom="none";n.style.backgroundColor="#"+_ow.btn.inactivebg;n.style.textDecoration="none";n.style.outline="none";n.style.color="#"+_ow.btn.inactive;n.style.fontWeight="bold";n.style.lineHeight="16px";if(f==0){if(_ow.Auth.isLoggedIn()){n.onclick=function(i){_ow.Event.stop(i);_ow.Popup.loadBookmark()}}else{n.onclick=function(i){_ow.Event.stop(i);_ow.Popup.loadHomepage()}}n.appendChild(document.createTextNode("Bookmark"))}else{if(f==1){n.onclick=function(i){_ow.Event.stop(i);if(_ow.Auth.isLoggedIn()){_ow.Popup.loadStatus()}else{_ow.Popup.loadSignin()}};n.appendChild(document.createTextNode("Status"))}else{if(f==2){n.onclick=function(i){_ow.Event.stop(i);if(_ow.Auth.isLoggedIn()){_ow.Popup.loadShare()}else{_ow.Popup.loadSignin()}};n.appendChild(document.createTextNode("Email"))}else{if(f==3){n.target="_blank";if(_ow.Auth.isLoggedIn()){n.href=_ow.wwwurl+"/history";n.appendChild(document.createTextNode("My Account"))}else{n.href=_ow.wwwurl;n.appendChild(document.createTextNode("What's This?"))}}}}}if(h==f){n.style.backgroundColor="#"+_ow.btn.activebg;n.style.color="#"+_ow.btn.active}o.appendChild(n);l.appendChild(o)}var c=_ow.H('<a style="color:#'+_ow.btn.active+";text-decoration:none;background:#"+_ow.btn.activebg+';width:14px;height:14px;display:block;position: absolute;top:0;right:0;" href="#"><div style="position:absolute;left:3px; top:0px;">X</div></a>');c.onclick=function(i){_ow.Event.stop(i);_ow.Popup.hide()};l.appendChild(c);if(_ow.Auth.isLoggedIn()){var d=_ow.H('<div style="color:#309ACC;position: absolute;top:0;right:27px;"></div>');if(_ow.Auth.authData.entUsers==0){d.appendChild(_ow.T(_ow.Auth.authData.username))}else{var m=_ow.Auth.authData.entUsers;var g=document.createElement("select");g.style.fontSize="11px";g.setAttribute("id","entSelect");for(var e=0;e<m.length;e++){if(_ow.Auth.authData.ent_userid==0){if(m[e].username==_ow.Auth.authData.username){var b=document.createElement("option");b.setAttribute("value",m[e].pk_id);b.setAttribute("selected","selected");b.appendChild(document.createTextNode(m[e].username+" ("+m[e].last_name+", "+m[e].first_name+")"));g.appendChild(b)}else{var b=document.createElement("option");b.setAttribute("value",m[e].pk_id);b.appendChild(document.createTextNode(m[e].username+" ("+m[e].last_name+", "+m[e].first_name+")"));g.appendChild(b)}}else{if(m[e].pk_id==_ow.Auth.authData.ent_userid){var b=document.createElement("option");b.setAttribute("value",m[e].pk_id);b.setAttribute("selected","selected");b.appendChild(document.createTextNode(m[e].username+" ("+m[e].last_name+", "+m[e].first_name+")"));g.appendChild(b)}else{var b=document.createElement("option");b.setAttribute("value",m[e].pk_id);b.appendChild(document.createTextNode(m[e].username+" ("+m[e].last_name+", "+m[e].first_name+")"));g.appendChild(b)}}}g.onchange=function(k){var i=this.options[this.selectedIndex].value;var q="url="+encodeURIComponent(document.domain)+"&entId="+i;if(_ow.token){q+="&token="+encodeURIComponent(_ow.token)}new _ow.getScript(_ow.wwwurl+"/widget/getWidgetData?"+q,function(t){_ow.Auth.authData=t;if(_ow.Auth.authData.services){_ow.Template.init();_ow.Popup.init()}else{var s=_ow.E("span");s.appendChild(_ow.T("The user selected has no services set up."));s.style.display="block";s.style.marginLeft="-4px";s.style.marginTop="-5px";_ow.Box(s).success();for(var r=0;r<g.length;r++){if(g.options[r].value==_ow.Auth.authData.uid){g.options[r].selected=true}}}})};d.appendChild(g)}var p=_ow.H('<a style="color:#309ACC;" href="#">logout</a>');p.onclick=function(i){_ow.Event.stop(i);_ow.Auth.logout()};l.appendChild(d)}return l};a.genLogo=function(){var b=document.createElement("div");b.className="ow_rounded_logo";b.style.width="55px";b.style.height="55px";b.style.position="absolute";b.style.top="19px";b.style.right="9px";if(_ow.ie6){b.style.background="#"+_ow.btn.logox+' url("'+_ow.wwwurl+'/images/onlywire_logo_small_square.gif") no-repeat center'}else{b.style.background="#"+_ow.btn.logox+' url("'+_ow.wwwurl+'/images/onlywire_logo_small_square.png") no-repeat center'}return b};a.genBookList=function(n,d){if(!n){return}var s={};s.elements=[];var c=document.createElement("div");c.style.margin="0px 0px 10px 0px";c.style.overflow="auto";c.style.position="relative";c.style.maxHeight="200px";c.style.backgroundColor="white";for(var l=0,r,k,e,p,b;l<n.length;l++){r=n[l];var q=false;if(_ow.Auth.isLoggedIn()){q=true}else{var t=r.pk_id*1;if(_ow.btn.services.length==0){q=true}else{if(!Array.indexOf){for(var g=0;g<_ow.btn.services.length;g++){if(_ow.btn.services[g]==t){q=true}}}else{if(_ow.btn.services.indexOf(t)>-1){q=true}}}}if(q){b="label_"+r.pk_id;k=document.createElement("div");k.style.cssText="float:left";k.style.width="200px";k.style.fontSize="10px";k.style.marginBottom="4px";e=document.createElement("label");e.setAttribute("for",b);try{var m=document.createElement("<input type='checkbox' checked='checked'>")}catch(f){var m=document.createElement("input")}m.setAttribute("id",b);m.style.verticalAlign="middle";m.style.marginRight="3px";m.type="checkbox";if(d){if(r.name=="Facebook Group"||r.name=="LinkedIn Group"){m.value=r.name_clean+"_"+r.group_name}else{if(r.name=="Facebook Page"){m.value=r.name_clean+"_"+r.page_name}else{m.value=r.name_clean}}m.setAttribute("name","service[]")}else{if(r.name=="Facebook Group"||r.name=="LinkedIn Group"){m.value=r.pk_id+"_"+r.group_name}else{if(r.name=="Facebook Page"){m.value=r.pk_id+"_"+r.page_name}else{m.value=r.pk_id}}}m.checked="true";p=document.createElement("img");p.style.verticalAlign="middle";p.style.marginRight="3px";p.src=_ow.imagesPath+"/i/"+r.small_icon;if(_ow.Auth.isLoggedIn()){k.appendChild(m)}e.appendChild(p);if(_ow.Auth.isLoggedIn()){if(r.name=="Facebook Group"||r.name=="LinkedIn Group"){e.appendChild(document.createTextNode(r.group_name))}else{if(r.name=="Facebook Page"){e.appendChild(document.createTextNode(r.page_name))}else{e.appendChild(document.createTextNode(r.name))}}}else{var o=document.createElement("a");o.style.color="#000";var h=r.post_link;o.href=_ow.wwwurl+"/bounce?t="+encodeURIComponent(h);o.setAttribute("post_link",h);if(_ow.Auth.isLoggedIn()){o.setAttribute("title","Auto submission not yet supported, coming soon!")}o.setAttribute("rel","external");o.setAttribute("target","_blank");o.style.textDecoration="underline";o.appendChild(document.createTextNode(r.name));if(!h){e.appendChild(document.createTextNode(r.name))}else{e.appendChild(o)}}k.appendChild(e);c.appendChild(k);s.elements.push(m)}}s.list=c;return s};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="52px";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.style.right="8px";c.appendChild(document.createTextNode(d));var b=document.createElement("div");b.style.position="absolute";b.style.top="52px";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(){var h=_ow.E("div");var d=_ow.Auth.authData.tags||{};h.appendChild(this.genHeader(0));h.appendChild(this.genLogo());var g=h.appendChild(this.genTitle("Select Tags"));var b=_ow.E("div");b.style.overflow="auto";b.style.background="none";b.style.maxHeight="200px";for(var e=0;e<d.length;e++){var f=document.createElement("span");f.appendChild(document.createTextNode(d[e].tag));f.style.color="#309acc";f.style.textDecoration="underline";f.style.cursor="pointer";f.id="tag_"+d[e].tag;f.onclick=function(){var i=_ow.Popup.fieldsToUpdate.tags;if(i.value=="space separated"){i.value=""}_ow.swap(this.id.replace(/tag_/,""))};b.appendChild(f);b.appendChild(document.createTextNode(" "))}h.appendChild(b);var c=this.genButton("Done",function(i){_ow.Event.stop(i);_ow.Popup.loadBookmark()});h.appendChild(this.genFooter(c));return h};a.genHomepage=function(){var j=_ow.E("div");j.appendChild(this.genHeader(0));j.appendChild(this.genLogo());var e=j.appendChild(this.genTitle("Bookmark Content"));var h=this.genBookList(_ow.Auth.authData.services||{});var d=h.list.getElementsByTagName("a");for(var c=0,b=[];c<d.length;c++){b.push(d[c])}_ow.Popup.fieldsToUpdate.services=b;j.appendChild(h.list);if(_ow.Auth.isLoggedIn()){j.appendChild(this.selectAllNone(h.list))}var g=this.genButton("Create Your Account",function(i){_ow.Event.stop(i);_ow.Popup.loadSignup()});var f=this.genButton("Login",function(i){_ow.Event.stop(i);_ow.Popup.loadSignin()});j.appendChild(this.genFooter(g,f));return j};a.getTheHeight=function(c){var b;var d=document.createElement("div");d.style.width=_ow.Popup.popupWidth;d.appendChild(c);document.body.appendChild(d);b=d.clientHeight;document.body.removeChild(d);return b};a.genAd=function(d){var c=document.createElement("div");c.style.position="relative";c.style.marginTop="25px";c.style.marginLeft="-10px";c.style.width="434px";c.style.height="88px";var b=document.createElement("img");b.src=_ow.wwwurl+"/images/ads/submitter.jpg";b.style.cursor="pointer";b.onclick=function(){window.open(_ow.adurl,"popUpWindow","")};c.appendChild(b);d.style.height="130px";d.appendChild(c)};a.genButton=function(c,d){var b=document.createElement("button");b.appendChild(document.createTextNode(c));b.onclick=d;return b};a.genFooter=function(b,d){var e=document.createElement("div");e.style.height="30px";e.style.textAlign="center";e.style.margin="10px";if(d){var c=document.createElement("span");c.style.color="black";c.style.display="block";c.style.fontWeight="bold";c.appendChild(document.createTextNode("...or create an account to post to MULTIPLE SITES"));e.appendChild(c);e.style.height="50px"}b.style.marginTop="5px";b.style.marginLeft="5px";e.appendChild(b);if(d){d.style.marginTop="5px";d.style.marginLeft="5px";e.appendChild(d)}if(_ow.Auth.authData.sub_type=="free"){}return e};a.genTable=function(k){if(!k){return}var j={};j.elements={};var q=document.createElement("table");var I=document.createElement("tbody");q.style.fontSize="10px";q.style.width="380px";q.style.margin="auto";q.style.textAlign="left";for(var N=0;N<k.length;N++){var M=k[N];var Q=document.createElement("tr");var u=document.createElement("td");u.style.textAlign="right";u.style.width="100px";u.appendChild(document.createTextNode(M.left));var t=document.createElement("td");var O=document.createElement("td");if(M.type=="input"||M.type=="input_password"||M.type=="input_checkbox"){var b=document.createElement("input");b.style.border="1px solid #6eafd7";b.style.padding="0 3px";b.style.fontSize="10px";b.style.width="200px";if(M.type=="input_password"){b.type="password"}else{if(M.type=="input_checkbox"){b.type="checkbox";b.style.width="auto";b.style.border="0px"}else{b.type="text";if(M.id=="url"){var L='{"parsetags": "explicit"}';var p=document.createElement("script");p.type="text/javascript";p.src="https://apis.google.com/js/plusone.js";var f=navigator.appName;if(f=="Microsoft Internet Explorer"){p.text=L}else{p.appendChild(document.createTextNode(L))}document.getElementsByTagName("head").item(0).appendChild(p);var E=document.createElement("meta");E.setAttribute("property","og:title");E.setAttribute("content","Onlywire&reg;");var C=document.createElement("meta");C.setAttribute("property","og:type");C.setAttribute("content","product");var B=document.createElement("meta");B.setAttribute("property","og:url");B.setAttribute("content","https://www.onlywire.com/");var A=document.createElement("meta");A.setAttribute("property","og:image");A.setAttribute("content","http://onlywire.com/images/MainIllustrationz.jpg");var y=document.createElement("meta");y.setAttribute("property","og:site_name");y.setAttribute("content","Automated Submission to Social Media Sites | Onlywire");var x=document.createElement("meta");x.setAttribute("property","fb:app_id");x.setAttribute("content","115680611817934");document.getElementsByTagName("head").item(0).appendChild(E);document.getElementsByTagName("head").item(0).appendChild(C);document.getElementsByTagName("head").item(0).appendChild(B);document.getElementsByTagName("head").item(0).appendChild(A);document.getElementsByTagName("head").item(0).appendChild(y);document.getElementsByTagName("head").item(0).appendChild(x);var m=document.createElement("script");m.type="text/javascript";m.src="https://connect.facebook.net/en_US/all.js#appId=115680611817934&amp;xfbml=1";document.getElementsByTagName("head").item(0).appendChild(m);var G=document.createElement("fb:like");b.onchange=function(){gapi.plusone.render("onlywire_gb",{href:this.value,size:"small"});var z=document.getElementById("onlywireflike");var i=document.getElementsByTagName("fb:like");if(i[0]){z.removeChild(i[0])}var R=document.createElement("fb:like");R.setAttribute("href",this.value);R.setAttribute("layout","button_count");R.setAttribute("show_faces","false");R.setAttribute("action","like");R.setAttribute("font","arial");R.setAttribute("colorscheme","light");z.appendChild(R);if(typeof FB!="undefined"){FB.XFBML.parse(document.getElementById("onlywireflike"))}};b.onfocus=function(){gapi.plusone.render("onlywire_gb",{href:this.value,size:"small"});var z=document.getElementById("onlywireflike");var i=document.getElementsByTagName("fb:like");if(i[0]){z.removeChild(i[0])}var R=document.createElement("fb:like");R.setAttribute("href",this.value);R.setAttribute("layout","button_count");R.setAttribute("show_faces","false");R.setAttribute("action","like");R.setAttribute("font","arial");R.setAttribute("colorscheme","light");z.appendChild(R);if(typeof FB!="undefined"){FB.XFBML.parse(document.getElementById("onlywireflike"))}};b.onmouseout=function(){gapi.plusone.render("onlywire_gb",{href:this.value,size:"small"});var z=document.getElementById("onlywireflike");var i=document.getElementsByTagName("fb:like");if(i[0]){z.removeChild(i[0])}var R=document.createElement("fb:like");R.setAttribute("href",this.value);R.setAttribute("layout","button_count");R.setAttribute("show_faces","false");R.setAttribute("action","like");R.setAttribute("font","arial");R.setAttribute("colorscheme","light");z.appendChild(R);if(typeof FB!="undefined"){FB.XFBML.parse(document.getElementById("onlywireflike"))}}}}}if(M.id=="cal"){b.name="cal";b.id="cal";b.disabled=true;b.style.display="none";b.style.width="121px";O.noWrap=true;var P=document.createElement("script");P.type="text/javascript";P.src=_ow.wwwurl+"/js/datetimepicker_css_compressed.js";document.getElementsByTagName("head").item(0).appendChild(P);var v=document.createElement("select");v.id="caldd";var K=document.createElement("option");var F=document.createElement("option");K.setAttribute("selected","selected");K.appendChild(document.createTextNode("Now"));F.appendChild(document.createTextNode("Later"));v.appendChild(K);v.appendChild(F);v.style.fontSize="10px";v.style.padding="0 3px";v.style.width="60px";v.onchange=function(){if(this.selectedIndex==1){document.getElementById("calimg").style.display="inline"}if(this.selectedIndex==0){document.getElementById("calimg").style.display="none";document.getElementById("cal").style.display="none"}};t.appendChild(v);var e=document.createElement("img");e.id="calimg";e.style.padding="0px 3px";e.setAttribute("style","padding:0px 3px");e.style.align="center";e.src=_ow.wwwurl+"/js/images/cal.gif";e.style.display="none";e.style.width="13px";e.setAttribute("onclick",'NewCssCal("cal","MMddyyyy","dropdown",true,12, false);document.getElementById("cal").style.display="inline";');t.appendChild(e)}b.value=M.value;b.onclick=function(){if(this.value=="comma separated"||this.value=="space separated"){this.value=""}};j.elements[M.id]=b;t.appendChild(b)}else{if(M.type=="select"){var D=new Array();D[0]="Business";D[1]="Entertainment";D[2]="Lifestyle";D[3]="Offbeat/Fun";D[4]="Science";D[5]="Sports";D[6]="Technology";var w=document.createElement("select");for(var H=0;H<7;H++){var n=document.createElement("option");n.setAttribute("value",H);if(H==0){n.setAttribute("selected","selected")}n.appendChild(document.createTextNode(D[H]));w.appendChild(n)}w.value=M.value;w.style.padding="0 3px";w.style.fontSize="10px";t.appendChild(w);j.elements[M.id]=w}else{if(M.type=="textarea"){var h=document.createElement("textarea");h.style.border="1px solid #6eafd7";h.style.padding="0 3px";h.style.fontSize="10px";h.style.width="200px";h.style.height="70px";u.style.verticalAlign="top";t.appendChild(h);j.elements[M.id]=h}else{if(M.id=="urlstyle"){var s=document.createElement("span");s.style.fontSize="8px";s.style.color="#666666";var g=document.createElement("span");var r=document.createElement("span");g.id="onlywire_gb";g.style.position="relative";g.style.top="1px";r.id="onlywireflike";r.style.position="relative";r.style.top="1px";var o=document.createElement("input");o.type="checkbox";o.id="shortener";o.name="shortener";o.onclick=function(){if(this.checked){this.value="1"}else{this.value="0"}};var J=document.createElement("label");J.style.top="1px";var c="   ";var d=document.createTextNode(c);J.appendChild(d);var l=document.createElement("div");l.id="fb-root";s.appendChild(o);s.appendChild(J);s.appendChild(g);s.appendChild(r);s.appendChild(l);t.appendChild(s);j.elements[M.id]=s}else{t.appendChild(M.type);j.elements[M.id]=M.type}}}}Q.appendChild(u);Q.appendChild(t);Q.appendChild(O);I.appendChild(Q)}q.appendChild(I);j.table=q;return j};a.genLogins=function(m){var b=_ow.H('<form style="height: 300px; overflow: auto;width: 100%;"></form>');var g;for(var f=0;f<m.length;f++){var c=m[f].pk_id;var e=false,l=false;for(var j=0;j<_ow.Auth.authData.services.length;j++){var d=_ow.Auth.authData.services[j];if(d.pk_id==c){e=d.username;l=d.password;break}}g='<div style="float: left;height:85px;width:200px;overflow:hidden;text-align: center;">';g+='<div style="margin-left:40px;text-align:left;margin-top:5px; margin-bottom:5px;"><img src="'+_ow.imagesPath+"/i/"+m[f].small_icon+'" style="margin-right: 5px;vertical-align: middle;" />'+m[f].name+"</div>";if(c!=101){g+='<input name="'+m[f].pk_id+'|username" type="text" value="'+(e||"username")+'" style="font-size: 11px;border:1px solid #BDBDA9;color:#999999;margin-bottom:2px;"/><br>';g+='<input name="'+m[f].pk_id+'|password" type="text" value="'+(l||"password")+'" style="font-size: 11px;border:1px solid #BDBDA9;color:#999999;"/>'}else{g+='<a href="'+wwwurl+'/services">Authorize<br/>Change<br/>Remove</a>'}g+="</div>";b.appendChild(_ow.H(g))}var h=b.getElementsByTagName("input");for(var k=0;k<h.length;k++){h[k].onclick=function(i){if(this.value=="password"||this.value=="username"){this.value=""}}}return b};a.selectAllNone=function(b){var c="Select None";var e="Select All";var d=_ow.H('<a href="#" style="color:#309ACC;display:block;margin-bottom:10px;text-align:center;">'+c+"</a>");d.onclick=function(h){var f=b.getElementsByTagName("input");if(this.innerHTML==c){for(var g=0;g<f.length;g++){f[g].checked=false}this.innerHTML=e}else{if(this.innerHTML==e){for(var g=0;g<f.length;g++){f[g].checked=true}this.innerHTML=c}}_ow.Event.stop(h)};return d};a.genMyLoginsPage=function(){var e=_ow.E("div");e.appendChild(this.genHeader(0));e.appendChild(this.genLogo());var d=_ow.H("<br/><br/>");var b=_ow.H("<br/><br/>");e.appendChild(d);var c=document.createElement("a");c.style.position="absolute";c.style.left="240px";c.style.color="#309acc";c.href="#";c.onclick=function(){window.open(_ow.wwwurl+"/services");return false};c.appendChild(document.createTextNode("Set up services"));e.appendChild(c);e.appendChild(b);return e};a.genBookmark=function(){if(_ow.Auth.authData.services==false){return a.myloginspage}else{var b=_ow.E("div");b.appendChild(this.genHeader(0));b.appendChild(this.genLogo());var j=b.appendChild(this.genTitle("Bookmark Content"));var c=document.createElement("a");c.style.position="absolute";c.style.top="3px";c.style.right="10px";c.style.color="#309acc";c.href="#";c.onclick=function(){if(_ow.Auth.authData.ent_username){window.open(_ow.wwwurl+"/services?u="+_ow.Auth.authData.ent_username)}else{window.open(_ow.wwwurl+"/services?u="+_ow.Auth.authData.username)}return false};c.appendChild(document.createTextNode("Set up bookmark services"));var h=document.createElement("div");h.style.position="relative";h.style.height="21px";h.style.width="394px";h.style.background='url("'+_ow.wwwurl+'/onlywire_button/images/round.png") no-repeat top left';h.style.fontSize="10px";h.style.marginBottom="10px";h.style.marginLeft="6px";var f=document.createElement("div");f.style.position="absolute";f.style.left="10px";f.style.top="3px";f.appendChild(document.createTextNode("Post this page to all these services: "));h.appendChild(c);h.appendChild(f);var m=b.appendChild(h);var e=this.genBookList(_ow.Auth.authData.services);b.appendChild(e.list);b.appendChild(this.selectAllNone(e.list));b.appendChild(this.genRound("Description"));var l=_ow.H('<a style="color:#309ACC;" href="#">My Tags</a>');l.onclick=function(n){_ow.Event.stop(n);_ow.Popup.loadTags()};var i=[{id:"title",left:"Title",value:"",type:"input"},{id:"url",left:"URL",value:"",type:"input"},{id:"urlstyle",left:"URL Shortener",value:"",type:"span"},{id:"tags",left:"Tags",value:"",type:"input"},{id:"0",left:"",value:"",type:l},{id:"notes",left:"Notes",value:"",type:"textarea"},{id:"cal",left:"Post",value:" ",type:"input"},{id:"category",left:"Category",value:"",type:"select"}];var d=this.genWrapper();var k=this.genTable(i);_ow.Popup.fieldsToUpdate.title=k.elements.title;_ow.Popup.fieldsToUpdate.url=k.elements.url;_ow.Popup.fieldsToUpdate.urlstyle=k.elements.url;_ow.Popup.fieldsToUpdate.tags=k.elements.tags;_ow.Popup.fieldsToUpdate.cal=k.elements.cal;_ow.Popup.fieldsToUpdate.category=k.elements.category;d.appendChild(k.table);b.appendChild(d);k.elements.tags.id="tags";var g=this.genButton("Post Bookmark",function(o){_ow.Event.stop(o);var n=new _ow.Submit(k.elements);n.bookmark(e.elements)});b.appendChild(this.genFooter(g))}return b};a.genStatus=function(){if(!_ow.Auth.isLoggedIn()){return a.signin}if(_ow.Auth.authData.status_services==false){return a.myloginspage}var i=_ow.E("div");i.appendChild(this.genHeader(1));i.appendChild(this.genLogo());i.appendChild(this.genTitle("Post Status"));var e=document.createElement("a");e.style.position="absolute";e.style.top="3px";e.style.right="10px";e.style.color="#309acc";e.href="#";e.onclick=function(){if(_ow.Auth.authData.ent_username){window.open(_ow.wwwurl+"/services?u="+_ow.Auth.authData.ent_username)}else{window.open(_ow.wwwurl+"/services?u="+_ow.Auth.authData.username)}return false};e.appendChild(document.createTextNode("Set up services"));var f=document.createElement("div");f.style.position="relative";f.style.height="21px";f.style.width="394px";f.style.background='url("'+_ow.wwwurl+'/onlywire_button/images/round.png") no-repeat top left';f.style.fontSize="10px";f.style.marginBottom="10px";f.style.marginLeft="6px";var g=document.createElement("div");g.style.position="absolute";g.style.left="10px";g.style.top="3px";g.appendChild(document.createTextNode("Post a status/tweet to these services: "));f.appendChild(e);f.appendChild(g);i.appendChild(f);var d=_ow.E("form");var h=this.genBookList(_ow.Auth.authData.status_services,true);d.appendChild(h.list);d.appendChild(this.selectAllNone(h.list));var b=_ow.H('<table style="margin: auto; font-size: 10px; width: 380px; text-align: left;"><tbody><tr><td style="text-align: right; width: 100px; vertical-align: top;">Status</td><td><textarea name="status" style="border: 1px solid rgb(110, 175, 215); padding: 0pt 3px; font-size: 10px; width: 200px; height: 70px;"></textarea></td></tr></tbody></table>');d.appendChild(b);var c=this.genButton("Post Status",function(k){_ow.Event.stop(k);var j=new _ow.Submit(d);j.status()});d.appendChild(this.genFooter(c));i.appendChild(d);return i};a.genShare=function(){var g=_ow.E("div");g.appendChild(this.genHeader(2));g.appendChild(this.genLogo());g.appendChild(this.genTitle("Share/Email Content"));var f="";if(_ow.Auth.isLoggedIn()){f=_ow.Auth.authData.email}var e=[{id:"to",left:"Enter Email Addresses",value:"comma separated",type:"input"},{id:"from",left:"Your Email Address",value:f,type:"input"},{id:"message",left:"Message",value:"",type:"textarea"}];var c=this.genWrapper();var d=this.genTable(e);c.appendChild(d.table);g.appendChild(c);var b=this.genButton("Send",function(){var h=new _ow.Submit(d.elements);h.share()});g.appendChild(this.genFooter(b));return g};a.genSignup=function(){var i=_ow.E("div");i.appendChild(this.genHeader(0));i.appendChild(this.genLogo());i.appendChild(this.genTitle("Create a free account"));var b=document.createElement("img");b.setAttribute("alt","Captcha Image");b.style.width="199px";b.src=_ow.wwwurl+"/securimage/securimage_show.php";var e=document.createElement("span");var h=document.createElement("a");h.style.color="#309acc";h.href="#";h.appendChild(document.createTextNode("Login"));h.onclick=function(){_ow.Popup.loadSignin();return false};e.appendChild(document.createTextNode("Already have an account? "));e.appendChild(h);var g=[{id:"0",left:"",value:"Already have an account? <a href='#'>Login</a>",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.currentButton=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(){}}if(typeof(_bookmarklet)!="undefined"){_ow.Popup.show();if(typeof(_ow_loading_text)!="undefined"){_ow_loading_text.hide()}}if(_ow.Auth.isLoggedIn()){this.updateFields();this.loadBookmark()}else{this.loadHomepage()}};a.show=function(b){if(typeof(_bookmarklet)=="undefined"){if(!this.popup){return}}var c=[];if(b){this.currentButton=b;c=_ow.getTopLeft(b);this.popup.style.position="absolute"}else{this.currentButton=null;c[0]=0;c[1]=0;this.popup.style.position="fixed"}this.popup.style.display="block";this.popup.style.top=c[0]+"px";this.popup.style.left=c[1]+"px";if(_ow.Auth.authData.services){this.updateFields()}};a.align=function(b){if(!this.popup){return}if(this.popup.style.display=="none"){return}var c=[];if(b){c=_ow.getTopLeft(b);this.popup.style.position="absolute"}else{c[0]=0;c[1]=0;this.popup.style.position="fixed"}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(typeof(_bookmarklet)=="undefined"){if(!this.currentTag){return}}else{this.currentTag=_ow.H("<b></b>")}var g=this.currentTag.getAttribute("title")||window.document.title;var c=this.currentTag.getAttribute("url")||window.location.href;var b=this.currentTag.getAttribute("tags")||"space separated";var f=this.currentTag.getAttribute("cal");if(this.fieldsToUpdate.title&&this.fieldsToUpdate.url&&this.fieldsToUpdate.tags&&this.fieldsToUpdate.cal){this.fieldsToUpdate.title.value=g;this.fieldsToUpdate.url.value=c;this.fieldsToUpdate.tags.value=b;this.fieldsToUpdate.cal.value=f}if(this.fieldsToUpdate.services){for(var d=0,e;d<this.fieldsToUpdate.services.length;d++){e=this.fieldsToUpdate.services[d];e.href=_ow.wwwurl+"/bounce?t="+encodeURIComponent(e.getAttribute("post_link").replace(/\[URL\]/g,encodeURIComponent(c)).replace(/\[TITLE\]/g,encodeURIComponent(g)))}}};a.getClientHeight=function(){var b=0;this.popup.style.display="block";b=this.popup.clientHeight;return b};a.genPopup=function(){var b=_ow.E("div");b.style.width=this.popupWidth+"px";b.style.position="absolute";b.style.zIndex="10000020";b.style.backgroundColor="#"+_ow.btn.backgroundx;b.style.display="none";b.style.fontFamily="verdana";b.style.fontSize="11px";b.style.textAlign="left";b.style.color="#"+_ow.btn.textx;b.style.border="1px solid #e0e0e0";b.style.padding="0 9px 10px 9px";b.onclick=function(c){_ow.Event.stopPropagation(c)};return b};a.setHeight=function(b){this.popupHeight=b;this.popup.style.height=b+"px"};a.loadHomepage=function(){_ow.Dom.clearChildren(this.popup);this.popup.appendChild(_ow.Template.homepage);_ow.Popup.align(this.currentButton)};a.loadBookmark=function(){_ow.Dom.clearChildren(this.popup);this.popup.appendChild(_ow.Template.bookmark);_ow.Popup.align(this.currentButton)};a.loadStatus=function(){_ow.Dom.clearChildren(this.popup);this.popup.appendChild(_ow.Template.status);_ow.Popup.align(this.currentButton)};a.loadShare=function(){_ow.Dom.clearChildren(this.popup);this.popup.appendChild(_ow.Template.share);_ow.Popup.align(this.currentButton)};a.loadTags=function(){_ow.Dom.clearChildren(this.popup);this.popup.appendChild(_ow.Template.tags);_ow.Popup.align(this.currentButton)};a.loadSignup=function(){_ow.Dom.clearChildren(this.popup);this.popup.appendChild(_ow.Template.signup);_ow.Popup.align(this.currentButton)};a.loadSignin=function(){new _ow.getScript(_ow.wwwurl+"/widget/login",function(b){if(b=="Success"){_ow.token=b.token;_ow.Auth.init()}else{alert(b)}})};a.loadMyLoginsPage=function(){_ow.Dom.clearChildren(this.popup);this.popup.appendChild(_ow.Template.myloginspage);_ow.Popup.align(this.currentButton)};return a})();_ow.genButton=function(c){if(!c){return}var e=_ow.E("a");_ow.button=e;e.href="#";if(_ow.btn.type=="t"){e.className="ow_button"}else{e.className="ow_button_border";e.style.backgroundColor="#"+(_ow.btn.background||"ffffff");e.style.borderColor="#"+(_ow.btn.border||"000000")}var b=_ow.E("span");e.appendChild(b);b.className="ow_logo";b.style.backgroundColor="#"+(_ow.btn.logo||"000000");b.style.margin="0px";var a=_ow.E("img");b.appendChild(a);a.className="ow_logo_img";if(_ow.ie6){a.src=_ow.wwwurl+"/images/onlywire_logo_small.gif"}else{a.src=_ow.wwwurl+"/images/onlywire_logo_small.png"}var d=_ow.E("span");e.appendChild(d);d.className="ow_text";d.style.color="#"+(_ow.btn.text||"000000");d.style.fontSize=(_ow.btn.fontSize||"12")+"px";d.style.fontFamily=(_ow.btn.fontFamily||"Arial");d.appendChild(_ow.T("Bookmark & Share"));e.onclick=function(f){_ow.Event.stopPropagation(f);_ow.Event.stop(f);_ow.Popup.currentTag=c;_ow.Popup.show(this)};if(_ow.btn.mouseover=="t"){e.onmouseover=function(){_ow.Popup.currentTag=c;_ow.Popup.show(this)}}return e};_ow.insertButton=function(){var a=document.getElementsByTagName("script");var e=[];for(var b=0;b<a.length;b++){var d=a[b];if(d.className=="owbutton"){e.push(d)}else{if(d.id=="owbutton"){e.push(d)}}}var c=e[e.length-1];if(!c){return}c.parentNode.insertBefore(_ow.genButton(c),c)}}_ow.insertButton();if(_ow.Popup.popup&&(typeof(_bookmarklet)!="undefined")){_ow.Popup.show()}var owga=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");setTimeout(function(){new _ow.getScript(owga+"google-analytics.com/ga.js",function(){},function(){var a=_gat._getTracker("UA-5399665-1");a._trackPageview(window.location.href.split("/")[2])})},10);

