var PostListPosition = 226;
function ChangeColor(td , command)
{
if(command == 'out')
td.bgColor = '#05446F';
else
td.bgColor = '#03243A';
}
function ChangeColorBlogger(td , command)
{
if(command == 'out')
{
td.bgColor = '#05446F';
td.style.color = '#5AA0D4';
}
else
{
td.bgColor = '#5AA0D4';
td.style.color = '#05446F';
}
}
function convertAND(txt)
{
return (txt.replace(/&/g , '[AND]'));
}
function getComment(id)
{
var Loader = document.getElementById('ViewLoader');
Loader.innerHTML = '
';
var CommentArea = document.getElementById('CommentArea');
var xmlHttp = new Ajax();
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState == 4)
{
Loader.innerHTML = '';
CommentArea.innerHTML = xmlHttp.responseText;
CommentArea.style.display = 'block';
}
}
var Method = 'POST';
if(document.getElementById('Password'))
{
var Password = document.getElementById('Password').value;
Password = convertAND(Password);
var Param = 'pass=' + Password;
}
else
{
var Param = null;
Method = 'GET';
}
xmlHttp.open(Method , 'http://www.syuf-fyq.com/Blog/Comment/' + id + '/', true);
if(Method == 'POST')
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.send(Param);
}
function getPost(id , seq)
{
var Loader = document.getElementById('PostLoader' + seq);
var Method = 'POST';
if(document.getElementById('Password'))
{
var Password = document.getElementById('Password').value;
Password = convertAND(Password);
var Param = 'pass=' + Password;
}
else
{
var Param = null;
Method = 'GET';
}
Loader.innerHTML = '
';
var EntrySection = document.getElementById('EntrySection');
var PostSection = document.getElementById('PostSection');
PostListPosition = document.body.scrollTop;
var xmlHttp = new Ajax();
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState == 4)
{
Loader.innerHTML = ' ';
PostSection.style.display = 'none';
EntrySection.innerHTML = xmlHttp.responseText;
EntrySection.style.display = 'block';
Scroll(226);
}
}
xmlHttp.open(Method , 'http://www.syuf-fyq.com/Blog/View/' + id + '/' , true);
if(Method == 'POST')
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.send(Param);
}
function goArchive(URL)
{
location.href = 'http://www.syuf-fyq.com/Blog' + URL;
}
function PutEmo(EmoCode , IsPopup)
{
var CommentBody = document.getElementById('CommentBody');
CommentBody.focus();
if(document.selection)
{
var Range = document.selection.createRange();
Range.text = EmoCode;
}
else if(CommentBody.selectionStart || CommentBody.selectionStart == 0)
{
var LeftString = CommentBody.value.substr(CommentBody.value[0] , CommentBody.selectionStart);
var RightString = CommentBody.value.substr(CommentBody.selectionEnd , CommentBody.value.length - CommentBody.selectionEnd);
CommentBody.value = LeftString + EmoCode + RightString;
}
if(IsPopup == true)
{
var EmoPopup = document.getElementById('EmoPopup');
EmoPopup.style.display = 'none';
EmoPopup.innerHTML = '';
}
}
function PutName(Name , Website)
{
document.getElementById('Name').value = Name;
document.getElementById('Email').value = '';
document.getElementById('URL').value = Website;
if(Website == '')
{
document.getElementById('Blog2').checked = true;
document.getElementById('URL').disabled = true;
}
else
{
document.getElementById('Blog1').checked = true;
document.getElementById('URL').disabled = false;
}
}
function selectBlogger(URL)
{
location.href = URL;
}
function SearchName(Name)
{
Name = Name.value;
var Suggestion = document.getElementById('NameSuggestion');
if(Name.length < 2)
{
Suggestion.style.display = 'none';
return;
}
Name = convertAND(Name);
var xmlHttp = new Ajax();
xmlHttp.onreadystatechange=function()
{
if(xmlHttp.readyState == 4)
{
var Response = xmlHttp.responseText;
if(Response != '')
{
Suggestion.style.display = 'block';
Suggestion.innerHTML = Response;
}
}
}
Param = 'Name=' + Name;
xmlHttp.open('POST' , 'http://www.syuf-fyq.com/Blog/Search/Name/', true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.send(Param);
}
function SendComment(pid)
{
var Loader = document.getElementById('CommentLoader');
Loader.innerHTML = '
';
var Name = document.getElementById('Name').value;
var Email = document.getElementById('Email').value;
var URL = '';
var Password = '';
if(document.getElementById('URL').disabled == false)
{
URL = document.getElementById('URL').value;
}
if(document.getElementById('Password'))
{
Password = document.getElementById('Password').value;
}
var CommentBody = document.getElementById('CommentBody').value;
var ResponseSection = document.getElementById('ResponseSection');
if(Name == '' || Email == '' || CommentBody == '')
{
Loader.innerHTML = '';
ResponseSection.innerHTML = '