function CheckMessage(Wall) { var ShareButton = document.getElementById('Share'); if(Wall.value == "") ShareButton.disabled = true; else ShareButton.disabled = false; } function CommentsFor(WallID) { var CommentArea = document.getElementById('WallCommentArea_' + WallID); var ViewAll = document.getElementById('ViewAll_' + WallID); ViewAll.innerHTML = 'Loading... Please wait!'; var xmlHttp = new Ajax(); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState == 4) { CommentArea.innerHTML = xmlHttp.responseText; } } xmlHttp.open("GET" , 'http://www.syuf-fyq.com/Wall/Comment/' + WallID + '/', true); xmlHttp.send(null); } function ConvertAND(txt) { return (txt.replace(/&/g , '[AND]')); } function ExpandWall(Expand , Wall) { if(Expand == true) { if(Wall.value == ' What is in your mind?') { Wall.value = ''; Wall.style.color = '#FFFFFF'; } Wall.style.height = '52px'; } else { CheckMessage(Wall); if(Wall.value == '') { Wall.style.height = '20px'; Wall.value = ' What is in your mind?'; Wall.style.color = '#999999'; } } } function GoToWallPage(PageNumber) { var MoreWallPost = document.getElementById('MoreWallPost'); var WallSection = document.getElementById('WallSection'); MoreWallPost.innerHTML = ' Loading...'; var xmlHttp = new Ajax(); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState == 4) { MoreWallPost.style.display = 'none'; MoreWallPost.id = ''; WallSection.innerHTML = WallSection.innerHTML + xmlHttp.responseText; } } xmlHttp.open("GET" , 'http://www.syuf-fyq.com/Wall/Page/' + PageNumber + '/', true); xmlHttp.send(null); } function Share() { var Wall = document.getElementById('WallMessage'); var Share = document.getElementById('Share'); var WallDetails = document.getElementById('Wall_Details'); var Name = Cookie[0]; var Email = Cookie[1]; var Website = Cookie[2]; if(Wall.value == "") { return; } Wall.disabled = true; Share.disabled = true; Name = Name.replace(/"/g , """); Email = Email.replace(/"/g , """); Website = Website.replace(/"/g , """); WallDetails.innerHTML = '
Name:(Required)
E-mail Address:(Required)
Website URL: 
  
'; WallDetails.style.display = 'block'; } function ShowCommentForm(WallID) { var WallCommentForm = document.getElementById('WallCommentForm_' + WallID); var Name = Cookie[0]; var Email = Cookie[1]; var Website = Cookie[2]; Name = Name.replace(/"/g , """); Email = Email.replace(/"/g , """); Website = Website.replace(/"/g , """); var CommentForm = '
 
Name:(Required)
E-mail Address:(Required)
Website URL: 
  
'; WallCommentForm.innerHTML = CommentForm; WallCommentForm.style.display = 'block'; } function WriteWall() { var Name = document.getElementById('Name'); var Email = document.getElementById('Email'); var Website = document.getElementById('Website'); var WallMessage = document.getElementById('WallMessage'); var WallSection = document.getElementById('WallSection'); var WallDetails = document.getElementById('Wall_Details'); var Share = document.getElementById('Share'); var Done = document.getElementById('Done'); if(Name.value == "" || Email.value == "" || WallMessage.value == "") { WallMessage.disabled = false; Share.disabled = false; return; } Name.disabled = true; Email.disabled = true; Website.disabled = true; Done.disabled = true; Done.value = 'Writing...'; Name = ConvertAND(Name.value); Email = ConvertAND(Email.value); Website = ConvertAND(Website.value); WallMessage = ConvertAND(WallMessage.value); var xmlHttp = new Ajax(); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState == 4) { WallSection.innerHTML = xmlHttp.responseText + WallSection.innerHTML; Name = document.getElementById('Name'); Email = document.getElementById('Email'); Website = document.getElementById('Website'); WallMessage = document.getElementById('WallMessage'); WallMessage.value = ''; ExpandWall(false , WallMessage); Name.disabled = false; Email.disabled = false; Website.disabled = false; WallMessage.disabled = false; Share.disabled = false; Done.disabled = false; Done.value = 'Done!'; WallDetails.style.display = 'none'; } } var Param = "Name=" + Name + "&Email=" + Email + "&Website=" + Website + "&Message=" + WallMessage; Cookie[0] = Name; Cookie[1] = Email; Cookie[2] = Website; xmlHttp.open("POST" , 'http://www.syuf-fyq.com/Wall/Write/', true); xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.send(Param); } function WriteWallComment(WallID) { var Name = document.getElementById('Name_' + WallID); var Email = document.getElementById('Email_' + WallID); var Website = document.getElementById('Website_' + WallID); var Message = document.getElementById('Message_' + WallID); var CommentArea = document.getElementById('WallCommentArea_' + WallID); var CommentForm = document.getElementById('WallCommentForm_' + WallID); var SendComment = document.getElementById('SendComment_' + WallID); if(Name.value == "" || Email.value == "" || Message.value == "") { return; } Name.disabled = true; Email.disabled = true; Website.disabled = true; Message.disabled = true; SendComment.disabled = true; SendComment.value = 'Sending...'; Name = ConvertAND(Name.value); Email = ConvertAND(Email.value); Website = ConvertAND(Website.value); Message = ConvertAND(Message.value); var xmlHttp = new Ajax(); xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState == 4) { CommentArea.innerHTML = CommentArea.innerHTML + xmlHttp.responseText; Name = document.getElementById('Name_' + WallID); Email = document.getElementById('Email_' + WallID); Website = document.getElementById('Website_' + WallID); Message = document.getElementById('Message_' + WallID); Name.disabled = false; Email.disabled = false; Website.disabled = false; Message.disabled = false; SendComment.disabled = false; SendComment.value = 'Send!'; CommentForm.style.display = 'none'; } } var Param = "Name=" + Name + "&Email=" + Email + "&Website=" + Website + "&Message=" + Message; Cookie[0] = Name; Cookie[1] = Email; Cookie[2] = Website; xmlHttp.open("POST" , 'http://www.syuf-fyq.com/Wall/Comment/' + WallID + '/Write/', true); xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlHttp.send(Param); } var Cookie = new Array("" , "" , "");