function $(e){return document.getElementById(e)?document.getElementById(e):""}function doeval(e){if(null!=e){var t=document.createElement("script");jsCode=e,t.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(t),t.text='try{eval(jsCode);}catch(e){}jsCode="";',t.text="// :-)"}}function AddToBookMark(e,t){if(e||(e="بزرگترین سایت تفریح و سرگرمی"),t||(t="default.htm"),window.sidebar)window.sidebar.addPanel(e,t,"");else if(window.external)window.external.AddFavorite(t,e);else if(window.opera&&window.print){var a=document.createElement("a");a.setAttribute("href",t),a.setAttribute("title",e),a.setAttribute("rel","sidebar"),a.click()}}function GetValue(e){return document.getElementById(e)?"textarea"==document.getElementById(e).type?GetAjaxValue(document.getElementById(e).value):"checkbox"==document.getElementById(e).type?document.getElementById(e).checked?"1":"0":GetAjaxValue(document.getElementById(e).value):""}function GetAjaxValue(e){return e=e.replace(/&/g,"**1**"),e=e.replace(/=/g,"**2**"),e=e.replace(/\+/g,"**3**")}function ChatKeyDown(e){var t;return window.event?t=e.keyCode:e.which&&(t=e.which),t>128?($("Send").innerHTML="
لطفا فقط فینگیلیش تایپ کنید .
",!1):(13==t&&SendNewMessage(),!0)}function AddSmile(e){var t=$("Message").value;$("Message").value=t+e,$("Message").focus()}function getscript(e){return let_out=e,jstr=let_out.split(""),null!=newstr[1]&&doeval(newstr[0])),let_out}function Load(e,t,a,n,i){if(window.XMLHttpRequest)xmlhttp=new XMLHttpRequest,xmlhttp.overrideMimeType&&xmlhttp.overrideMimeType("text/xml");else if(window.ActiveXObject)try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")}catch(o){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}catch(o){xmlhttp=!1}}return xmlhttp?("Get"==i?xmlhttp.open("GET",e,!0):"Post"==i&&(xmlhttp.open("POST",e,!0),xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded")),xmlhttp.onreadystatechange=function(){4==xmlhttp.readyState&&200==xmlhttp.status?(Response=xmlhttp.responseText,Response=getscript(Response),$(t).innerHTML=Response):0!=xmlhttp.readyState&&1!=xmlhttp.readyState&&2!=xmlhttp.readyState&&3!=xmlhttp.readyState||a&&($(t).innerHTML=a)},void xmlhttp.send(n)):(alert("Connect Failure"),!1)}function Show(e,t){Load(e,t,WaitMSG,"","Get")}function Search(){var e=document.getElementById("KeyWord").value;window.location.href="../funsara.com/Search/"+e}function SendNewMessage(){var e=GetValue("Name"),t=GetValue("Message");Load("ChatBox.php","Send",WaitMSG3,"Name="+e+"&Message="+t,"Post")}function SendComment(){var e=GetValue("CommentName"),t=GetValue("CommentWeb"),a=GetValue("CommentEmail"),n=GetValue("UserMessage"),i=GetValue("PostID"),o=GetValue("Private"),r=GetValue("SecCode");Load("Comments.php","CommentStatus",WaitMSG3,"Name="+e+"&SecCode="+r+"&Web="+t+"&Email="+a+"&Message="+n+"&PostID="+i+"&Private="+o,"Post")}function DeleteMSG(e){confirm("آیا از پاک کردن این پیام مطمئن هستید ؟")&&Load("ChatBox.php","Send",WaitMSG3,"id="+e,"Post")}function WriteInDiv(e,t){document.getElementById(e)&&(document.getElementById(e).innerHTML=t)}function ChatBox(){Load("ChatBox.php@Reload=OK","ChatPlace","","","Get"),setTimeout("ChatBox();Empty()",6e4)}function Empty(){WriteInDiv("Send","")}function ReloadChatBox(){Load("ChatBox.php@Reload=OK","ChatPlace","","","Get"),setTimeout("Empty()",3e3)}function OpenComment(){var e=GetValue("PostID");window.open("Comments.php@PostID="+e,"Comment","status=yes,scrollbars=yes,toolbar=no,menubar=no,location=no ,width=535px,height=500px")}function OpenChatBox(){window.open("../funsara.com/ChatBox.php","ChatBox","status=no,scrollbars=yes,toolbar=no,menubar=no,location=no ,width=330px,height=580px")}function NewSecCode(e){Load(e+"?New","SecIMG",Wait1,"","Get")}function NewSecCode2(){$("SecIMG").innerHTML=""}function ChangeTitle(e){document.title=e}function Cancell(){$("Name").value="",$("Message").value=""}function SendYourMessage(){var e=GetValue("E-Mail"),t=GetValue("Form-Message"),a=$("E-Mail").accept,n=$("Form-Message").accept;1==a&&1==n?Load("Send.php","Result",WaitMSG5,"E-Mail="+e+"&Message="+t,"Post"):alert("لطفا تمامی موارد را تکمیل کنید .")}function SendYourFriend(){var e=GetValue("ID"),t=GetValue("Friend-EMail"),a=GetValue("Your-Name"),n=$("Friend-EMail").accept,i=$("Your-Name").accept;1==n&&1==i?($("ToFriend").style.display="none",Load("Send.php","ViewStatus",WaitMSG5,"E-Mail="+t+"&Name="+a+"&ID="+e,"Post")):alert("لطفا تمامی موارد را تکمیل کنید .")}function CheckEmail(){""==GetValue("E-Mail")?WriteInDiv("EmailError","لطفا پست الکترونیک خود را وارد کنید ."):(re=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/,re.test(GetValue("E-Mail"))?(WriteInDiv("EmailError","پست الکترونیک تایید شد ."),$("E-Mail").accept=1):WriteInDiv("EmailError","پست الکترونیک معتبر نمی باشد ."))}function CheckMessage(){""==GetValue("Form-Message")?WriteInDiv("MessageError","لطفا پیام خود را وارد کنید ."):(WriteInDiv("MessageError","متن پیام شما تایید شد ."),$("Form-Message").accept=1)}function CheckFriendEmail(){""==GetValue("Friend-EMail")?(WriteInDiv("ToFriend","لطفا پست الکترونیک خود را وارد کنید ."),$("Friend-EMail").accept=0):(re=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/,re.test(GetValue("Friend-EMail"))?(WriteInDiv("ToFriend","پست الکترونیک تایید شد ."),$("Friend-EMail").accept=1):(WriteInDiv("ToFriend","پست الکترونیک معتبر نمی باشد ."),$("Friend-EMail").accept=0))}function CheckYourName(){""==GetValue("Your-Name")?(WriteInDiv("ToFriend","لطفا پیام خود را وارد کنید ."),$("Your-Name").accept=0):(WriteInDiv("ToFriend","متن پیام شما تایید شد ."),$("Your-Name").accept=1)}function ChangeFontSize(e){switch(e){case 0:$("Content").style.fontSize="11px";break;case 1:$("Content").style.fontSize="12px";break;case 2:$("Content").style.fontSize="13px";break;case 3:$("Content").style.fontSize="14px";break;case 4:$("Content").style.fontSize="15px"}}function ChangeLineHeight(e){switch(e){case 0:document.getElementsByTagName("p")[1].style.margin="3px 0px",document.getElementsByTagName("p")[1].style.lineHeight="1.6em";break;case 1:document.getElementsByTagName("p")[1].style.margin="7px 0px",document.getElementsByTagName("p")[1].style.lineHeight="1.8em";break;case 2:document.getElementsByTagName("p")[1].style.margin="9px 0px",document.getElementsByTagName("p")[1].style.lineHeight="2em"}}var WaitMSG="Please Wait ...",WaitMSG2="










",WaitMSG5="





",WaitMSG3="
",WaitMSG4="
در حال ارسال اطلاعات ...
",xmlhttp=!1;
برای بازشدن صفحه کمی صبر کنید ...