function $Browser(){this.isOpera=false;this.isFirefox=false;this.isIE=false;this.isMozilla=false;this.version=""}var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){$Browser.isOpera=true}else{if(ua.indexOf("firefox")!=-1){$Browser.isFirefox=true}else{if(ua.indexOf("msie")!=-1){$Browser.isIE=true}else{if(ua.indexOf("mozilla")!=-1){$Browser.isMozilla=true}}}}function lmLabelHandler(c,a){c.onfocus=function(){a.className="lmLabelHide"};c.onblur=function(){if(this.value==""){a.className="lmLabelShow"}}}function lmLabel(e,d){if(document.getElementById&&document.getElementById(e)){var a=document.getElementById(e);var c=document.createElement("label");c.className="lmLabelShow";c.htmlFor=e;a.parentNode.insertBefore(c,a);c.innerHTML=d;c.style.lineHeight=((a.offsetHeight))+"px";lmLabelHandler(a,c)}}function $(a){return typeof a=="object"?a:document.getElementById(a)}function $$(a){return new $Element(a)}function $Element(a){a=$(a);for(var c in this){a[c]=this[c]}return a}$Element.prototype.hide=function(){this.style.display="none"};$Element.prototype.show=function(){switch(this.tagName){case"TR":this.style.display=$Browser.isIE?"block":"table-row";break;case"TD":this.style.display=$Browser.isIE?"block":"table-cell";break;case"SAPN":this.style.display="inline";break;default:this.style.display="block";break}};$Element.prototype.explain=function(){var c="";for(var a in this){c+=a+" = "+this[a]+"<br/>"}document.write(c)};$Element.prototype.toggle=function(){if(this.style.display!="block"){this.style.display="block"}else{this.style.display="none"}};$Element.prototype.toggleValue=function(c,d){var a=c.target?c.target:c.srcElement;if(a.value==d&&c.type=="focus"){a.value=""}if(a.value==""&&c.type=="blur"){a.value=d}};$Element.prototype.next=function(){var a=this;do{a=a.nextSibling}while(a&&a.nodeType!=1);return $$(a)};$Element.prototype.prev=function(){var a=this;do{a=a.previousSibling}while(a&&a.nodeType!=1);return $$(a)};$Element.prototype.addEvent=function(c,a){if($Browser.isIE){this.attachEvent("on"+c,a);return true}else{this.addEventListener(c,a,false);return true}};$Element.prototype.removeEvent=function(c,a){if($Browser.isIE){this.detachEvent("on"+c,a);return true}else{this.removeEventListener(c,a,false);return true}};$Element.prototype.getIFrameDocument=function(){if(this.tagName=="IFRAME"){return(this.document)?this.document:this.contentDocument}};$Element.prototype.getX=function(){var a=0;var c=this;while(c){a+=c.offsetLeft;c=c.offsetParent}return a};$Element.prototype.getY=function(){var c=0;var a=this;while(a){c+=a.offsetTop;a=a.offsetParent}return c};function $go(a){document.location.href=a}function lmMakeVisible(c,a){if(!c.offsetHeight){if(c.parentNode){if(!a){a=c.parentNode}else{a=a.parentNode}if(!c.offsetHeight){if(a.style.display=="none"){a.style.display=""}else{a.style.display=="block"}lmMakeVisible(c,a)}}}}function lmShowError(c,d){if(c.previousSibling&&c.previousSibling.className=="error"){c.previousSibling.innerHTML=d}else{var a=document.createElement("span");a.innerHTML=d;a.className="error";c.parentNode.insertBefore(a,c)}if(!c.offsetHeight&&c.getAttribute("ifhidden")=="check"){lmMakeVisible(c)}}function lmRemoveError(a){if(a.previousSibling&&a.previousSibling.className=="error"){a.parentNode.removeChild(a.previousSibling)}}function lmCheckSameAs(f,g,d){var e=f.getElementsByTagName("input");for(var c=0,a=e.length;c<a;c++){if(e[c].getAttribute("name")&&e[c].getAttribute("name")==d){if(e[c].value==g.value){return true}}}return false}function lmCheckRadiosEmpty(f,d){var a=true;var g=f[d];for(var e=0,c=g.length;e<c;e++){if(g[e].checked){a=false}}return a}function lmCheckInputs(h){var c=true;inp=[];var e=h.getElementsByTagName("input");for(var g=0,f=e.length;g<f;g++){inp.push(e[g])}var d=h.getElementsByTagName("textarea");for(var g=0,f=d.length;g<f;g++){inp.push(d[g])}var a=h.getElementsByTagName("select");for(var g=0,f=a.length;g<f;g++){inp.push(a[g])}for(var g=0,f=inp.length;g<f;g++){if(inp[g].offsetHeight||inp[g].getAttribute("ifhidden")=="check"){if(inp[g].tagName.toLowerCase()=="select"&&inp[g].getAttribute("require")&&inp[g].selectedIndex==0){c=false;lmShowError(inp[g],"Select value ")}else{if(inp[g].type=="radio"&&inp[g].getAttribute("require")&&lmCheckRadiosEmpty(h,inp[g].name)){c=false;lmShowError(inp[g],"Select value ")}else{if(inp[g].type=="checkbox"&&inp[g].getAttribute("require")&&!inp[g].checked){c=false;lmShowError(inp[g],"Required ")}else{if(inp[g].tagName.toLowerCase()!="select"&&inp[g].getAttribute("require")&&!inp[g].value.length){c=false;lmShowError(inp[g],"Fill in, please ")}else{if(inp[g].getAttribute("require")&&inp[g].getAttribute("require")=="digit"&&/[^\d]+/.test(inp[g].value)){c=false;lmShowError(inp[g],"Must be numeric ")}else{if(inp[g].getAttribute("require")&&inp[g].getAttribute("require")=="english"&&/[^A-Za-z0-9_]/.test(inp[g].value)){c=false;lmShowError(inp[g],"Only letters, numbers and underscores are alllowed ")}else{if(inp[g].getAttribute("sameas")&&!lmCheckSameAs(h,inp[g],inp[g].getAttribute("sameas"))){c=false;lmShowError(inp[g],"Passwords not equal ")}else{if(inp[g].getAttribute("maxlength")&&inp[g].value.length>Number(inp[g].getAttribute("maxlength"))){c=false;lmShowError(inp[g],"Max allowed "+inp[g].getAttribute("maxlength")+" symbols. Now: "+inp[g].value.length)}else{if(inp[g].getAttribute("minlength")&&inp[g].value.length<Number(inp[g].getAttribute("minlength"))){c=false;lmShowError(inp[g],"Min allowed "+inp[g].getAttribute("minlength")+" symbols. Now: "+inp[g].value.length)}else{lmRemoveError(inp[g])}}}}}}}}}}}return c}function FormCheck(a){if(lmCheckInputs(a)){a.submit()}}function checkRequire(a){if(a.tagName.toLowerCase()=="select"&&a.getAttribute("require")&&a.selectedIndex==0){b=false;lmShowError(a,"Select value ")}else{if(a.type=="radio"&&a.getAttribute("require")&&lmCheckRadiosEmpty(a.form,a.name)){b=false;lmShowError(a,"Select value ")}else{if(a.type=="checkbox"&&a.getAttribute("require")&&!a.checked){b=false;lmShowError(a,"Check value ")}else{if(a.tagName.toLowerCase()!="select"&&a.getAttribute("require")&&!a.value.length){b=false;lmShowError(a,"Value required ")}else{lmRemoveError(a)}}}}}function checkEnglishString(a){if(a.getAttribute("require")&&a.getAttribute("require")=="english"&&/[^A-Za-z0-9_]/.test(a.value)){lmShowError(a,"Only letters, numbers and underscores are alllowed ");return false}else{lmRemoveError(a);return true}}function checkEmail(a){if(a.getAttribute("require")&&a.getAttribute("require")=="email"&&!/^([0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-wyz][a-z](fo|g|l|m|mes|o|op|pa|ro|seum|t|u|v|z)?)$/.test(a.value)){lmShowError(a,"Email is not valid ");return false}else{lmRemoveError(a);return true}}function checkSameas(a){if(a.getAttribute("sameas")&&!lmCheckSameAs(a.form,a,a.getAttribute("sameas"))){lmShowError(a,"Passwords not equal ");return false}else{lmRemoveError(a);return true}}function checkMaxLength(a){if(a.getAttribute("maxlength")&&a.value.length>Number(a.getAttribute("maxlength"))){lmShowError(a,"Max allowed "+a.getAttribute("maxlength")+" symbols. Now: "+a.value.length);return false}else{lmRemoveError(a);return true}}function validateUserEmail(d){var a=d.value;var c=new Subsys_JsHttpRequest_Js();c.onreadystatechange=function(){if(c.readyState==4){if(c.responseJS){var e=c.responseJS.Error;if(e){lmShowError(d,e)}else{lmRemoveError(d)}}}};c.caching=false;c.open("POST",AjaxPath+"?validate=user_email",true);c.send({email:a})}function validateUserPassword(d){var c=d.value;var a=new Subsys_JsHttpRequest_Js();a.onreadystatechange=function(){if(a.readyState==4){if(a.responseJS){var e=a.responseJS.Error;if(e){lmShowError(d,e)}else{lmRemoveError(d)}}}};a.caching=false;a.open("POST",AjaxPath+"?validate=user_password",true);a.send({password:c})}function validateLogin(d){var a=d.value;var c=new Subsys_JsHttpRequest_Js();c.onreadystatechange=function(){if(c.readyState==4){if(c.responseJS){var e=c.responseJS.Error;if(e){lmShowError(d,e)}else{lmRemoveError(d)}}}};c.caching=false;c.open("POST",AjaxPath+"?validate=user_login",true);c.send({login:a})}function tickerLookup(e,c){var d=document.getElementById("suggestions"+c);var a=document.getElementById("autoSuggestionsList"+c);if(e.length<=1){d.style.display="none"}else{autocompleteTicker(e,c)}}function fill(a,c){document.getElementById(c).value=a;hideAutocomplete();if(c=="autoTicker1"){document.getElementById(c).parentNode.submit()}}function autocompleteTicker(d,a){var c=new Subsys_JsHttpRequest_Js();c.onreadystatechange=function(){if(c.readyState==4){if(c.responseJS){var l=c.responseJS.Tickers;var h=document.getElementById("suggestions"+a);var f=document.getElementById("autoSuggestionsList"+a);if(l.length>0){if(a==1){var g=document.getElementById("autoTicker"+a);pos=getElementPosition(g);h.style.top=pos.top+g.offsetHeight+"px";h.style.left=pos.left+"px"}f.innerHTML=l;h.style.display="block"}else{f.innerHTML="";h.style.display="none"}}}};c.caching=false;var e="autoTicker"+a;c.open("POST",AjaxPath+"?autocomplete=ticker",true);c.send({value:d,field:e})}function hideAutocomplete(){if(document.getElementById("suggestions0")){document.getElementById("suggestions0").style.display="none"}if(document.getElementById("suggestions1")){document.getElementById("suggestions1").style.display="none"}if(document.getElementById("suggestions2")){document.getElementById("suggestions2").style.display="none"}}function appendRow(c,a,e,d){insRow(c,document.getElementById(c).rows.length,a,e,d,"next_row")}function insRow(m,e,l,a,f,d){var h=document.getElementById(m).insertRow(e);h.id=d;var c=l.length;for(j=0;j<c;j++){var g=h.insertCell(j);g.colSpan=f[j];g.innerHTML=l[j];if(a[j]){g.className=a[j]}}}function delRow(c,a){document.getElementById(c).deleteRow(a)}function delRowById(a,d){var c=document.getElementById(d);document.getElementById(a).deleteRow(c.rowIndex)}function ViewAnalysis(m,d,n,l){delExtraRows(n,-1);var f=d.parentNode.parentNode.rowIndex;var c="analysisRow"+f;var p=document.getElementById(c);if(p==null){var e=document.getElementById(n).rows[0].cells.length;var o=new Array();m=m.replace(/\n/g,"<br/>");m=m.replace(/<!--br-->/g,"<br/>");o[0]=m+"<br/>"+l;var g=new Array();g[0]=e;var a=new Array();a[0]="pick_analysis";insRow(n,f+1,o,a,g,c);k=f-1;document.getElementById(n+"_aClose"+k).style.display="block";document.getElementById(n+"_aView"+k).style.display="none"}else{delRowById(n,c)}}function delExtraRows(a,c){var e=document.getElementById(a).rows.length;for(i=0;i<e;i++){if(i!=c){var d="analysisRow"+i;if(document.getElementById(d)!=null){delRowById(a,d)}}}var e=document.getElementById(a).rows.length;for(i=0;i<e;i++){k=i;if(document.getElementById(a+"_aClose"+k)!=null){document.getElementById(a+"_aClose"+k).style.display="none"}if(document.getElementById(a+"_aView"+k)!=null){document.getElementById(a+"_aView"+k).style.display="block"}}}function CloseAnalysis(f,a){var d=f.parentNode.parentNode.rowIndex;var e="analysisRow"+d;var c=document.getElementById(e);delRowById(a,e);k=d-1;document.getElementById(a+"_aClose"+k).style.display="none";document.getElementById(a+"_aView"+k).style.display="block"}function tabGo(a){var c=document.getElementById("picksTab").lang;document.location.href=a+"&tab="+c+"#pk"}function tabGoFavorites(a){var c=document.getElementById("picksTab").lang;var d=document.getElementById("commonTab").lang;document.location.href=a+"&mtab="+d}function CancelAddReply(c){document.getElementById("replyView"+c).style.display="none";document.getElementById("error"+c).style.display="none";document.getElementById("lnkReply"+c).style.display="inline";document.getElementById("buzzPipe"+c).style.display="inline";var a=$("txtPitch"+c);a.disabled=false;a.value=""}function AddReplyConfirmation(d){var c=$("txtPitch"+d);var a=$("review"+d);if(c.value.length==0){$("error"+d).innerHTML="Enter your comments, please.";$$("error"+d).show();return}a.innerHTML=($("txtPitch"+d).value.replace(/\r\n/g,"<br/>"));a.innerHTML=($("txtPitch"+d).value.replace(/\n/g,"<br/>"));$$("txtPitch"+d).hide();$$("btnConfirm"+d).hide();$$("btnCancel"+d).hide();$$("error"+d).hide();$$("btnEdit"+d).show();$$("btnSubmit"+d).show();$$("review"+d).show()}function EditReply(d){var c=$("txtPitch"+d);var a=$("review"+d);a.innerHTML=c.value;$$("txtPitch"+d).show();$$("btnConfirm"+d).show();$$("btnCancel"+d).show();$$("btnEdit"+d).hide();$$("btnSubmit"+d).hide();$$("review"+d).hide()}function AddPitch(a){var d=$("txtPitch"+a);var c=new Subsys_JsHttpRequest_Js();c.onreadystatechange=function(){if(c.readyState==4){if(c.responseJS){var e=c.responseJS.PickReply;var f="";if(e){document.getElementById("error"+a).style.display="block";document.getElementById("error"+a).innerHTML=e}else{document.getElementById("ok"+a).style.display="block";document.getElementById("txtPitch"+a).style.display="block";document.getElementById("review"+a).style.display="none";$$("btnConfirm"+a).show();$$("btnCancel"+a).show();$$("btnEdit"+a).hide();$$("btnSubmit"+a).hide();CancelAddReply(a)}}}};c.caching=false;c.open("POST",AjaxPath+"?action=add_pick_reply",true);c.send({pick_id:a,text:d.value})}function GetPickReplies(a){var c=new Subsys_JsHttpRequest_Js();c.onreadystatechange=function(){if(c.readyState==4){if(c.responseJS){var d=c.responseJS.Replies;var e="";for(i=0;i<d.length;i++){e=e+'<div class="blogcomment"><div class="info"><img src="'+BasePath+'images/ico/user.gif" alt="Author" title="Author" />';e=e+' <a href="'+BasePath+"profile/"+d[i]["username"]+'" target="_blank">'+d[i]["username"]+"</a>";e=e+'&nbsp; &nbsp;<img src="'+BasePath+'images/ico/dt.gif" alt="Date" title="Date" /> ';e=e+d[i]["dt_fmt"]+"</div>";e=e+'<div class="text">'+d[i]["text"].replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>")+"</div></div>"}if(e){document.getElementById("Replies"+a).style.display="block";document.getElementById("Replies"+a).innerHTML=e;document.getElementById("replyThread"+a).style.display="none";document.getElementById("closeReplyThread"+a).style.display="inline";$$("ok"+a).hide()}}}};c.caching=false;c.open("POST",AjaxPath+"?action=get_pick_replies",true);c.send({pick_id:a})}function ClosePickReplies(a){document.getElementById("Replies"+a).style.display="none";document.getElementById("replyThread"+a).style.display="inline";document.getElementById("closeReplyThread"+a).style.display="none"}function mouseX(a){if(a.pageX){return a.pageX}else{if(a.clientX){return a.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft)}else{return null}}}function mouseY(a){if(a.pageY){return a.pageY}else{if(a.clientY){return a.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}else{return null}}}function LinkWindow(d,e,a){if(window.event){window.event.cancelBubble=true;window.event.returnValue=false}if(!e&&!a){try{e=Math.ceil(screen.width/2);a=Math.ceil(screen.height*0.6)}catch(c){e=600;a=400}if(e<600){e=600}if(a<400){a=400}}var h,g;try{h=Math.ceil(screen.width/4);g=Math.ceil(screen.height*0.1)}catch(c){h=100;g=100}if(typeof(oTarget)!="undefined"){oTarget.close()}var f=(new Date()).getTime();oTarget=window.open(d,"Additional"+f,"height="+a+",width="+e+",scrollbars=1,left="+h+",top="+g);oTarget.focus();return false}function fnShowProps(e,d){var a="";j=0;for(var c in e){a+=d+"."+c+" = "+e[c]+"<br />\n";j++}return a}function getElementPosition(d){var a=d;var e=0;var c=0;while(a){e+=a.offsetLeft;c+=a.offsetTop;a=a.offsetParent}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"){e+=document.body.leftMargin;c+=document.body.topMargin}return{left:e,top:c}}function SendToFriend(d){var g=$("share_your_name");var c=$("share_your_email");var a=$("share_friends_email_1");var h=$("share_friends_email_2");var e=$("note");document.getElementById("share_error").style.display="none";document.getElementById("share_ok").style.display="none";var f=new Subsys_JsHttpRequest_Js();f.onreadystatechange=function(){if(f.readyState==4){if(f.responseJS){var l=f.responseJS.SendToFriendReply;var m="";if(l){document.getElementById("share_error").style.display="block";document.getElementById("share_error").innerHTML=l}else{document.getElementById("share_ok").style.display="block"}}}};f.caching=false;f.open("POST",AjaxPath+"?action=send_to_friend",true);f.send({post_id:d,your_name:g.value,your_email:c.value,friends_email_1:a.value,friends_email_2:h.value,share_note:e.value})}function SendInvitation(f){var l=$("share_your_name");var g=$("share_your_email");var d=$("share_friends_email_1");var c=$("share_friends_email_2");var a=$("share_friends_email_3");var n=$("share_friends_email_4");var m=$("share_friends_email_5");var e=$("note");document.getElementById("share_error").style.display="none";document.getElementById("share_ok").style.display="none";document.getElementById("loading").style.display="block";var h=new Subsys_JsHttpRequest_Js();h.onreadystatechange=function(){if(h.readyState==4){if(h.responseJS){var o=h.responseJS.SendInvitation;document.getElementById("loading").style.display="none";var p="";if(o){document.getElementById("share_error").style.display="block";document.getElementById("share_error").innerHTML=o}else{document.getElementById("share_ok").style.display="block"}}}};h.caching=false;h.open("POST",AjaxPath+"?action=send_invitation",true);h.send({referer_id:f,your_name:l.value,your_email:g.value,friends_email_1:d.value,friends_email_2:c.value,friends_email_3:a.value,friends_email_4:n.value,friends_email_5:m.value,share_note:e.value})}function CSSearchUser(c){var a=c?c:document.getElementById("user2search").value;if(!a){alert("Enter user to search please");return}document.getElementById("err_msg").style.display="none";document.getElementById("ok_msg").style.display="none";document.getElementById("loader").style.display="block";var d=new Subsys_JsHttpRequest_Js();d.onreadystatechange=function(){if(d.readyState!=4){return}document.getElementById("loader").style.display="none";var h=d.responseJS.err_msg;if(h){document.getElementById("err_msg").style.display="block";document.getElementById("err_msg").innerHTML=h}else{document.getElementById("loader").style.display="none";document.getElementById("hider").style.opacity=1;document.getElementById("tmp_header").style.display="none";var g=d.responseJS.name;var e=d.responseJS.cash;var f=d.responseJS.email;var l=d.responseJS.id;document.getElementById("ok_msg").style.display="block";document.getElementById("err_msg").style.display="none";document.getElementById("ok_msg").innerHTML="Loaded";document.getElementById("span_name1").innerHTML=g;document.getElementById("span_name2").innerHTML=g;document.getElementById("span_name3").innerHTML=g;document.getElementById("span_name4").innerHTML=g;document.getElementById("span_cash1").innerHTML=e;document.getElementById("span_cash2").innerHTML=e;document.getElementById("span_cash3").innerHTML=e;document.getElementById("user_email").value=f;document.getElementById("user_id").innerHTML=l;document.getElementById("clear_btn").style.display="block";document.getElementById("clear_done").style.display="none";document.getElementById("clear_done2").style.display="none";document.getElementById("send_done").style.display="none"}};d.caching=false;d.open("POST",AjaxPath+"?action=cs_search_user",true);d.send({user:a})}function CSClearZacksCash(d){var a=document.getElementById("user_id").innerHTML;if(!a){alert("You should select user before clearing his cash");return}else{if(document.getElementById("span_cash1").innerHTML=="0"||document.getElementById("span_cash1").innerHTML==0){alert("This user has no zacks cash");return}else{if(d&&(isNaN(d)||d<1)){alert("Wrong amount value!");return}else{if(d&&d>parseInt(document.getElementById("span_cash1").innerHTML)){alert("You can not credit more than user has!");return}}}}if(d){document.getElementById("clear_loader2").style.display="block"}else{document.getElementById("clear_loader").style.display="block";document.getElementById("clear_done").style.display="none"}document.getElementById("clear_done2").style.display="none";if(!c){var c=new Subsys_JsHttpRequest_Js()}c.onreadystatechange=function(){if(c.readyState!=4){return}document.getElementById("clear_loader2").style.display="none";document.getElementById("clear_loader").style.display="none";var e=c.responseJS.err_msg;if(e){alert("Error: "+e);return}if(c.responseJS.ok){CSSearchUser(a);if(d){document.getElementById("clear_done2").style.display="block";document.getElementById("span_cash4").innerHTML=d}else{document.getElementById("clear_btn").style.display="none";document.getElementById("clear_done").style.display="block";document.getElementById("span_cash4").innerHTML=document.getElementById("span_cash1").innerHTML}}};c.caching=false;c.open("POST",AjaxPath+"?action=cs_clear_zacks_cash",true);c.send({user:a,amount:d});return}function CSSendCreditConfirmation(){var h=document.getElementById("your_name").value;var c=document.getElementById("your_mail").value;var a=document.getElementById("user_email").value;var f=document.getElementById("note").value;var e=document.getElementById("user_id").innerHTML;var d=document.getElementById("span_cash4").innerHTML;if(!e){alert("You should select user before sending him e-mail");return}else{if(!h){alert("Enter your name");return}else{if(!c){alert("Enter your e-mail");return}else{if(!a){alert("Enter user e-mail");return}}}}var g=new Subsys_JsHttpRequest_Js();g.caching=false;document.getElementById("send_loader").style.display="block";document.getElementById("send_done").style.display="none";g.onreadystatechange=function(){if(g.readyState!=4){return}document.getElementById("send_loader").style.display="none";var m=g.responseJS.err_msg;if(m){alert("Error: "+m);return}var l=g.responseJS.ok;if(l){document.getElementById("send_done").style.display="block"}};g.open("POST",AjaxPath+"?action=cs_send_credit_confirmation",true);g.send({user_id:e,from_name:h,from_email:c,to_email:a,note_text:f,amount:d});return}function RedeemZacksCash(){var f=document.getElementById("of_name").value;var c=document.getElementById("of_address1").value;var a=document.getElementById("of_address2").value;var n=document.getElementById("of_city").value;var m=document.getElementById("of_state").value;var l=document.getElementById("of_zip").value;var d=document.getElementById("of_phone").value;var e=document.getElementById("of_email").value;var h=document.getElementById("of_product").value;if(!f){alert("Enter your name please");return}else{if(!c){alert("Enter your address please");return}else{if(!n){alert("Enter your city please");return}else{if(!m){alert("Enter your state please");return}else{if(!l){alert("Enter your ZIP please");return}else{if(!d){alert("Enter your phone please");return}else{if(!e){alert("Enter your e-mail please");return}else{if(!h){alert("Select the product please");return}}}}}}}}document.getElementById("redeem_loader").style.display="block";document.getElementById("redeem_done").style.display="none";var g=(c+"\n"+a);var o=new Subsys_JsHttpRequest_Js();o.caching=false;o.onreadystatechange=function(){if(o.readyState!=4){return}document.getElementById("redeem_loader").style.display="none";var q=o.responseJS.err_msg;if(q){alert("Error: "+q);return}var p=o.responseJS.ok;if(p){document.getElementById("redeem_done").style.display="block"}};o.open("POST",AjaxPath+"?action=redeem_zacks_cash",true);o.send({name:f,address:g,city:n,state:m,zip:l,phone:d,email:e,product:h});return}function ReloadStates(d){var c=""+d.value;var a=new Subsys_JsHttpRequest_Js();a.onreadystatechange=function(){if(a.readyState==4){if(a.responseJS){var e=a.responseJS.States;var f="";for(i=0;i<e.length;i++){f=f+'<option value="'+e[i]["__DocID"]+'">'+e[i]["name"]+"</option>"}f='<select name="state_id" id="state" class="half" onchange="ReloadCities(this)"><option value="">-Select a State-</option>'+f+"</select>";html1='<select name="city_id" id="city" class="half"><option value="">-Select a City-</option></select>';var g=d.parentNode.parentNode.rowIndex;document.getElementById("MyTable").rows[g+1].cells[1].innerHTML=f;document.getElementById("MyTable").rows[g+2].cells[1].innerHTML=html1}}};a.caching=false;a.open("POST",AjaxPath+"?action=get_states",true);a.send({country_id:c})}function ReloadCities(c){var d=""+c.value;var a=new Subsys_JsHttpRequest_Js();a.onreadystatechange=function(){if(a.readyState==4){if(a.responseJS){var e=a.responseJS.Cities;var f="";for(i=0;i<e.length;i++){f=f+'<option value="'+e[i]["__DocID"]+'">'+e[i]["name"]+"</option>"}f='<select name="city_id" id="city" class="half"><option value="">-Select a City-</option>'+f+"</select>";var g=c.parentNode.parentNode.rowIndex;document.getElementById("MyTable").rows[g+1].cells[1].innerHTML=f}}};a.caching=false;a.open("POST",AjaxPath+"?action=get_cities",true);a.send({state_id:d})}function FixBoxHeight(){if(document.getElementById("profile")!=null){document.getElementById("profile").style.height=browser.isIE?0:"auto"}if(document.getElementById("highlighted")!=null){document.getElementById("highlighted").style.height=browser.isIE?0:"auto"}if(document.getElementById("recentposts")!=null){document.getElementById("recentposts").style.height=browser.isIE?0:"auto"}if(document.getElementById("favorites")!=null){document.getElementById("favorites").style.height=browser.isIE?0:"auto"}var e=0;var f=(document.getElementById("pr")!=null)?parseInt(document.getElementById("pr").offsetHeight)-12-e:0;var d=(document.getElementById("hl")!=null)?parseInt(document.getElementById("hl").offsetHeight)-12-e:0;var c=(document.getElementById("rp")!=null)?parseInt(document.getElementById("rp").offsetHeight)-12-e:0;var a=(document.getElementById("fd")!=null)?parseInt(document.getElementById("fd").offsetHeight)-12-e:0;var g;if(f>d){g=f;if(g<c){g=c}}else{g=d;if(g<c){g=c}}if(a>g){g=a}if(document.getElementById("profile")!=null){document.getElementById("profile").style.height=g+"px"}if(document.getElementById("highlighted")!=null){document.getElementById("highlighted").style.height=g+"px"}if(document.getElementById("recentposts")!=null){document.getElementById("recentposts").style.height=g+"px"}if(document.getElementById("favorites")!=null){document.getElementById("favorites").style.height=g+"px"}}function CancelAddEndReply(a,c,e){document.getElementById(a+"_endReplyView"+e).style.display="none";document.getElementById(a+"_end_error"+e).style.display="none";var d=$(a+"_endTxtPitch"+e);d.disabled=false;d.value="";obj=document.getElementById(a+"_endaClose"+c);CloseEndPickAnalysis(obj,a)}function AddEndReplyConfirmation(a,e){var d=$(a+"_endTxtPitch"+e);var c=$(a+"_endReview"+e);if(d.value.length==0){AddEndPick(a,e);return}c.innerHTML=($(a+"_endTxtPitch"+e).value.replace(/\r\n/g,"<br/>"));c.innerHTML=($(a+"_endTxtPitch"+e).value.replace(/\n/g,"<br/>"));$$(a+"_endTxtPitch"+e).hide();$$(a+"_endBtnConfirm"+e).hide();$$(a+"_endBtnCancel"+e).hide();$$(a+"_end_error"+e).hide();$$(a+"_endBtnEdit"+e).show();$$(a+"_endBtnSubmit"+e).show();$$(a+"_endReview"+e).show();$$(a+"hText").innerHTML="Comment preview:"}function EditEndReply(a,e){var d=$(a+"_endTxtPitch"+e);var c=$(a+"_endReview"+e);c.innerHTML=d.value;$$(a+"_endTxtPitch"+e).show();$$(a+"_endBtnConfirm"+e).show();$$(a+"_endBtnCancel"+e).show();$$(a+"_endBtnEdit"+e).hide();$$(a+"_endBtnSubmit"+e).hide();$$(a+"_endReview"+e).hide();$$(a+"hText").innerHTML="Are you sure you want to end this pick? If so, please add a comment on why you're ending it now."}function AddEndPick(a,c){var e=$(a+"_endTxtPitch"+c);var d=new Subsys_JsHttpRequest_Js();d.onreadystatechange=function(){if(d.readyState==4){if(d.responseJS){var f=d.responseJS.EndPickReply;var g="";if(f){document.getElementById(a+"_end_error"+c).style.display="block";document.getElementById(a+"_end_error"+c).innerHTML=f}else{alert("Your pick has been ended. Wait for page to reload.");location.reload()}}}};d.caching=false;d.open("POST",AjaxPath+"?action=add_end_pick_reply",true);d.send({pick_id:c,text:e.value})}function ViewEndPickAnalysis(m,d,n,l){delExtraRowsEndPick(n,-1);var f=d.parentNode.parentNode.rowIndex;var c=n+"_endPickRow"+f;var p=document.getElementById(c);if(p==null){var e=document.getElementById(n).rows[0].cells.length;var o=new Array();m=m.replace(/\n/g,"<br/>");m=m.replace(/<!--br-->/g,"<br/>");o[0]=m+l;var g=new Array();g[0]=e;var a=new Array();a[0]="pick_analysis";insRow(n,f+1,o,a,g,c);k=f-1;document.getElementById(n+"_endaClose"+k).style.display="block";document.getElementById(n+"_endaView"+k).style.display="none"}else{delRowById(n,c)}}function delExtraRowsEndPick(a,c){var e=document.getElementById(a).rows.length;for(i=0;i<e;i++){if(i!=c){var d=a+"_endPickRow"+i;if(document.getElementById(d)!=null){delRowById(a,d)}}}var e=document.getElementById(a).rows.length;for(i=0;i<e;i++){k=i;if(document.getElementById(a+"_endaClose"+k)!=null){document.getElementById(a+"_endaClose"+k).style.display="none"}if(document.getElementById(a+"_endaView"+k)!=null){document.getElementById(a+"_endaView"+k).style.display="block"}}}function CloseEndPickAnalysis(f,a){var d=f.parentNode.parentNode.rowIndex;var e=a+"_endPickRow"+d;var c=document.getElementById(e);delRowById(a,e);k=d-1;document.getElementById(a+"_endaClose"+k).style.display="none";document.getElementById(a+"_endaView"+k).style.display="block"};