(function(){var a={custCommentsTag:"mmts-comments",custToolbarTag:"mmts-toolbar",custvToolbarTag:"mmts-vtoolbar",custCustomTag:"mmts-custom"};var b=new mmt.social.plugin({name:"base",fullName:"Base",config:a,init:function(){mmt.social.log("base ---");this.loadFloatStyle();this.parseComp()},components:[new mmt.social.plugin.component({name:a.custCommentsTag,config:{successMsg:"Posted Successfully to <>",failureMsg:"Posting to <> failed",textBoxStyle:"",buttonStyle:"color:blue;text-decoration:underline;cursor:pointer;",text:"Share",services:{}},load:function(d,f){a;var e=this;mmt.social.log("          Loading Comp : "+d.name+e);mmt.social.checkAbuse=function(){var c=e.firstChild;var g=mmt.social.services.base.getCommentServices(f,"-");if(e.firstChild.value.replace(/^\s+|\s+$/g,"")==""||g.replace(/^\s+|\s+$/g,"")==""){mmt.social.logAlert("Blank text cannot be posted");return}mmt.social.ajax({type:"POST",url:mmt.social.config.path+mmt.social.config.langFilterUrl,data:"msg="+e.firstChild.value+"&services="+g,success:function(i){if(i=="false"){for(var h in f.services){if((f.services[h].status=="loaded"||f.services[h].status=="success")&&f.services[h].checkbox.checked){mmt.social.log("Calling postComments for - "+h+" with comment:"+e.firstChild.value);mmt.social.services[h].postComment(e.firstChild.value,function(l,k){f.services[l].status="success";mmt.social.event.callEvent(l,"postComment",k);var j=true;for(var m in f.services){if(f.services[m].status!="success"){j=false}}if(j){mmt.social.event.callEvent("mmt","postComment",f.services)}})}else{mmt.social.log("Posting Failed for - "+f.services+", Status : "+f.services[h].status+",Checked:"+f.services[h].checkbox.checked)}}}else{mmt.social.log("Posting Failed for - "+h+",Status : Abuse Reported")}}})};mmt.social.services.base.subscribeLoadEvent(e,f);return"<input style='"+f.textBoxStyle+"' type='text' /> <label onclick='mmt.social.checkAbuse();' style='"+f.buttonStyle+"'>"+f.text+"</label><br>"}}),new mmt.social.plugin.component({name:a.custToolbarTag,config:{minwidth:"2.25%",tbwidth:"100%",bgcolor:"#FFFFFF",html:""},load:function(j,m){var e="border-top-left-radius: 10px;-moz-border-radius-topleft:10px;border-top-right-radius: 10px;-moz-border-radius-topright:10px;";var g="left:0px;";var s="right:0px;";var t=parseFloat(m.tbwidth.replace("%",""));if(t<72){t=72}else{if(t>100){t=100}}if(t>=72&&t<100){var q=(100-t)/2;g="left:"+q+"%;";s="right:"+q+"%;"}e+=g+s+"width:"+t+"%;position:fixed;bottom:0px;_position:absolute;overflow:hidden;z-index:10000;border-top:1px solid gray;top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);_top: expression(eval(document.documentElement.scrollTop+document.documentElement.clientHeight-32));";var i="32px;";var d=m.bgcolor||mmt.social.config.toolbar.bgcolor||"#85B6D7";e=e+"height:"+i+"background-color:"+d+";";var p="display:inline-block;margin-top:2px;margin-bottom:2px;height=24px";var l="display:none;";var n=this;var h=parseFloat(m.minwidth.replace("%",""))||"2.5";if(h!=2.25){h=(t*h)/100}var k=function(){tbWidth=parseFloat(n.firstChild.style.width.replace("%",""));if(h>2.24&&h<100){if(tbWidth>h){n.firstChild.style.width=(tbWidth-1)+"%";setTimeout(arguments.callee,1)}else{var c=document.getElementById("rightNavigate");var u=document.getElementById("leftNavigate");if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){n.firstChild.style.width=h+"%";c.style.display="inline-block";c.style.height="22px";c.style.margin="2px 0px 2px 0px";u.style.display="none"}else{n.firstChild.style.width=h+"%";c.setAttribute("style",p);u.setAttribute("style",l)}c.onclick=r}}};var r=function(){var c=parseInt(n.firstChild.style.width.replace("%",""));document.getElementById("rightNavigate").setAttribute("style",l);if(c<t){n.firstChild.style.width=parseInt(c+1)+"%";setTimeout(arguments.callee,1)}else{if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){document.getElementById("rightNavigate").style.display="none";document.getElementById("leftNavigate").style.display="inline-block"}else{document.getElementById("rightNavigate").setAttribute("style",l);document.getElementById("leftNavigate").setAttribute("style",p)}}};setTimeout(function(){document.getElementById("leftNavigate").onclick=function(){k()}},10);var f="";if(m.html.length>0){f=m.html.toLowerCase()}var o="<div style='"+e+"'><table width='100%'><tr><td width='*'>";o+="<iframe id='socialToolBar' allowTransparency='-1' frameBorder='0' scrolling='no' overflow='hidden' style='border:none;' height='"+i+"' width='100%'  src='"+mmt.social.config.path+"toolbar.php?innerhtml="+escape(f)+"&ploc="+document.location.href+"'></iframe></td>";o+="<td width='22px'><img width='22px' id='rightNavigate' src='"+mmt.social.config.toolbar.mmtRightNavigatorImgUrl+"' style='display:none'></img>";o+="<img id='leftNavigate' width='22px' style='margin-top:2px;margin-bottom:2px;' src='"+mmt.social.config.toolbar.mmtLeftNavigatorImgUrl+"'></img></td></tr></table>";o+="</div>";return o}}),new mmt.social.plugin.component({name:a.custCustomTag,config:{url:"",width:"100px",height:"30px",style:"",styleClass:"",param:"",fixed:true},load:function(d,e){if(e.fixed){e.styleClass=e.styleClass+" mmtSocialFixed"}return"<iframe src='"+e.url+"' frameBorder='0' width='"+e.width+"' height='"+e.height+"' style='border:0px;overflow:hidden;"+e.style+"' class='"+e.styleClass+"'></iframe>"}}),new mmt.social.plugin.component({name:a.custvToolbarTag,config:{style:"",styleClass:"",param:"",fixed:true},load:function(e,f){if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var d=new Number(RegExp.$1);if(d<8){return"<!-- Toolbar Disabled for IE < 8 -->"}}return"<iframe src='"+mmt.social.config.path+"verticaltoolbar.php' frameBorder='0' SCROLLING=NO width='130px' height='240px' style='left:0px; top:36%;z-index:10000;position:fixed; border:0px;overflow:hidden;"+f.style+"' class='"+f.styleClass+"'></iframe>"}})],subscribeLoadEvent:function(f,g){for(var d=0;d<mmt.social.config.hash.length;d++){var e=mmt.social.config.hash[d];mmt.social.subscribeEvent({event:e+".onLoad",callback:function(h){var j=h.ns;var c=document.createElement("input");c.name=j;c.type="checkbox";c.onclick=function(){if(this.checked){if(mmt.social.services[this.name].login){mmt.social.services[this.name].login(function(l){if(!l){}})}}};mmt.social.appendChild(f,c,true);var i="loaded";if(!mmt.social.services[j].postComment){i="no postComment method"}var k=document.createElement("label");k.innerHTML=mmt.social.services[j].fullName;mmt.social.appendChild(f,k,true);g.services[j]={status:i,checkbox:c,checkboxLbl:k}}})}},getCommentServices:function(g,f){var d=[];for(var e in g.services){if(g.services[e].status!="no postComment method"&&g.services[e].checkbox.checked){d.push(e)}}if(f){return d.toString().replace(/,/g,"-")}else{return d.toString()}},loadFloatStyle:function(){var e=document.createElement("style");var f=".mmtSocialFixed{left:0px;top:0px;z-index:10000;position:fixed;_position:absolute;_top:expression(document.body.scrollTop+document.body.clientHeight-this.clientHeight);}";e.setAttribute("type","text/css");if(e.styleSheet){e.styleSheet.cssText=f}else{var c=document.createTextNode(f);e.appendChild(c)}var d=document.getElementsByTagName("head")[0];d.appendChild(e)}})}());
