
fbTips=(function(){function _ge(idOrName){var element=document.getElementById(idOrName);if(!element){element=document.getElementsByName(idOrName)[0];}
return element;}
function _insertAfter(node,toInsert){node.parentNode.insertBefore(toInsert,node.nextSibling);}
var _addEventListener;if(window.addEventListener){_addEventListener=function(obj,eventName,fun){obj.addEventListener(eventName,fun,false);}}else{_addEventListener=function(obj,eventName,fun){obj.attachEvent("on"+eventName,fun);}}
function _showElementFun(obj){return function(){obj.firstChild.style.display="block";}}
function _hideElementFun(obj){return function(){obj.firstChild.style.display="none";}}
var _ShownTip=null;function addInputTip(inputElement,tipDiv){_insertAfter(inputElement,tipDiv);_addEventListener(inputElement,"focus",function(){if(_ShownTip){_hideElementFun(_ShownTip)();}
_showElementFun(tipDiv)();_ShownTip=tipDiv;return false;});tipDiv.firstChild.style.display="none";}
function makeInstructionsContainer(text){var instructionsContainer=document.createElement("DIV");instructionsContainer.innerHTML='<div style="position: absolute; width: 200px; width: 150px; background: none;"><div class="fbTip_instruction"><span class="fbTip_arrow">&laquo;</span>&nbsp;'+text+'</div></div>';instructionsContainer.style.height="1px";instructionsContainer.style.width="1px";instructionsContainer.style.marginLeft="315px";instructionsContainer.style.overflow="visible";instructionsContainer.style.position="relative";instructionsContainer.style.zIndex="1";return instructionsContainer;}
function addInstructions(inputElementName,instructionsText){var inputElement=_ge(inputElementName);if(inputElement){var instructionsContainer=makeInstructionsContainer(instructionsText);addInputTip(inputElement,instructionsContainer);return instructionsContainer;}}
function changeTextAccordingToLifestage(){var lifestage=_ge("lifestage").value;var emailInstructions;switch(lifestage){case"2":emailInstructions="Enter your college or alumni email address.";break;case"1":emailInstructions="If you have a school email address, use that to register.";break;case"4":emailInstructions="Enter your work email if you have one.";break;case"3":emailInstructions="You can sign up with any email address.";break;default:emailInstructions="Use your work or school email if you have one, but you can sign up with any email address.";break;}
_ge("reg_email_instructions").innerHTML=emailInstructions;}
function changeTextAccordingToSchoolStatus(){var schoolStatus=_ge("status").value;var yearInstructions;switch(schoolStatus){case"3":case"4":yearInstructions="";break;case"1":yearInstructions="Select the year you will graduate from college.";break;case"2":yearInstructions="Select the year you graduated.";break;case"5":yearInstructions="Select the year you will graduate from grad school.";break;default:yearInstructions="Select the year you will graduate or did graduate.";break;}
_ge("reg_college_year_instructions").innerHTML=yearInstructions;}
function setupRegistrationPageInstructions(){addInstructions("name","Use your real name so your friends can find you.  You need to enter at least a first name and first initial of your last name.  Don't use all caps.");addInstructions("lifestage","The more information you give us about where you are in life, the better job we can do of connecting you to the people around you.");addInstructions("status","Select how you are connected to your college or university.");addInstructions("reg_email__","<span id=\"reg_email_instructions\"></span>");var birthdayInstructions=addInstructions("birthday_month","Enter your complete birthday.  Make sure to use your real birthday.  We need to verify your age. You don't have to display your birthday in your profile.");addInputTip(_ge("birthday_day"),birthdayInstructions);addInputTip(_ge("birthday_year"),birthdayInstructions);addInstructions("college_year","<span id=\"reg_college_year_instructions\">Select the year you graduated (or will graduate) from college.</span>");addInstructions("reg_passwd__","Make sure your password is at least 6 characters long.");addInstructions("captcha_response","Don't forget to check the <a href=\"http://www.ulist.com/terms.php\">Terms of Use</a> box below.");addInstructions("sq","If your high school isn't listed, fill out <a href=\"http://www.ulist.com/help.php?tab=suggest&amp;network_type=2\">this form</a> and ask us to add it.");addInstructions("high_school_year","You need to be a current high school student to register through your high school. If you've already graduated, register through your college, workplace, or region.");_addEventListener(_ge("lifestage"),"change",changeTextAccordingToLifestage);_addEventListener(_ge("status"),"change",changeTextAccordingToSchoolStatus);changeTextAccordingToLifestage();changeTextAccordingToSchoolStatus();_ge("name").focus();}
return{"addInputTip":addInputTip,"addInstructions":addInstructions,"setupRegistrationPageInstructions":setupRegistrationPageInstructions};})();