
var g_resxStrings={};g_resxStrings["RemoveProjectAreYouSure"]='בודאות? למחוק את הפרויקט? שים לב - לא ניתן לשחזר הפרויקט לאחר מחיקתו. ';g_resxStrings["RestoreSubmissionAreYouSure"]='בודאות? לשחזר טקסט זה? אם תשחזר את הטקסט הוא יתווסף לפרויקט זה. לשחזור הטקסט לחץ על אישור. ';g_resxStrings["NoBlankFeedback"]='שכחת לחבר משוב? אינך יכול לשלוח משוב בלי להזין דבר מה בתיבת הטקסט ';g_resxStrings["DeleteCommentAreYouSure"]='בודאות? למחוק הערה זו? ';g_resxStrings["UIDirection"]='RTL';g_resxStrings["CancelFeedbackAreYouSure"]='אם תבטל כעת, המשוב שחיברת לא יישמר. האם לבטל המשוב?';g_resxStrings["NoSavedTips"]='טרם שמרת עצות לכתיבה יוצרת ';g_resxStrings["EnterASubject"]='אנא הזן נושא. ';g_resxStrings["EnterAMessage"]='אנא הזן הודעה. ';g_resxStrings["Sending"]='שולח... ';g_resxStrings["SpecifyEmailAddress"]='עליך להגדיר/לציין כתובת דוא\"ל מדוייקת של הנמען ';g_resxStrings["Searching"]='מחפש... ';g_resxStrings["SelectAFriend"]='אנא בחר לפחות חבר אחד ';g_resxStrings["Adding"]='מוסיף... ';g_resxStrings["SavingAndClosing"]='שומר וסוגר ';g_resxStrings["NoMoreThanXCharacters"]='אנא הוסף עד {0}  דמויות ';g_resxStrings["Chosen"]='נבחר ';g_resxStrings["Rejected"]='הבקשה נדחתה ';g_resxStrings["Spotlighted"]='Spotlighted';g_resxStrings["Underdogged"]='Underdogged';g_resxStrings["SpotlightUnderdogOff"]='off';g_resxStrings["RejectProjConfirmMsg"]='This will reject the project from publication and un-freeze it.  Continue?';g_resxStrings["PublicationProjConfirmMsg"]='You are selecting this project for publication.  Continue?';g_resxStrings["SpotlightProjConfirmMsg"]='You are putting this project in the spotlight.  Continue?';g_resxStrings["UnderdogProjConfirmMsg"]='You are setting this project as underdog.  Continue?';g_resxStrings["ApprovePageDelete"]='The deletion of a marketing page is irreversible and will cause links to this page to be broken. Are you sure?';g_resxStrings["ApprovePromoDelete"]='The deletion of a marketing promo is irreversible. Are you sure?';g_resxStrings["ApplyMarketingConfirmMsg"]='Apply this version?';g_resxStrings["Processing"]='מעבד ';g_resxStrings["OneWord"]='מילה אחת ';g_resxStrings["NWords"]='{0} מילים ';g_resxStrings["Reviews_SubmitReviewConfirm"]='בודאות? להגיש את הנוסח המעודכן של הביקורת? אחרי לחיצה על כפתור האישור לא ניתן לערוך נוסח הביקורת. ';g_resxStrings["ConfirmCloseWizard"]='Please note that your submission will not be saved if you cancel now. Are you sure you want to Cancel?';g_resxStrings["ManuscriptSample"]='Manuscript Sample';g_resxStrings["BookProposal"]='Book Proposal';g_resxStrings["ManuscriptSampleTitle"]='Step 5/6 - Manuscript Sample';g_resxStrings["BookProposalSampleTitle"]='Step 5/6 - Book Proposal';g_resxStrings["ManuscriptSampleTip"]='Insert your manuscript sample below. Most agents require anything from the first chapter to the first 50 pages of your manuscript. Be sure to check with each agent’s submission requirements and follow them as closely as possible.';g_resxStrings["BookProposalSampleTip"]='Insert your proposal below. For tips on writing proposals and to see examples of winning proposals, click here.';g_resxStrings["noAgentSelectedWarning"]='You haven\'t selected any agent. If you click \"Save &amp; Close\" your information will be saved but your project will not be submitted until you select agent/s from the list. Click \"Back\" if you want to choose agents now.';function SetupTop()
{if(navigator.vendor=="Apple Computer, Inc."||navigator.vendor=="KDE"){(function(c){for(var i in c)
window["HTML"+i+"Element"]=document.createElement(c[i]).constructor;})({Html:"html",Head:"head",Link:"link",Title:"title",Meta:"meta",Base:"base",IsIndex:"isindex",Style:"style",Body:"body",Form:"form",Select:"select",OptGroup:"optgroup",Option:"option",Input:"input",TextArea:"textarea",Button:"button",Label:"label",FieldSet:"fieldset",Legend:"legend",UList:"ul",OList:"ol",DList:"dl",Directory:"dir",Menu:"menu",LI:"li",Div:"div",Paragraph:"p",Heading:"h1",Quote:"q",Pre:"pre",BR:"br",BaseFont:"basefont",Font:"font",HR:"hr",Mod:"ins",Anchor:"a",Image:"img",Object:"object",Param:"param",Applet:"applet",Map:"map",Area:"area",Script:"script",Table:"table",TableCaption:"caption",TableCol:"col",TableSection:"tbody",TableRow:"tr",TableCell:"td",FrameSet:"frameset",Frame:"frame",IFrame:"iframe"});function HTMLElement(){}
HTMLElement.prototype=HTMLHtmlElement.__proto__.__proto__;var HTMLDocument=document.constructor;var HTMLCollection=document.links.constructor;var HTMLOptionsCollection=document.createElement("select").options.constructor;var Text=document.createTextNode("").constructor;var Node=Text;}
if(window.HTMLElement&&!IsContainsSupported())
{HTMLElement.prototype.contains=function(child)
{if(typeof(child)=='string'){child=document.getElementById(child);}
if(!child){return false;}
if(child.parentNode===this){return true;}
if(child===document.body){return false;}
return this.contains(child.parentNode);}}}
function IsContainsSupported()
{var oTopInit1=document.getElementById("TopInit1");var oTopInit2=document.getElementById("TopInit2");try
{return oTopInit1.contains(oTopInit2);}
catch(e)
{return false;}}
String.prototype.trim=function()
{var str=this;var str=str.replace(/^\s\s*/,''),ws=/\s/,i=str.length;while(ws.test(str.charAt(--i)));return str.slice(0,i+1);};String.prototype.endsWith=function(s)
{var reg=new RegExp(s+"$");return reg.test(this);}
String.prototype.startsWith=function(s)
{var reg=new RegExp("^"+s);return reg.test(this);}
function GetEvent(e)
{if(!e)
{e=window.event;}
return e;}
function GetEventSrcElement(e)
{e=GetEvent(e);var srcElement=e.srcElement;if(!srcElement)
{srcElement=e.target;}
return srcElement;}
function GetDocumentSize()
{var docSize={};var htmlHeight=(document.body.scrollHeight>document.body.offsetHeight)?document.body.scrollHeight:document.body.offsetHeight;var htmlWidth=(document.body.scrollWidth>document.body.offsetWidth)?document.body.scrollWidth:document.body.offsetWidth;var visibleHeight=GetVisibleArea().height;if(htmlHeight>=visibleHeight)
{docSize.height=htmlHeight;docSize.width=htmlWidth;docSize.visibleHeight=visibleHeight;}
else
{docSize.height=visibleHeight;docSize.width=htmlWidth;docSize.visibleHeight=visibleHeight;}
return docSize;}
function GetVisibleArea()
{var visibleArea={};var intH=0,intW=0;if(self.innerHeight)
{intH=window.innerHeight;intW=window.innerWidth;}
else
{if(document.documentElement&&document.documentElement.clientHeight)
{intH=document.documentElement.clientHeight;intW=document.documentElement.clientWidth;}
else
{if(document.body)
{intH=document.body.clientHeight;intW=document.body.clientWidth;}}}
visibleArea.height=parseInt(intH,10);visibleArea.width=parseInt(intW,10);return visibleArea;}
function GetVerticalScrollOffset()
{var bodyScrollTop=document.body.scrollTop;var documentElementScrollTop=document.documentElement.scrollTop;var windowPageYOffset=window.pageYOffset;if(bodyScrollTop===undefined){bodyScrollTop=-1;}
if(documentElementScrollTop===undefined){documentElementScrollTop=-1;}
if(windowPageYOffset===undefined){windowPageYOffset=-1;}
return Math.max(Math.max(bodyScrollTop,documentElementScrollTop),windowPageYOffset);}
function ajaxCall(strUrl,callbackFunction,postArray)
{strUrl=AddUrlParam(strUrl,"rand",Math.random());var req;var processReqChange=function()
{if(req.readyState==4)
{var status;try
{status=req.status;}
catch(e)
{return;}
if(status==200)
{var strResponseText=req.responseText.trim();if(strResponseText.indexOf('<reporterror>')==0)
{alert(ExtractContents(strResponseText,'<reporterror>','</reporterror>'));return;}
else if(strResponseText.indexOf('<js>')==0)
{var js=ExtractContents(strResponseText,'<js>','</js>');eval(js);}
else if(strResponseText.indexOf('<json>')==0)
{var strJson=ExtractContents(strResponseText,'<json>','</json>');callbackFunction(ConvertStringToJson(strJson));}
else if(strResponseText.indexOf('<htmlandjson-29529387298>')==0)
{var html=strResponseText.substring(strResponseText.indexOf('<html-29529387298>')+18,strResponseText.indexOf('</html-29529387298>'));var strJson=strResponseText.substring(strResponseText.indexOf('<json-29529387298>')+18,strResponseText.indexOf('</json-29529387298>'));callbackFunction(html,ConvertStringToJson(strJson));}
else
{callbackFunction(strResponseText);}}
else
{if(g_bDebugMode)
{var strReason;if(req.responseText.indexOf('Compilation Error')>=0)
{strReason="Compilation Error";}
else if(req.statusText.toLowerCase()=="unknown")
{strReason="Unknown.  Check your network connection.";}
else
{strReason=req.statusText;alert(req.responseText);}
alert("There was a problem retrieving the response:\n"+strReason);}}}}
if(window.XMLHttpRequest)
{req=new XMLHttpRequest();}
else if(window.ActiveXObject)
{req=new ActiveXObject("Microsoft.XMLHTTP");}
if(req)
{req.onreadystatechange=processReqChange;if(postArray!==undefined)
{req.open("POST",strUrl,true);req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');req.send(FormatQueryNameValuePairs(postArray));}
else
{req.open("GET",strUrl,true);if(window.XMLHttpRequest)
{req.send(null);}
else if(window.ActiveXObject)
{req.send();}}}}
function ConvertStringToJson(strJson)
{strJson=strJson.replace(/\t/g,'');strJson=strJson.replace(/\r/g,'');strJson=strJson.replace(/\n/g,'');return eval('x='+(strJson||'null'));}
function ExtractContents(strVal,strStartTag,strEndTag)
{var strContents=strVal.substr(strStartTag.length);strContents=strContents.substr(0,strContents.length-strEndTag.length);return strContents;}
function Link(strPath,queryArray)
{return BuildLink("http",strPath,queryArray);}
function LinkSecure(strPath,queryArray)
{if(g_bUseHttps)
{return BuildLink("https",strPath,queryArray);}
else
{return BuildLink("http",strPath,queryArray);}}
function LinkSmart(strPath,queryArray)
{if(g_bUseHttps&&window.location.protocol=="https:")
{return LinkSecure(strPath,queryArray);}
else
{return Link(strPath,queryArray);}}
function BuildLink(strPrefix,strPath,queryArray)
{strLink=strPrefix+"://"+g_strHostName;if(strPath!="")
{strLink+="/"+strPath;}
if(queryArray&&queryArray.length>0)
{strLink+="?"+FormatQueryNameValuePairs(queryArray);}
return strLink;}
function FormatQueryNameValuePairs(queryArray)
{if(queryArray&&queryArray.length%2!=0)
{throw"error!";}
var strQuery="";if(queryArray&&queryArray.length>0)
{for(var i=0;i<queryArray.length;i+=2)
{strQuery+=FormatQueryNameValuePair(queryArray[i],queryArray[i+1]);if(i<queryArray.length-2)
{strQuery+="&";}}}
return strQuery;}
function FormatQueryNameValuePair(strName,strValue)
{return encodeURIComponent(strName)+"="+encodeURIComponent(strValue);}
function AddDestinationUrlParam(strUrl,strName,strValue)
{if(strValue!=null&&strValue!="")
{strUrl=AddUrlParam(strUrl,strName,strValue);}
return strUrl;}
function AddUrlParam(strUrl,strName,strValue)
{if(strUrl.indexOf("?")>0)
{return strUrl+"&"+FormatQueryNameValuePair(strName,strValue);}
else
{return strUrl+"?"+FormatQueryNameValuePair(strName,strValue);}}
function SetCookie(sName,sValue)
{date=new Date();document.cookie=sName+"="+escape(sValue)+"; expires=Fri, 31 Dec 2099 23:59:59 GMT;";}
function GetCookie(sName)
{var aCookie=document.cookie.split("; ");for(var i=0;i<aCookie.length;i++)
{var aCrumb=aCookie[i].split("=");if(sName==aCrumb[0])
return unescape(aCrumb[1]);}
return null;}
function DelCookie(sName)
{document.cookie=sName+"=; expires=Fri, 21 Dec 1976 04:31:24 GMT;";}
function RequestStr(strName)
{var query=window.location.search.substring(1);var vars=query.split("&");for(var i=0;i<vars.length;i++)
{var pair=vars[i].split("=");if(pair[0]==strName)
{return decodeURIComponent(pair[1]);}}
return null;}
function AttachEvent(oElement,strEventName,strFunction)
{if(oElement.addEventListener)
{oElement.addEventListener(strEventName,strFunction,false);}
else if(oElement.attachEvent)
{oElement.attachEvent("on"+strEventName,strFunction);}}
var g_bIsIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;function ConvertHTMLStringToDomNode(strHTML)
{var oParentDiv=document.createElement("div");oParentDiv.innerHTML=strHTML;return oParentDiv.firstChild;}
function IsRealMouseOut(e,oItem)
{if(e.type!='mouseout')
{return false;}
var oTarget;if(e.relatedTarget)
{oTarget=e.relatedTarget;}
else
{oTarget=e.toElement;}
return(!oItem.contains(oTarget));}
function StringFormat(strString)
{for(var i=1;i<arguments.length;i++)
{strString=strString.replace("{"+(i-1)+"}",arguments[i]);}
return strString;}
function SelectTab(strTabRowId,oTabToSelect)
{var strSelectedTabId='selectedTab_'+strTabRowId;var selectedTab=document.getElementById(strSelectedTabId);if(selectedTab!=null)
{selectedTab.className='tabRowLi unSelectedTab';selectedTab.id='';}
oTabToSelect.className='tabRowLi selectedTab';oTabToSelect.id=strSelectedTabId;}
function ShowTabMenu(strMenuId)
{var oMenu=document.getElementById(strMenuId);oMenu.style.display="";}
function HideTabMenu(e,oMenu)
{if(IsRealMouseOut(e,oMenu))
{oMenu.style.display="none";}}
var g_splashScreen=null;function SplashScreen(strLink,strWidth,successCallbackFn,failureCallbackFn,onLoadCallbackFn)
{var _this=this;g_splashScreen=_this;_this.m_successCallbackFn=successCallbackFn;_this.m_failureCallbackFn=failureCallbackFn;_this.splash=document.createElement("div");_this.splash.className="splashScreen";var docSize=GetDocumentSize();_this.splash.style.height=docSize.height+"px";document.body.appendChild(_this.splash);var iMinPxFromTopOfScreen=100;var iMaxPopupHeightForScreen=docSize.visibleHeight-iMinPxFromTopOfScreen;var fnLoadPopup=function(strHtml,json)
{_this.popupWrapper=document.createElement("div");_this.popupWrapper.className="splashScreenPopupWrapper";var popup=document.createElement("div");popup.innerHTML=strHtml;popup.className="splashScreenPopup";popup.style.width=strWidth;_this.popupWrapper.appendChild(popup);document.body.appendChild(_this.popupWrapper);var iPopupHeight=popup.clientHeight;var iCenterScreen=GetVerticalScrollOffset()+(docSize.visibleHeight/2);var iPopupTop=iCenterScreen-(iPopupHeight/2);if(iPopupTop<iMinPxFromTopOfScreen)
{iPopupTop=iMinPxFromTopOfScreen;}
_this.popupWrapper.style.top=iPopupTop+"px";if(onLoadCallbackFn)
{onLoadCallbackFn(json);}}
ajaxCall(strLink,fnLoadPopup,["max_popup_height_for_screen",iMaxPopupHeightForScreen]);}
SplashScreen.prototype.Close=function()
{var _this=this;document.body.removeChild(_this.splash);document.body.removeChild(_this.popupWrapper);g_splashScreen=null;}
SplashScreen.prototype.OnSuccess=function()
{var _this=this;if(_this.m_successCallbackFn)
{_this.m_successCallbackFn();}
_this.Close();}
SplashScreen.prototype.OnFailure=function()
{var _this=this;if(_this.m_failureCallbackFn)
{_this.m_failureCallbackFn();}
_this.Close();}
function LoadHTMLContent(strId,strHTML)
{document.getElementById(strId).innerHTML=strHTML;}
function PopupConfirm(strCallbackFn,strActionFn,strTitle,strText,strId,strDivId)
{new SplashScreen(LinkSmart("ajax.aspx",["fn","popup_confirm_display","actionFn",strActionFn,"title",strTitle,"text",strText,"id",strId,"divId",strDivId]),"300px",strCallbackFn,strCallbackFn);}
function PopupConfirmAction(strActionFn,strId,strDivId)
{if(strActionFn=="none")
{return;}
var fn=function(strResult){LoadHTMLContent(strDivId,strResult);}
var strLink=Link("ajax.aspx",["fn",strActionFn,"id",strId]);ajaxCall(strLink,fn);}
function PopupTextSubmit(strLabel,strTitle,strActionFn,strId,strDivId,iWidth,iHeight,bShowText,iTextLength,strPreTextLabel,strWithTextLabel,bUseSecondLink,bIsSecondLink,strSecondDivId,strSecondLabel,strSecondWithTextLabel,strCallbackFn)
{var text=document.getElementById("popup_text_submit_hidden_text_"+strId).value;new SplashScreen(LinkSmart("ajax.aspx",["fn","popup_text_submit_display","label",strLabel,"title",strTitle,"text",text,"actionFn",strActionFn,"id",strId,"divId",strDivId,"w",iWidth,"h",iHeight,"showText",bShowText,"textLength",iTextLength,"preText",strPreTextLabel,"withTextLabel",strWithTextLabel,"useSecond",bUseSecondLink,"isSecond",bIsSecondLink,"secondDivId",strSecondDivId,"secondLabel",strSecondLabel,"secondWithTextLabel",strSecondWithTextLabel]),iWidth+"px",strCallbackFn,strCallbackFn);}
function PopupTextSubmitAction(strLabel,strTitle,strActionFn,strId,strDivId,iWidth,iHeight,bShowText,iTextLength,strPreTextLabel,strWithTextLabel,bUseSecondLink,bIsSecondLink,strSecondDivId,strSecondLabel,strSecondWithTextLabel)
{var text=document.getElementById("popup_text_submit_user_entered_text_"+strId).value;var fnResult=function(result){var bSuccess=result.bSuccess;var strError=result.error;if(bSuccess<1){var fn=function(strResult){LoadHTMLContent("popup_text_submit_box",strResult);}
var strLink=Link("ajax.aspx",["fn","popup_text_submit_display","label",strLabel,"title",strTitle,"actionFn",strActionFn,"id",strId,"divId",strDivId,"w",iWidth,"h",iHeight,"showText",bShowText,"textLength",iTextLength,"preText",strPreTextLabel,"withTextLabel",strWithTextLabel,"useSecond",bUseSecondLink,"isSecond",bIsSecondLink,"secondDivId",strSecondDivId,"secondLabel",strSecondLabel,"secondWithTextLabel",strSecondWithTextLabel,"error",strError]);var postInputArray=["text",text];ajaxCall(strLink,fn,postInputArray);}
else if(bSuccess>0){g_splashScreen.OnSuccess();var fn=function(strResult){LoadHTMLContent(strDivId,strResult);}
var strLink=Link("ajax.aspx",["fn",strActionFn,"label",strLabel,"title",strTitle,"actionFn",strActionFn,"id",strId,"divId",strDivId,"w",iWidth,"h",iHeight,"showText",bShowText,"textLength",iTextLength,"preText",strPreTextLabel,"withTextLabel",strWithTextLabel,"useSecond",bUseSecondLink,"isSecond",false,"secondDivId",strSecondDivId,"secondLabel",strSecondLabel,"secondWithTextLabel",strSecondWithTextLabel]);var postInputArray=["text",text];ajaxCall(strLink,fn,postInputArray);if(bUseSecondLink=true){var fn2=function(strResult2){LoadHTMLContent(strSecondDivId,strResult2);}
var strLink2=Link("ajax.aspx",["fn",strActionFn,"label",strLabel,"title",strTitle,"actionFn",strActionFn,"id",strId,"divId",strDivId,"w",iWidth,"h",iHeight,"showText",bShowText,"textLength",iTextLength,"preText",strPreTextLabel,"withTextLabel",strWithTextLabel,"useSecond",bUseSecondLink,"isSecond",true,"secondDivId",strSecondDivId,"secondLabel",strSecondLabel,"secondWithTextLabel",strSecondWithTextLabel]);var postInputArray2=["text",text];ajaxCall(strLink2,fn2,postInputArray2);}}}
var strLink=Link("ajax.aspx",["fn","literary_agent_update_note"]);var postInputArray=['id',strId,'text',text];ajaxCall(strLink,fnResult,postInputArray);}
function WEbookConfirm(strConfirmText,strCallbackSuccess,strCallbackCancel)
{new SplashScreen(LinkSmart("ajax.aspx",["fn","popup_confirm_display","actionFn","none","title","","text",strConfirmText,"id",null,"divId",null]),"300px",strCallbackSuccess,strCallbackCancel);}
var g_bIsSendingMessage=false;function ComposeMessage_Send(strId,strToMemberId,strFrom,bPopup)
{if(!g_bIsSendingMessage)
{var strMsgSubjectText=document.getElementById('msgSubjectText'+strId).value;var strMessageText=document.getElementById('messageText'+strId).value;if(strMsgSubjectText==""){alert(g_resxStrings.EnterASubject);return;}
else if(strMessageText==""){alert(g_resxStrings.EnterAMessage);return;}
g_bIsSendingMessage=true;document.getElementById("sendButton_"+strId).innerHTML=g_resxStrings.Sending;var fnComposeMessageResult=function(strResult)
{document.getElementById("compose_message_control").innerHTML=strResult;g_bIsSendingMessage=false;}
var strLink=Link("ajax.aspx",["fn","compose_message_send"]);var postInputArray=['to',strToMemberId,'subject',strMsgSubjectText,'message',strMessageText,'from',strFrom,'popup',bPopup];ajaxCall(strLink,fnComposeMessageResult,postInputArray);}}
function ShowComposeMessageSplashScreen(strToMemberId,callbackFn)
{new SplashScreen(Link("ajax.aspx",["fn","compose_message_display","popup","true","to",strToMemberId]),"550px",callbackFn,callbackFn);}
function AgentComposeMessageSplash(strToMemberId,strSubject){new SplashScreen(Link("ajax.aspx",["fn","agent_compose_message_display","popup","true","to",strToMemberId,"subject",strSubject]),"550px",null,null);}
function ConfirmMsgDelete(strMsgId,iStart)
{new SplashScreen(Link("ajax.aspx",["fn","message_panel_delete_splash","popup","true","message_id",strMsgId,"start",iStart]),"250px",null,null);}
var g_inviteAFriend=null;var g_bIsSendingInvite=false;var g_strFirstLoginRefLink=null;function InitOverrideDestinationUrl()
{g_inviteAFriend=new OverrideDestinationUrl();}
function OverrideDestinationUrl()
{;}
OverrideDestinationUrl.prototype.GetDestinationUrl=function()
{return Link("");}
function LoadJs(filename)
{var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src",filename)
if(typeof fileref!="undefined")
document.getElementsByTagName("head")[0].appendChild(fileref)}
function LoadPlaxoJs()
{LoadJs('http://www.plaxo.com/css/m/js/util.js');LoadJs('http://www.plaxo.com/css/m/js/basic.js');LoadJs('http://www.plaxo.com/css/m/js/abc_launcher.js');}
function ShowInviteAFriendSplashScreen(callbackFn)
{LoadPlaxoJs();new SplashScreen(Link("ajax.aspx",["fn","invite_a_friend_display","popup","true"]),"400px",callbackFn,callbackFn);}
function ShowInviteAFriendSplashScreenForProject(strProjectId)
{LoadPlaxoJs();new SplashScreen(Link("ajax.aspx",["fn","invite_a_friend_display","popup","true","bProject","true","strId",strProjectId]),"400px",null,null);}
function ShowInviteNewFriendsSplashScreen(to,callbackFn)
{LoadPlaxoJs();new SplashScreen(Link("ajax.aspx",["fn","invite_new_friends_display","popup","true","to",to]),"400px",InviteAFriend_Redirect,callbackFn);}
function ShowFindFriendsSplashScreen(callbackFn)
{LoadPlaxoJs();new SplashScreen(Link("ajax.aspx",["fn","invite_a_friend_display","popup","true","bConnectFriends","true"]),"435px",callbackFn,callbackFn);}
function ShowFoundFriendsSplashScreen(strTo,callbackFn)
{LoadPlaxoJs();new SplashScreen(Link("ajax.aspx",["fn","invite_a_friend_found_friends_display","popup","true","to",strTo]),"400px",InviteAFriend_Redirect,callbackFn);}
function ShowAddFriendsSuccessSplashScreen(bInviteMore,callbackFn)
{LoadPlaxoJs();new SplashScreen(Link("ajax.aspx",["fn","invite_a_friend_add_friends_success_display","popup","true","bInviteMore",bInviteMore]),"400px",InviteAFriend_Redirect,callbackFn);}
function InviteAFriend_Redirect()
{if(g_strFirstLoginRefLink!=null)
window.location=g_strFirstLoginRefLink;}
function InviteAFriend_FindFriends(strId)
{var strTo=document.getElementById("inviteTo"+strId).value;if(strTo=="")
{alert(g_resxStrings.SpecifyEmailAddress);return;}
document.getElementById("resultMsg"+strId).innerHTML=g_resxStrings.Searching;var fnInviteAFriendResult=function(jsonResult)
{document.getElementById("resultMsg"+strId).innerHTML=jsonResult.resultHtml;if(jsonResult.bSuccess)
{g_splashScreen.OnSuccess();ShowFoundFriendsSplashScreen(strTo,null);}}
var strLink=Link("ajax.aspx",["fn","invite_a_friend_find_friends"]);var postInputArray=['to',strTo];ajaxCall(strLink,fnInviteAFriendResult,postInputArray);}
function InviteAFriend_SendMail(strId,bPopup)
{if(!g_bIsSendingInvite)
{var strTo=document.getElementById("inviteTo"+strId).value;if(strTo=="")
{alert(g_resxStrings.SpecifyEmailAddress);return;}
g_bIsSendingInvite=true;document.getElementById("resultMsg"+strId).innerHTML=g_resxStrings.Sending;var strFrom=document.getElementById("inviteFrom"+strId).value;var strMessage=document.getElementById("inviteMessage"+strId).value;var fnInviteAFriendResult=function(jsonResult)
{document.getElementById("resultMsg"+strId).innerHTML=jsonResult.resultHtml;g_bIsSendingInvite=false;if(bPopup&&jsonResult.bSuccess)
{g_splashScreen.OnSuccess();}}
var strLink=Link("ajax.aspx",["fn","invite_a_friend_send"]);var postInputArray=['to',strTo,'from',strFrom,'message',strMessage,'location',window.location];postInputArray.push("destination_url");if(g_inviteAFriend!=null)
{postInputArray.push(g_inviteAFriend.GetDestinationUrl());}
else
{postInputArray.push(window.location);}
ajaxCall(strLink,fnInviteAFriendResult,postInputArray);}}
function InviteAFriend_Clear(strId)
{document.getElementById("inviteTo"+strId).value="";document.getElementById("inviteFrom"+strId).value="";document.getElementById("inviteMessage"+strId).value="";document.getElementById("resultMsg"+strId).innerHTML="";}
function InviteAFriend_CheckAll()
{var e=document.getElementsByName("friendsToInvite");for(i=0;i<e.length;i++)
{e[i].checked=true;}}
function InviteAFriend_UnCheckAll()
{var e=document.getElementsByName("friendsToInvite");for(i=0;i<e.length;i++)
{e[i].checked=false;}}
function InviteAFriend_AddFriends(strId)
{var e=document.getElementsByName("friendsToInvite");var selected=new Array();for(i=0;i<e.length;i++)
{if(e[i].checked)
{selected.push(e[i].value);}}
if(selected.length==0)
{alert(g_resxStrings.SelectAFriend);return;}
document.getElementById("resultMsg"+strId).innerHTML=g_resxStrings.Adding;var fnInviteAFriendResult=function(jsonResult)
{document.getElementById("resultMsg"+strId).innerHTML=jsonResult.resultHtml;if(jsonResult.bSuccess)
{g_splashScreen.OnSuccess();if(g_strFirstLoginRefLink)
{ShowAddFriendsSuccessSplashScreen("true",null);}
else
{ShowAddFriendsSuccessSplashScreen("false",null);}}}
var strLink=Link("ajax.aspx",["fn","invite_a_friend_add_friends"]);var postInputArray=['selected',selected];ajaxCall(strLink,fnInviteAFriendResult,postInputArray);}
function Show(section)
{var sectionsToHide=getElementsByClass("show");for(var i=0;i<sectionsToHide.length;i++)
{sectionsToHide[i].className="hidden";}
var sectionToShow=document.getElementById(section);if(sectionToShow)
{sectionToShow.className="show";}}
function getElementsByClass(searchClass)
{var classElements=new Array();var node=document;var tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp('(^|\\s)'+searchClass+'(\\s|$)');for(i=0,j=0;i<elsLen;i++)
{if(pattern.test(els[i].className))
{classElements[j]=els[i];j++;}}
return classElements;}
var g_clickedPromoElement;function editPromoInWindow(promoElement,promoId)
{g_clickedPromoElement=promoElement;var editPromoUrl=Link("admin/marketingPromo.aspx",["promo",promoId,"popup","true"]);var win=window.open(editPromoUrl,"EditPromo","resizable=yes,scrollbars=yes,width=1000,height=700,status=yes");if(win!=null)
win.focus();}