var g_emailListBox=null;snagEmailListBox(0);function formatEmailList(a){var b=g_emailListBox.value;b=b.replace(/^\s+|\s+$/g,"");if(b==""){b=g_emailListBox.innerHTML}if(window.event){key=window.event.keyCode}else{key=a.which}if(key==59){b=b.replace(/;/g,",");b=b.replace(/,[ ]+/g,", ");b=b.replace(/\,+/g,",");g_emailListBox.value=b;g_emailListBox.innerHTML=b}else{if(key==13){b=b.replace(/\n/g,",");b=b.replace(/\,[ ]+/g,", ");b=b.replace(/\,+/g,",");g_emailListBox.value=b;if(!document.all){g_emailListBox.innerHTML=b}}}}function setEmailListEvents(){if(browser.isIE){g_emailListBox.attachEvent("onkeyup",formatEmailList)}else{g_emailListBox.addEventListener("keyup",formatEmailList,false)}}function snagEmailListBox(c){if(c==10){return}var e=document.forms;var d=null;for(var a=0;a<e.length;a++){var b=e[a];if(b.id.indexOf("tmp")==-1&&b.emailList&&typeof(b.emailList)!="undefined"){g_emailListBox=b.emailList;d=b;break}}if(g_emailListBox==null||!g_emailListBox||typeof(g_emailListBox)=="undefined"){setTimeout("snagEmailListBox("+(++c)+");",100)}else{if(g_emailListBox.tagName=="TEXTAREA"){hookEmailList(d)}}}function checkShareBox(){var a=g_emailListBox.value;if(a.value==""||a.innerHTML==""){alert("Please type the emails of some folks you'd like to contact!");return}if(a.indexOf("*FACEBOOK")>-1&&g_FacebookActive=="false"){if(confirm("At least one of the folks you're trying to\nreach is a Facebook friend.\nOkay if we connect you to Facebook?'")){var b=popAndGet("divFacebookLogin",300,200,null,"/FacebookInit_showFacebookLogin.do?verb=doFacebookLogin");return}}postFromPop("shareform","/FBCommunicator_share.do")};