function showLogin(fieldObj){ if(fieldObj.value == 'email'){ fieldObj.value = ''; } } function hideLogin(fieldObj){ if(fieldObj.value == '' && fieldObj.name=='loginemail'){ fieldObj.value = 'email'; } } function showPwd(){ var txtObj = document.getElementById('loginText'); var strObj = document.getElementById('loginStar'); strObj.className = strObj.className.replace('hidden','visible'); txtObj.className = txtObj.className.replace('visible','hidden'); strObj.focus(); } function hidePwd(){ var strObj = document.getElementById('loginStar'); if(strObj.value == '') { var txtObj = document.getElementById('loginText'); txtObj.className = txtObj.className.replace('hidden','visible'); strObj.className = strObj.className.replace('visible','hidden'); } } function changePerPage(perPageVal){ if(document.search) document.search.submit(); if(document.sortBy) document.sortBy.submit(); } function showChangeOptions(obj){ var hiddenObj = document.getElementById('otherOptions'); var hiddenObj2 = document.getElementById('otherOptions_2'); var dropdownObj = document.getElementById('businessOrgId'); var orgTr = document.getElementById('orgTr'); var staffTr = document.getElementById('staffTr'); var charityTr = document.getElementById('charityTr'); dropdownObj.value = 0; switch(obj.value){ case '8': orgTr.className = "hiddenObj"; hiddenObj2.className = "hiddenObj"; showOtherField(obj, 'otherOptions'); staffTr.className = "hiddenObj"; charityTr.className = "hiddenObj"; break; case '1': // organisation hiddenObj.className = "hiddenObj"; orgTr.className = "joinTr"; staffTr.className = "joinTr"; charityTr.className = "hiddenObj"; break; case '7': // celebrity hiddenObj.className = "hiddenObj"; orgTr.className = "joinTr"; staffTr.className = "hiddenObj"; charityTr.className = "hiddenObj"; break; case '5':// charity hiddenObj.className = "hiddenObj"; orgTr.className = "joinTr"; staffTr.className = "hiddenObj"; charityTr.className = "joinTr"; break; default: orgTr.className = 'hiddenObj'; hiddenObj.className = "hiddenObj"; hiddenObj2.className = "hiddenObj"; staffTr.className = "hiddenObj"; charityTr.className = "hiddenObj"; break; } } function showOtherField(obj, hObj){ var opts = obj.options[obj.selectedIndex].innerHTML; var hiddenObj = document.getElementById(hObj); var whoOtherObj = document.getElementById('whoOther'); var tOtherObj = document.getElementById('academic_1'); switch(opts){ case 'Other': if(whoOtherObj) whoOtherObj.innerHTML = 'Other'; hiddenObj.className = "joinTr"; if(tOtherObj){ tOtherObj.onkeyup = ""; tOtherObj.autocomplete = "off"; } break; case 'Word of Mouth': if(whoOtherObj) whoOtherObj.innerHTML = 'Who?
It would be really helpful to know who told you about us, please enter their name

'; hiddenObj.className = "joinTr"; break; case 'School/education establishment': case 'Teacher/Coach': if(whoOtherObj){ whoOtherObj.innerHTML = 'Which school/college'; } if(tOtherObj){ tOtherObj.onkeyup = function onkeyup(event) { showSchoolList(this,'editProfile','academic_1','text','lookUp_academic_1');} tOtherObj.autocomplete = "off"; } hiddenObj.className = "joinTr"; break; default: hiddenObj.className = "hiddenObj"; if(tOtherObj){ tOtherObj.onkeyup = ""; tOtherObj.autocomplete = "off"; } break; } } /* Function to enlarge profile image */ function enlargeProfileImg(imgUrl, id, count){ var curImage = document.getElementById('pImgmain'); curImage.src = '/' + imgUrl; var last = -1; for(var i=0; i"; content += ""; talert(content, 500, 500); // buildPopupX(domObj, content, 500, 500, -400, 0); break; case 'uploadlimit': var content = "
"; content += "

The file that you are trying to upload is more than the maximum allowed limit (2MB). Please try again with a file with smaller dimension.

"; content += "
"; talert(content, 500, 100); break; case 'help': var content = "
 

Sorry you're experiencing problems. Let's try to sort this out.

"; content += "

If you know the name of the person you want to read messages that have been written about them or by them, type in their name in the Name box. You may only know they're first or last name, or even their maiden name or nickname, it doesn't matter, all of these will help you find the right person. Type in the names you know and then click Search. The site will look for all the messages that are either about that person or have been written by that person.

"; content += "

If you don't know their name or you're not looking for someone in particular, you may decide to type in keyword/s. This could be something about a person, like the school they went to, or the city they live in, or it could be something that you're interested in like dogs or swimming. You can type in more than one keyword but separate them with a comma and a space.

"; content += "

If you type in a name and a keyword or more than one keyword, the search will be more specific and will result in fewer messages for you to browse through.

"; content += "

If you are still having problems, please either email us on thanks@thanksto.com or call one of our support team on +44 (0) 845 359 9888

"; content += "

I really hope this information has helped.

"; buildPopup(domObj, content, 700, 370, -640, 0); break; case 'dob': var content = "We are asking for your date of birth because we must ensure the safety of our members, plus we want to make sure we're always providing the services that are right for you. This information will not be visible on your profile page."; buildPopup(domObj, content, 300, 100, 200, -30); break; case 'vote': var content = "If you have enjoyed this message and would like to boost it's ranking in the website, show your support by clicking here to vote for it!"; buildPopup(domObj, content, 400, 60, 100, -30); break; case 'wrt': var content = "
Life Changer: Someone who has had a real impact on you at some point in your life. They may be a doctor or team of medical staff who saved your life or a teacher who said one simple comment that made you completely change your life around.
"; content += "
Life Influencer: Someone who has helped guide you in life or who has helped mould who you are. They may be an employer who gave you an opportunity and influenced the direction you have taken or a parent who made you who you are today.
"; content += "
Life Enhancer: Someone who has genuinely improved your life experiences. They may be a stranger who ran after you when you dropped your wallet or a good friend who is always there for you when you need them.
"; buildPopup(domObj, content, 600, 180, -300, -320); break; case 'thelp': var content = "
 

Sorry you're experiencing problems. Let's try to sort this out.

"; content += "

You are trying to write a message of thanks to someone. First of all, we need to see if they're a registered member of the website already, so type in whatever you know about the person into these fields. If you don't know anything about them, click Continue below.

"; content += "

However, you can type in their first or last name, or even their maiden name or nickname, it doesn't matter, all of these will help you find the right person. Then click Search.

"; content += "

If you don't know their name or you're not looking for someone in particular, you may decide to type in keyword/s. This could be something about a person, like the school they went to, or the city they live in, or it could be something that you're interested in like dogs or swimming. You can type in more than one keyword but separate them with a comma and a space.

"; content += "

Alternatively, you may know where they live or simply the country they're from. All of this helps you find the right person

"; content += "

The more search details you type in, the fewer results you'll get as we will look for people by that name in that city for example.

"; content += "

You can still leave a message if you don't know anything about the person or organisation.

"; content += "

If you are still having problems, please either email us on thanks@thanksto.com or call one of our support team on +44 (0) 845 359 9888

"; buildPopup(domObj, content, 760, 300, -740, 5); break; case 'mhelp': var content = "
 

Sorry you're experiencing problems. Let's try to sort this out.

"; content += "

If you know the name of the person you want to read messages that have been written about them or by them, type in their name in the Name box. You may only know they're first or last name, or even their maiden name or nickname, it doesn't matter, all of these will help you find the right person. Type in the names you know and then click Search. The site will look for all the messages that are either about that person or have been written by that person.

"; content += "

If you don't know their name or you're not looking for someone in particular, you may decide to type in keyword/s. This could be something about a person, like the school they went to, or the city they live in, or it could be something that you're interested in like dogs or swimming. You can type in more than one keyword but separate them with a comma and a space.

"; content += "

If you type in a name and a keyword or more than one keyword, the search will be more specific and will result in fewer messages for you to browse through.

"; content += "

If you are still having problems, please either email us on thanks@thanksto.com or call one of our support team on +44 (0) 845 359 9888

"; content += "

I really hope this information has helped.

"; buildPopup(domObj, content, 760, 300, -340, 10); break; case 'anonymous': var content = "By selecting this, the recipient will know it is from you and the message will appear on the site but no-one else will be able to see your name. The message will also appear in your profile under the Anonymous tab, viewable only by you."; buildPopup(domObj, content, 400, 70, 370, -260); break; case 'contactName': var content = ""; buildPopup(domObj, content, 300, 100, 10, 0); break; case 'reportHelp': var content = "We constantly strive to uphold the ethos of this site, which is showing our thanks to the people who really make a positive impact on our lives and our community. Please report any messages that you believe are not true or are not in-keeping with this positive messaging service we are providing. You must be a logged in member to report a message."; buildPopup(domObj, content, 400, 140, 0,-260); break; case 'reportMsg': var content = "

Thank you for reporting this message as unworthy of being on the site. Before we can remove the message, we need some further information from you, please complete this form and we will deal with it within 48 hours.
"; content += ""; content += "

"; buildPopupX(domObj, content, 450, 240, -60, -120); break; case 'nameHelp': var content = "Type in either the first name, second name or both, or even a nickname or a maiden name of the person you're looking for."; buildPopup(domObj, content, 300, 60, 20, -30); break; case 'keywordHelp': var content = "This may be a school, a hobby or an event that helps identify the person you're looking for."; buildPopup(domObj, content, 300, 40, 20, -30); break; case 'cityHelp': var content = "
This is the City where the person you are looking for lives.
"; buildPopup(domObj, content, 300, 40, 20, -30); break; case 'countryHelp': var content = "
This is the Country where the person you are looking for lives.
"; buildPopup(domObj, content, 300, 40, 20, -30); break; case 'mNameHelp': var content = "Type in either the first name, second name or both, or even a nickname or a maiden name of the person who may be the author or subject of the Thanks message."; buildPopup(domObj, content, 350, 60, 20, -30); break; case 'mKeywordHelp': var content = "Type in words that will find messages you're interested. It may be a country, a school, or simply a hobby that may be mentioned within the Thanks messages."; buildPopup(domObj, content, 350, 70, 20, -30); break; case 'locHelp': var content = "
Enter the location relevant to this message.
"; buildPopup(domObj, content, 300, 25, 20, -150); break; case 'datesHelp': var content = "
Enter the date/year relevant to this message.
"; buildPopup(domObj, content, 300, 25, 20, -150); break; case 'toEmailHelp': var content = "Type in the email address of the person you're writing this message To and a copy will be sent to them. If you don't know their email address, leave this blank and your message will still go live on the website. "; buildPopup(domObj, content, 300, 80, 10, -200); break; case 'statusHelp': var content = "This is a summary about you, what you've done and what you're doing. It will be used by people trying to find you, recognise you and Thank you!"; buildPopup(domObj, content, 280, 70, 10, -190); break; case 'dobHelp': var content = "Your age will be displayed as an age range rather than your specific date of birth. As with all the other information on this page, it will be used by people trying to find you, recognise you and Thank you!"; buildPopup(domObj, content, 300, 80, 10, -200); break; case 'pKeywordHelp': var content = "These keywords should be relevant to you. They can be clubs you've belonged to, events you've been to, or simply words that people can use to search for you if they want to thank you!"; buildPopup(domObj, content, 300, 80, 10, -200); break; case 'likeIt': var content = "If you like this message, click Like It!. The message will appear in your profile page and also that Like It will be marked against the message."; buildPopup(domObj, content, 400, 60, 100, 0); break; case 'hobbiesHelp': var content = "List the things you enjoy doing and anything you're interested in like sky diving, horses and film making."; buildPopup(domObj, content, 400, 40, 10, -160); break; case 'fileUploadWait': var content = "Please wait while we process the file..."; buildPopup(domObj, content, 300, 30, -360, 0); break; case 'fileUploadFail': var content = "Please upload valid .jpg/.gif file."; buildPopupX(domObj, content, 250, 30, -360, 0); break; case 'worksHelp': var content = "Enter in places, countries, events you were at and when!"; buildPopup(domObj, content, 400, 30, 10, -150); break; case 'claimHelp': var content = "If you're not sure whether this is the right person, click here and we can contact them to ask for more information that will hopefully help you identify them."; buildPopup(domObj, content, 400, 60, 20, 0); break; case 'keyHelp': var content = "
For example, this could be a school, town or hobby that is relevant to this message.
"; buildPopup(domObj, content, 300, 40, 20, -160); break; case 'amb': var content = "This member is a ThanksTo Ambassador. This means that they were selected by ThanksTo to help them develop the site, offer ideas and spread the word. They have been a huge help to ThanksTo."; buildPopupX(domObj, content, 300, 100, -280, 0); break; case 'how': var content = "
It is so easy to share this site. If you are a member of any of "; content += "these social networks, simply click on the logo, enter your login "; content += "details for that site and it will post information about ThanksTo on "; content += "that network. Alternatively, click on the envelope symbol to launch your email "; content += "and write a piece about ThanksTo.

"; content += "
However you do it, please pass it on and let other people know about ThanksTo!
"; buildPopupX(domObj, content, 500, 140, 0, -150); break; case 'winPrize': //var content = '
This week, every new Thank You message will be entered into a prize draw to win a pair of tickets to a champagne lunch cruise on the river Thames in London. Just join and say thanks to win!
'; var content = '
This week, every new Thank You message will be entered into a prize draw to win one of three stylish Knomo laptop bags we have to give away. Just join and say thanks to win!
'; buildPopup(domObj, content, 300, 80, 550, -350); break; case 'pCampaignHelp': var content = '
If you think this person has done something amazing, start a campaign to raise public recognition for them!Get some people together to help you or do it on your own but try to get as many people as you can to thank this person for all the great things they\'ve done
'; buildPopup(domObj, content, 300, 120,-10, -260); break; } } function buildInfoBox(content, width, height, mLeft, mTop){ var popDiv = document.getElementById('popup'); if(popDiv){ popDiv.parentNode.removeChild(popDiv); } var popDiv = document.createElement('div'); var divWidth = '1'; popDiv.style.width = divWidth + 'px'; popDiv.id = 'popup' var popTbl = document.createElement('table'); popDiv.appendChild(popTbl); popTbl.border = '0'; popTbl.cellSpacing = '0'; popTbl.cellPadding = '0'; popTbl.style.position = 'absolute'; popTbl.style.marginLeft = mLeft + 'px'; popTbl.style.marginTop = mTop + 'px'; popTbl.style.zIndex = 23; var popTbd = document.createElement('tbody'); popTbl.appendChild(popTbd); // First Row var pTr = popTbd.insertRow(popTbd.rows.length); var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = width + 'px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML += ''; // 2nd row var pTr = popTbd.insertRow(popTbd.rows.length); var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.background = '#ffffff'; pTd.style.verticalAlign = 'top'; var closeMargin = width - 20; pTd.innerHTML = '
' + content + '
'; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; // 3rd row var pTr = popTbd.insertRow(popTbd.rows.length); var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = width + 'px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; return popDiv; } function buildBox(content, width, height, mLeft, mTop, closeAction){ var popDiv = document.getElementById('popup'); if(popDiv){ popDiv.parentNode.removeChild(popDiv); } var popDiv = document.createElement('div'); var divWidth = '1'; popDiv.style.width = divWidth + 'px'; popDiv.id = 'popup' var popTbl = document.createElement('table'); popDiv.appendChild(popTbl); popTbl.id = 'popTbl'; popTbl.border = '0'; popTbl.cellSpacing = '0'; popTbl.cellPadding = '0'; popTbl.style.position = 'absolute'; popTbl.style.marginLeft = mLeft + 'px'; popTbl.style.marginTop = mTop + 'px'; popTbl.style.zIndex = 23; var popTbd = document.createElement('tbody'); popTbl.appendChild(popTbd); // First Row var pTr = popTbd.insertRow(popTbd.rows.length); var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = width + 'px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; var closeDiv = document.createElement('div'); closeDiv.className = 'abs'; closeDiv.style.zIndex = 24; closeDiv.style.marginLeft = '-10px'; closeDiv.style.marginTop = '20px'; closeDiv.style.cursor = 'pointer'; if(closeAction){ var cBtnAction = closeAction; }else{ var cBtnAction = 'closePop();'; } closeDiv.innerHTML = ''; pTd.appendChild(closeDiv); pTd.innerHTML += ''; // 2nd row var pTr = popTbd.insertRow(popTbd.rows.length); var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.background = '#ffffff'; pTd.style.verticalAlign = 'top'; var closeMargin = width - 20; pTd.innerHTML = '
' + content + '
'; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; // 3rd row var pTr = popTbd.insertRow(popTbd.rows.length); var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = width + 'px'; pTd.innerHTML = ''; var pTd = pTr.insertCell(pTr.cells.length); pTd.style.width = '50px'; pTd.innerHTML = ''; return popDiv; } function buildPopup(domObj, content, width, height, mLeft, mTop){ var popDiv = buildInfoBox(content, width, height, mLeft, mTop); domObj.parentNode.appendChild(popDiv); } function buildPopupX(domObj, content, width, height, mLeft, mTop){ var popDiv = buildBox(content, width, height, mLeft, mTop); domObj.parentNode.appendChild(popDiv); } function closePop(){ var popTbl = document.getElementById('popup'); var alertObj = document.getElementById('alert'); if(alertObj){ alertObj.parentNode.removeChild(alertObj); } if(popTbl){ popTbl.parentNode.removeChild(popTbl); } } function talert(msg, boxWidth, boxHeight){ var bodyObj = document.getElementsByTagName('body')[0]; var alertObj = document.getElementById('alert'); if(alertObj){ alertObj.parentNode.removeChild(alertObj); } var alertObj = document.createElement('div'); alertObj.id = 'alert'; alertObj.style.position = 'absolute'; alertObj.style.width = bodyObj.offsetWidth + 'px'; alertObj.style.height = bodyObj.offsetHeight + 'px'; alertObj.style.left = '0'; alertObj.style.top = '0'; var alertBgObj = document.createElement('div'); alertBgObj.style.position = 'absolute'; alertBgObj.style.zIndex = '4'; alertBgObj.style.width = bodyObj.offsetWidth + 'px'; alertBgObj.style.height = bodyObj.offsetHeight + 'px'; alertBgObj.innerHTML = ''; alertObj.appendChild(alertBgObj); bodyObj.appendChild(alertObj); var screenHt = (screen.availHeight) ? screen.availHeight : window.screen.availHeight; var scrollTop = window.pageYOffset; scrollTop = (isNaN(scrollTop)) ? bodyObj.scrollTop : scrollTop; var content = '
 
'+msg; var mLeft = (bodyObj.offsetWidth - boxWidth - 100) / 2; var mTop = ((screenHt - boxHeight - 100)/2) + scrollTop; var popDiv = buildBox(content, boxWidth, boxHeight, mLeft, mTop); popDiv.style.left = '0'; popDiv.style.top = '0'; alertObj.appendChild(popDiv); } function alertScreen(msg, boxWidth, boxHeight, closeAction){ var bodyObj = document.getElementsByTagName('body')[0]; var alertObj = document.getElementById('alert'); if(alertObj){ alertObj.parentNode.removeChild(alertObj); } var alertObj = document.createElement('div'); alertObj.id = 'alert'; alertObj.style.position = 'absolute'; alertObj.style.width = bodyObj.offsetWidth + 'px'; alertObj.style.height = bodyObj.offsetHeight + 'px'; alertObj.style.left = '0'; alertObj.style.top = '0'; var alertBgObj = document.createElement('div'); alertBgObj.style.position = 'absolute'; alertBgObj.style.zIndex = '4'; alertBgObj.style.width = bodyObj.offsetWidth + 'px'; alertBgObj.style.height = bodyObj.offsetHeight + 'px'; alertBgObj.innerHTML = ''; alertObj.appendChild(alertBgObj); bodyObj.appendChild(alertObj); var screenHt = (screen.availHeight) ? screen.availHeight : window.screen.availHeight; var scrollTop = window.pageYOffset; scrollTop = (isNaN(scrollTop)) ? bodyObj.scrollTop : scrollTop; var content = '
 
'+msg; var mLeft = (bodyObj.offsetWidth - boxWidth - 100) / 2; var mTop = ((screenHt - boxHeight - 100)/2) + scrollTop; var popDiv = buildBox(content, boxWidth, boxHeight, mLeft, mTop, closeAction); popDiv.style.left = '0'; popDiv.style.top = '0'; alertObj.appendChild(popDiv); } function tconfirm(msg){ } function checkFeedback(){ if(document.feedback.comments.value == '' || document.feedback.comments.value == ' '){ talert('
Oops! Looks like the feedback box is empty.
', 400, 50); return false; } } function checkJoin(){ var chkEmpty = new validate; chkEmpty.formName = 'members'; chkEmpty.width = 450; chkEmpty.height = 200; chkEmpty.mandCaptions = Array('First name','Last name','Email', 'Password','Re-type Password','First part of postcode','Where did you hear about us?','Terms and conditions'); chkEmpty.mandFields = Array('firstname','lastname','email','password','repassword','postcode','hearId','terms'); chkEmpty.mandMINLEN = new Array('','','',6, '','',''); chkEmpty.mandEQ = new Array('','','','','password','',''); chkEmpty.mandEMAIL = new Array('','','email','','','',''); return chkEmpty.validateForm(); } function checkLogin(){ var chkEmpty = new validate; chkEmpty.formName = 'auth'; chkEmpty.width = 450; chkEmpty.height = 100; chkEmpty.mandCaptions = Array('Email','Password'); chkEmpty.mandFields = Array('loginemail','loginpassword'); chkEmpty.mandEMAIL = Array('loginemail',''); return chkEmpty.validateForm(); } function checkLogin1(){ var chkEmpty = new validate; chkEmpty.formName = 'auth1'; chkEmpty.width = 450; chkEmpty.height = 100; chkEmpty.mandCaptions = Array('Email','Password'); chkEmpty.mandFields = Array('loginemail','loginpassword'); chkEmpty.mandEMAIL = Array('loginemail',''); return chkEmpty.validateForm(); } function checkNominate(){ var dselObj = document.getElementById('members'); for(var i=0; i 1) { cUrl = cUrl.toLowerCase(); if(cUrl.match('.jpg') || cUrl.match('.gif') || cUrl.match('.jpeg')){ for(var i=0; i"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += ""; content += ""; content += "\n"; content += "
Message*
\n"; content += ""; content += ""; content += "
"; content += ""; buildPopupX(domObj, content, 500, 220, -400, -90); } function popupDelMessages(eleName,totalChecks){ var domObj = document.getElementById(eleName); var checkMsg = ""; for (var i=1; i <= totalChecks; i++ ){ var checkObj = document.getElementById('del_msg_' + i); if ( (checkObj) && (checkObj.checked)){ checkMsg += checkObj.value + "##"; } } var content; if (checkMsg != ""){ content = "
"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += ""; content += ""; content += "\n"; content += "
You're about to delete all the messages within this conversation. Are you sure you want to continue?
"; content += "
"; }else{ content = "
No messages are selected.
"; } talert(content, 400, 140); } function showEditProfile(divId){ var divObj = document.getElementById(divId); var arrowObj = document.getElementById(divId + 'Arrow'); if(divObj.className == 'visibleObj'){ divObj.className = 'hiddenObj'; arrowObj.src = '/images/arrowRight.gif'; }else{ divObj.className = 'visibleObj'; arrowObj.src = '/images/arrowDown.gif'; } } function logout(){ location.href = '/login.php?action=logout'; } function sendHelpEmail(){ var ajaxVar = new ajaxVars(); ajaxVar.vars['action'] = "runFunction"; ajaxVar.vars['func'] = "sendHelpEmail"; ajaxVar.vars['incModule'] = "needHelp"; ajaxVar.vars['email'] = document.help.email.value; ajaxVar.vars['issue'] = document.help.issue.value; ajaxVar.session = 0; ajaxVar.gotoFunction = 'returnHelpEmail'; ajaxVar.AjaxPostSQL(); } function returnHelpEmail(){ var msg = '

We will endeavour to respond to you within 24 hours.

'; msg += '

Alternatively, if you wish to speak to one of the ThanksTo team, please call us on +44 (0) 845 359 9888

'; talert(msg,450,150); } function showPFWarning(msgtype,putbreaks){ var wcontent = ""; if (msgtype == 1){ wcontent = "We think you may have said something inappropriate in your message. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "Please remember that we only want to hear your positive messages of thanks. Also, this site is open for people of all ages to read so keep it clean. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "Please remove any rude words now and resubmit your message. Thanks. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "PS. If you continue to write offensive words, your account will be suspended"; }else if (msgtype == 2){ wcontent = "We think you may have written something inappropriate again. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "You have already done this once, so take this as a friendly reminder that this site is all about thanking the positive things people have done. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "Remove any rude words you have written and resubmit your message. Thanks. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "PS. If you continue to write offensive words, your account will be suspended"; }else if (msgtype == 3){ wcontent = "We think you may have said something inappropriate again. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "You have already done this twice and we are close to suspending your account. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "Remove any rude words you have written and resubmit your message. Thanks."; }else if (msgtype > 3){ wcontent = "You have consistently abused this site by writing rude words in your messages. It is really not in-keeping with what we're all about which is saying thanks for all the good things that people do. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "Unfortunately, your account has been suspended while we assess this case and decide whether you made honest mistakes or not. "; wcontent += (putbreaks == 1)? "\n" : "
"; wcontent += "Please don't try to connect again until we contact you with our final decision."; } return wcontent; } function goToPage(url){ location.href = url; } function popupUnlink(eleName,linkeduserId){ var domObj = document.getElementById(eleName); var content; content = "
"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += "\n"; content += ""; content += ""; content += "\n"; content += "
You're about to unlink the user. Are you sure you want to continue?
"; content += "
"; talert(content, 400, 140); } function showFAQ(){ var mainObj = document.getElementById('faq'); cleanWhitespace(mainObj); if (!document.myGetElementsByClassName) { document.myGetElementsByClassName = function(className) { var children = document.getElementsByTagName('*') || document.all; var elements = new Array(); for (var i = 0; i < children.length; i++) { var child = children[i]; var classNames = child.className.split(' '); for (var j = 0; j < classNames.length; j++) { if (classNames[j] == className) { elements.push(child); break; } } } return elements; } } var faqDivs = document.myGetElementsByClassName('question'); for(var i=0; i= 0){ this.nextSibling.className = 'hiddenObj'; }else{ this.nextSibling.className = 'answer visibleObj'; } } } } function cleanWhitespace(node) { var notWhitespace = /\S/; for(var i=0;iSee more
   
"; talert(dataStr, 550,300); } function viewPressByRegion(regId){ location.href='viewPressContacts.php?regionId='+regId } function srchTxt(obj,event){ if(event.keyCode == 13){ msgSearch(''); }else{ showList(obj,'sayThanks','name','text','lookUp'); } } function srchKeyword(event){ if(event.keyCode == 13){ msgSearch(''); } } function msgSearch(val){ document.forms['search'].elements['search-type'].value=val; document.forms['search'].submit(); } function viewNewsletterStatus(){ resetHiddenElemnt('sayThanks','0'); if(location.href.indexOf('raisingProfile.php')>0){ if(document.sayThanks.sendNews.value == '1'){ window.location.href = "/raisingProfile.php?sendNews=yes&sendNewsFreqVal="+document.sayThanks.sendNewsFreq.value; }else{ window.location.href = "/raisingProfile.php?sendNews=&sendNewsFreqVal="+document.sayThanks.sendNewsFreq.value; } }else{ var campaignId = document.sayThanks.campaignId.value; if(document.sayThanks.sendNews.value == '1'){ window.location.href = "/campaignPublicityEdit.php?campaignId="+campaignId+"&sendNews=yes"; }else{ window.location.href = "/campaignPublicityEdit.php?campaignId="+campaignId+"&sendNews=no";; } } } function manageHeightOfFavMsg(){ var height = document.getElementById('campaignBoxDiv').offsetHeight; document.getElementById('homeFavThanksDiv').style.height = (height - 30)+"px"; } function closeCampaignAlert(){ var dataStr; dataStr = "
Are you sure you want to close off your campaign?
"; dataStr += "
"; dataStr += "
"; dataStr += "Close campaign"; dataStr += "
"; dataStr += "
"; dataStr += "Cancel"; dataStr += "
"; dataStr += "
"; var bodyObj = document.getElementsByTagName('body')[0]; var alertObj = document.getElementById('alert'); if(alertObj){ alertObj.parentNode.removeChild(alertObj); } var alertObj = document.createElement('div'); alertObj.id = 'alert'; alertObj.style.position = 'absolute'; alertObj.style.width = bodyObj.offsetWidth + 'px'; alertObj.style.height = bodyObj.offsetHeight + 'px'; alertObj.style.left = '0'; alertObj.style.top = '0'; var alertBgObj = document.createElement('div'); alertBgObj.style.position = 'absolute'; alertBgObj.style.zIndex = '4'; alertBgObj.style.width = bodyObj.offsetWidth + 'px'; alertBgObj.style.height = bodyObj.offsetHeight + 'px'; alertBgObj.innerHTML = ''; alertObj.appendChild(alertBgObj); bodyObj.appendChild(alertObj); // mLeft = findBoxLeftPos(document.getElementById('campAlertTxt')); // alert(); // buildPopup(document.getElementById('campAlert'),dataStr, 400,120,mLeft, -200); var content = '
 
'+dataStr; var mLeft = (bodyObj.offsetWidth - 400 - 100) / 2; var mTop = findBoxTopPos(document.getElementById('campAlert')); var popDiv = buildBox(content, 400, 120, mLeft, mTop); popDiv.style.left = '0'; popDiv.style.top = '0'; alertObj.appendChild(popDiv); return false; } function findBoxLeftPos(obj){ var curleft = 0; if (obj.offsetParent){ while (obj.offsetParent){ curleft += obj.offsetLeft obj = obj.offsetParent; } }else if (obj.x){ curleft += obj.x; } return curleft; } function findBoxTopPos(obj){ var curtop = 0; if (obj.offsetParent){ while (obj.offsetParent){ curtop += obj.offsetTop obj = obj.offsetParent; } }else if (obj.x){ curtop += obj.x; } return curtop; } var winImgId = 0; function getWinnerImg(){ setTimeout("viewWinnerImg()",6000); } function viewWinnerImg(){ var imgArr = new Array(); var imgStrArr = new Array(); imgStrArr[imgStrArr.length] = "Aleksandra Kozera - winner of the Community Liaison award!"; imgStrArr[imgStrArr.length] = "Amelie Trepass - winner of the PR award!"; imgStrArr[imgStrArr.length] = "Jessy Kouassi - winner of the Sponsorship award!"; imgStrArr[imgStrArr.length] = "Lucy Evans - winner of the Sales award!"; imgStrArr[imgStrArr.length] = "Michael Topley - winner of the Team Leader award!"; imgStrArr[imgStrArr.length] = "Olga Siczec - winner of the Marketing award!"; imgStrArr[imgStrArr.length] = "Ricky Cella - winner of the Market Research award!"; imgStrArr[imgStrArr.length] = "The 'Thank Your Teacher' team - winners of the award for best campaign!"; document.getElementById('winnerImgId'+winImgId).className = "hiddenObj"; winImgId = winImgId+1; if(winImgId>7){ winImgId = 0; } document.getElementById('winnerImgId'+winImgId).className = "visibleObj"; document.getElementById('winnerImgText').innerHTML = imgStrArr[winImgId]; setTimeout("viewWinnerImg()",6000); }