/**--
 Copyright 2010 1fb.net Financial Services.
  
 This document may not be reproduced, distributed or used 
 in any manner whatsoever without the expressed written 
 permission of 1st Financial Bank USA.
 
 @author Corwin Hu
**/

var NOT_LOGIN_ACTIVE = "NOT_LOGIN_ACTIVE";//haven't logged in, but the session is active
var NOT_LOGIN_AND_SESSION_TIMEOUT = "NOT_LOGIN_AND_SESSION_TIMEOUT";//never logged in and the session is timeout
var LOGIN_AND_SESSION_TIMEOUT = "LOGIN_AND_SESSION_TIMEOUT";//logged in before but now the session is timeout

//define tell me more text, title, url properties, they will be used on the login light box
function TellMeMoreProps(options)
{
	this.title = options.title;
	this.text = options.text;	
	this.tellMeMoreUrl = options.tellMeMoreUrl;	
}

//handle the text display logic according to requirement
TellMeMoreProps.prototype.getText = function(mainPage, status){    
    if(status == LOGIN_AND_SESSION_TIMEOUT && (mainPage == "college_match" || mainPage == "scholarship_results"))
    {
       return timeoutFullTextList[mainPage];
    }
    else
    {
       var content = this.text[mainPage];
       if(content == null)
       {
           content = this.text["default"];
       }
       
       if(status == NOT_LOGIN_AND_SESSION_TIMEOUT && (mainPage == "college_match" || mainPage == "scholarship_results"))
       {
           content = content + timeoutSuffixList[mainPage];
       }
       return content;
    }      
}

var defaultTitle = "You Must Be Logged In To Do This";

var tellMeMoreList = new Object();
tellMeMoreList["college_chance"] = new TellMeMoreProps(
	{
		title: defaultTitle,
		text: {
			"default": 'Log in to estimate your chances for admission at this college. Not signed up? Click the "Tell Me More" button to learn more about the College Chances calculator and how to get your free CollegeData account.',
			"college_match" : 'Log in to estimate your chances for admission at the colleges in your College Match results. Not signed up? Click the "Tell Me More" button to learn more about the College Chances calculator and how to get your free CollegeData account.'
	    },
		tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["college_chance"]
	}
);

tellMeMoreList["net_cost"] = new TellMeMoreProps(
		{
			title: defaultTitle,
			text: {
			    "default" : 'Log in to estimate your true out-of-pocket cost to attend this college. Not signed up? Click the "Tell Me More" button to learn more about the College Net Cost Calculator and how to get your free CollegeData account.',
			    "college_match" : 'Log in to estimate your true out-of-pocket cost to attend the colleges in your College Match results. Not signed up? Click the "Tell Me More" button to learn more about the College Net Cost Calculator and how to get your free CollegeData account.'
		    },
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["net_cost"]
		}
);

tellMeMoreList["data_locker_save_college"] = new TellMeMoreProps(
		{
			title: defaultTitle,
			text: { "default" : 'Log in to save this college to your Data Locker. Not signed up? Click the "Tell Me More" button to learn more about the Data Locker and how to get your free CollegeData account.'},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["data_locker_save_college"]
		}
);

tellMeMoreList["data_locker_save_schollarship"] = new TellMeMoreProps(
		{
			title: defaultTitle,
			text: { "default" : 'Log in to save this scholarship to your Data Locker. Not signed up? Click the "Tell Me More" button to learn more about the Data Locker and how to get your free CollegeData account.'},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["data_locker_save_schollarship"]
		}
);

tellMeMoreList["data_locker_save_profile"] = new TellMeMoreProps(
		{
			title: defaultTitle,
			text: { "default" :  'Log in to save this Admissions Profile to your Data Locker. Not signed up? Click the "Tell Me More" button to learn more about the Data Locker and how to get your free CollegeData account.'},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["data_locker_save_profile"]
		}
);

tellMeMoreList["admission_profile"] = new TellMeMoreProps(
		{
			title: defaultTitle,
			text: { "default" : 'Log in to add or update your Admissions Profile. You are eligible to complete an Admissions Profile if you are a high school or college student. Not signed up? Click the "Tell Me More" button to learn more about the Admissions Profile and how to get your free CollegeData account.'},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["admission_profile"]
		}
);

tellMeMoreList["admissions_tracker_list_view"] = new TellMeMoreProps(
		{
			title: 'Log In to See Your Data in the Summary and Results',
			text: { "default" : 'Log in to view your data in the Admissions Tracker Summary and Results and see how you compare. You are eligible to add your Admissions Profile if you are a high school or college student.'},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["admissions_tracker_list_view"]
		}
);

tellMeMoreList["admissions_tracker_scattergram"] = new TellMeMoreProps(
		{
			title: 'Log In to See Yourself in the Scattergram',
			text: { "default" : 'Log in to view your icon in the Scattergram and see how you compare. Look for the big blue star <img src="/page/images/admissions/you-star.gif" alt="you star" width="16" height="16" border="0"> &#151; that'+"'"+'s you! You are eligible to add your Admissions Profile if you are a high school or college student.'},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["admissions_tracker_scattergram"]
		}
);

tellMeMoreList["admissions_tracker_your_college_list"] = new TellMeMoreProps(
		{
			title: 'Log In to See <i>Your College List</i>',
			text: { "default" : 'Log in to create or manage <i>Your College List</i> &#151; your own personalized list of colleges. Check the latest Admissions Tracker activity at the colleges you are most interested in.'},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["admissions_tracker_your_college_list"]
		}
);

tellMeMoreList["remove_profle"] = new TellMeMoreProps(
		{
			title: defaultTitle,
			text: { "default" : 'Please log in to remove this from your Data Locker. Your CollegeData session is no longer active. '},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["remove_profle"]
		}
);

tellMeMoreList["update_profle"] = new TellMeMoreProps(
		{
			title: defaultTitle,
			text: { "default" : 'Please log in to update this. Your CollegeData session is no longer active. '},
			tellMeMoreUrl: loginLightboxCommProps.tellMeMoreUrls["update_profle"]
		}
);

var timeoutSuffixList = {
		"college_match" : " Your previous CollegeData session is no longer active, so you must redo your last College Match search to recreate your results list.",
		"scholarship_results": " Your previous CollegeData session is no longer active, so you must redo your last Scholarship Finder search to recreate your results list."
};

var timeoutFullTextList = {
		"college_match" : "Please log in. Your CollegeData session is no longer active. You must redo your last College Match search after you log in to recreate your results list.",
		"scholarship_results": "Please log in. Your CollegeData session is no longer active. You must redo your last Scholarship Finder search after you log in to recreate your results list."
};
