function returnFilterMessage(dataArr,fnVars){
if ( (dataArr['message'][0] != 1) && (dataArr['message'][0] != 2)){
var warningCnt = dataArr['warning_count'][0];
if (warningCnt <= 3){
content = "
";
content += showPFWarning(warningCnt,'');
content += "
";
talert(content, 400, 200);
}else if (warningCnt > 3){
content = "";
content += showPFWarning(warningCnt,'');
content += "
";
alertScreen(content, 400, 200);
var ajaxVar = new ajaxVars();
ajaxVar.vars['action'] = "runFunction";
ajaxVar.vars['func'] = "blockUser";
ajaxVar.session = 0;
ajaxVar.vars['incModule'] = "sayThanks";
ajaxVar.AjaxPostSQL();
// after 15 secs log-out the user (1 second=1000 millisecond)
setTimeout("logOutUser()",15000);
}else{
checkContact();
}
}else{
checkContact();
}
}
function filterMessage(){
// status box on profile edit page
var msgObj = document.contact_form.message;
var msgValue = stripHTML(msgObj.value);
if (msgValue != ''){
var ajaxVar = new ajaxVars();
ajaxVar.vars['action'] = "phpArray";
ajaxVar.vars['func'] = "checkRudeWordsPlain";
ajaxVar.vars['page_name'] = "ContactMessageForm";
ajaxVar.vars['message'] = msgValue;
ajaxVar.vars['replace'] = 2;
ajaxVar.session = 0;
ajaxVar.vars['incModule'] = "sayThanks";
ajaxVar.gotoFunction = 'returnFilterMessage';
ajaxVar.AjaxPostSQL();
return false;
}else{
checkContact();
return false;
}
}
function logOutUser(){
location.href='index.php?action=blocked';
}
function checkContact(){
var chkEmpty = new validate;
chkEmpty.formName = 'contact_form';
chkEmpty.width = 450;
chkEmpty.height = 100;
chkEmpty.mandCaptions = Array('Message');
chkEmpty.mandFields = Array('message');
if (chkEmpty.validateForm()){
document.contact_form.submit();
}
}
function newMsgSearch(){
var content = '';
content += 'Please remember this is not where you write your thanks message. Click Say Thanks To if you want to do that. Click send when you\'ve finished writing your message and the person you\'re contacting will be informed by email.
\n';
content += '\n';
content += '\n';
content += '\n';
content += '\n';
content += '
\n';
content += '\n';
content += '
\n';
talert(content, 800, 200);
var popTbl = document.getElementById('popTbl');
popTbl.style.marginTop = '80px';
}
function newMsg(frmObj){
var searchName = frmObj.value;
if(searchName){
var ajaxVar = new ajaxVars();
ajaxVar.vars['action'] = "runFunction";
ajaxVar.vars['func'] = "showContactList";
ajaxVar.vars['name'] = searchName;
ajaxVar.vars['incModule'] = "profileContact";
ajaxVar.session = 0;
ajaxVar.gotoFunction = 'returnContactList';
ajaxVar.AjaxPostSQL();
}
}
function returnContactList(data){
var popDiv = document.getElementById('popContM');
popDiv.style.height = '460px';
document.getElementById('popContL').height = '460';
document.getElementById('popContR').height = '460';
var popTbl = document.getElementById('popTbl');
popTbl.style.marginTop = '80px';
document.getElementById('searchList').innerHTML = data;
}
function showMoreInfoDiv(userid,divid){
var ajaxVar = new ajaxVars();
ajaxVar.vars['action'] = "runFunction";
ajaxVar.vars['func'] = "getExtraInfo";
ajaxVar.vars['user_id'] = userid;
ajaxVar.vars['incModule'] = "profileContact";
ajaxVar.fnVars['div_id'] = divid;
ajaxVar.fnVars['user_id'] = userid;
ajaxVar.session = 0;
ajaxVar.gotoFunction = 'returnshowMoreInfoDiv';
ajaxVar.AjaxPostSQL();
}
function returnshowMoreInfoDiv(content,fnVars){
var divObj = document.getElementById(fnVars['div_id']);
var arrowImg = document.getElementById('simg_' + fnVars['user_id']);
if (divObj){
if(divObj.style.display == 'none'){
divObj.style.display = "block";
arrowImg.src = '/images/arrowDown.gif';
}else{
divObj.style.display = "none";
arrowImg.src = '/images/arrowRight.gif';
}
divObj.innerHTML = content;
}
}
function showMoreCampInfoDiv(campid,divid){
var ajaxVar = new ajaxVars();
ajaxVar.vars['action'] = "runFunction";
ajaxVar.vars['func'] = "getExtraCampInfo";
ajaxVar.vars['campid'] = campid;
ajaxVar.vars['incModule'] = "sayThanks";
ajaxVar.fnVars['div_id'] = divid;
ajaxVar.fnVars['campid'] = campid;
ajaxVar.session = 0;
ajaxVar.gotoFunction = 'returnshowMoreCampInfoDiv';
ajaxVar.AjaxPostSQL();
}
function returnshowMoreCampInfoDiv(content,fnVars){
var divObj = document.getElementById(fnVars['div_id']);
// change the arrow image to point down
var imgObj = document.getElementById('campArrow_' + fnVars['campid'])
if (divObj){
if(divObj.style.display == 'none'){
divObj.style.display = "block";
if (imgObj){
imgObj.src = "/images/arrowDown.gif";
}
}else{
divObj.style.display = "none";
if (imgObj){
imgObj.src = "/images/arrowRight.gif";
}
}
divObj.innerHTML = content;
}
}