function submit_comment_to_facebook(E,A,D){var C=new Object();C.comment=E;C.url=A+"?utm_source=fbconnect";C.desc=D;C.id="";if(typeof (FB)!=="undefined"){if(C.comment!=null&&C.comment!="What do you think about this vid?"){var B=1;FB.ensureInit(function(){FB.Connect.requireSession(function(){if(B){FB.Facebook.apiClient.users_hasAppPermission("publish_stream",function(F){if(F==0){FB.Connect.showPermissionDialog("publish_stream",function(G){streampublish(C,false,E)})}else{streampublish(C,false,E)}})}else{streampublish(C,false,E)}})})}else{C.comment="";streampublish(C,false,E)}}else{displayFeedback("1Sorry, Facebook is blocked at your location.")}}function streampublish(D,C,F){var A="Post to your profile ?";var E={name:"I have just left a comment on a GoAnimate movie!",caption:D.comment,href:D.url,description:D.desc,media:[{type:"image",src:"http://goanimate.com/static/go/img/fb/comment"+Math.floor(Math.random()*2+1)+".gif?v=1",href:D.url}]};var B=[{text:"GoAnimate",href:"http://goanimate.com"}];FB.Connect.streamPublish(null,E,B,D.id,A,function(H,I){if(H!="null"&&I==null){if(document.saveCommentForm.comment_content!=undefined){document.saveCommentForm.comment_content.disabled=false;document.saveCommentForm.comment_content.value=F;showPleaseWait("Post a Comment",findPosY("waitingAnchor"));postComment("saveCommentForm","prepend","comments","false")}else{var G=document.createElement("input");G.type="hidden";G.name="comment_content";G.id="comment_content";G.value=F;document.saveCommentForm.appendChild(G);showPleaseWait("Post a Comment",findPosY("waitingAnchor"));postComment("saveCommentForm","prepend","comments","false",FB.Facebook.apiClient.get_session().uid)}}},C)};
