/***********************************************
* Highlight Table Cells Script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Specify highlight behavior. "TD" to highlight table cells, "TR" to highlight the entire row:
var highlightbehavior="TD";

var ns6=document.getElementById&&!document.all;
var ie=document.all;

var strCurrentElement;

function debugConsole(strMessage)
{
		if (strCurrentElement)
			strMessage = 'Current: ' + strCurrentElement.tagName +  '<br>' + strMessage;
			
	document.getElementById("debug").innerHTML = strMessage;
}

function changeto(e,highlightcolor)
{
	
	source=ie? event.srcElement : e.target
	if (source.tagName=="TABLE")
		return
	while(source.tagName!=highlightbehavior && source.tagName!="HTML")
	{
			source=ns6? source.parentNode : source.parentElement
		if (source.style.backgroundColor!=highlightcolor&&source.id!="ignore")
		{
			source.style.backgroundColor=highlightcolor;
			//source.parentElement.style.backgroundColor=highlightcolor;
		}
	}
	HighlightCurrent(highlightcolor)
}

function HighlightCurrent(highlightcolor)
{
		if (strCurrentElement)
		{
			strCurrentElement.style.backgroundColor=highlightcolor;
			strCurrentElement.parentElement.style.backgroundColor=highlightcolor;
		}
				
}

//check if slave is contained by master
function contains_ns6(master, slave) 
{ 
	while (slave.parentNode)
		if ((slave = slave.parentNode) == master)
		return true;
	return false;
}

function changeback(e,originalcolor)
{
			
	//if ((event.srcElement == strCurrentElement) || (event.srcElement.parentElement == strCurrentElement)|| (event.srcElement.parentElement.parentElement == strCurrentElement))
		//return
	
	if (ie&&(event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="ignore")||source.tagName=="TABLE")
		return
	else if (ns6&&(contains_ns6(source, e.relatedTarget)||source.id=="ignore"))
		return
	if (ie&&event.toElement!=source||ns6&&e.relatedTarget!=source)
	{
			//debugConsole('source: ' + source.tagName);
			//if (source == strCurrentElement)
				//return;
				if (source.current == 1)
					return;
					
			source.style.backgroundColor=originalcolor
			
	}
		//HighlightCurrent(originalcolor);
}


// Page Specific 

//--------- Marketing Articles -------\\
function ShowSignUp()
{
	var ScreenW = screen.availWidth
	var ScreenH = screen.availHeight
	var WindowW = 400
	var WindowH = 225 
	var SignUp = new Object()
	SignUp = window.open("SignUp.htm", "SignUp", "directories=0,location=0,menubar=0,resizable=1,status=0,toolbar=0,top=" + (ScreenH - WindowH) / 2 + ",left=" +
								(ScreenW - WindowW) / 2	+ ",width=400,height=225" );
	SignUp.focus();
				
}

//--------- Marketing Services -------\\
function Marketing_Services_SwapBodyText(linktype) 
{
	var bodyText
	var headlineText
	var imgSource
	
	imgSource = "../Images/shim.gif"
	
	HighlightCurrent('ECA432')
	
	strCurrentElement = event.srcElement.parentElement;
	
	alert (linktype)
	
	switch (linktype)
	{
		case "Home":
			bodyText = "Click on a section to the left for more information about our Marketing Services."
			headlineText = "";
			break;
			
		case "Market_Plan":
			bodyText = "Reviewing where you are today and sensibly developing a plan to achieve your goals " 
			bodyText = bodyText + "within your current budget. We include a thorough budget analysis, zip code & distribution "
			bodyText = bodyText + "analysis, project scheduling and recommendations for success. This is where we excel " 
			bodyText = bodyText + "in providing our full breadth of experience in the education arena.";
			headlineText = "Marketing Plan Development";
			imgSource = "../Images/Marketing_Services/FL80871.jpg"
			break;
		
		case "Brand_Image":
			bodyText = "Do you stand out in your community? <p> What does your logo say about your school and the programs and services you offer? <p> Our talented creative design team can assist you in the development and implementation of a cost effective, unique and bold brand image that will get noticed.";
			headlineText = "Brand Image and Logo Creation";
			break;
			
		case "Funnel":
			bodyText = "Fill  the funnel and stream new students into your programs! With our proprietary sales and marketing tactics, we consult with you to develop all the critical prospecting steps essential to capitalize on each of your events and marketing processes. The powerful system strengthens the value you deliver to each prospective student, significantly increasing enrollment success.";
			headlineText = "The TFS Enrollment Funnel";
			imgSource = "../Images/Marketing_Services/funnel.jpg"
			break;			
			
		case "Budget_Planning":
			bodyText = "Tools for Schools takes great care in developing an annual budget plan for all marketing expenditures to keep each client on plan and on budget. We report to you throughout the year actual versus projected expenditures as a benchmark of program success.";
			headlineText = "Budget Planning Analysis";
			break;
			
		case "ZipCode":
			bodyText = "We are experts in marketing, printing, and postal requirements which allow us to strategically guide you to the most beneficial distribution methods for your marketing related materials based on your unique requirements. We analyze where your students are coming from and how best to reach more prospective students with a plan to stay on budget.";
			headlineText = "Zip Code & Distribution Analysis";
			break;
		
		case "Comprehensive_Campaign":
			bodyText = "We take the work out of producing catalogs, newsletters, direct mail pieces, and other marketing projects because we develop a comprehensive project schedule that clearly defines timelines, responsibilities, and deadlines so that we all stay on plan and on target.";
			headlineText = "Comprehensive Campaign Project Scheduling";
			break;
		
		case "Extensive_Print":
			bodyText = "We are experts in printing and mailing with a network of strategic suppliers who partner with us everyday to produce the most cost effective and impact efficient marketing and communication pieces designed exclusively for schools. Catalogs, newsletters, brochures, direct mail, stationary, post cards, folders, flyers, or any other printed piece can be creatively designed and produced for maximum efficiency while maintaining budget responsibility.";
			headlineText = "Extensive Print Management<br> and Mailing";
			imgSource = "../Images/Marketing_Services/KS2161.jpg"
			break;
		
		case "Targeted_Student":
			bodyText = "Utilizing our zip code analysis and database segmentation, we have the ability to create a profile of your students and search for other prospective students that match the same profile within the communities that you serve. <p> We have successfully partnered with schools operating under limited budgets and helped them target specific prospects in their community with a catalog mailing based on a matched profile. This strategy can provide a positive response without the expense of blanketing catalogs throughout the entire community.";
			headlineText = "Targeted Student<br> Direct Mail Programs";
			imgSource = "../Images/Marketing_Services/FL87015.jpg"
			break;
		
		case "Business_Lead":
			bodyText = "Reaching out to businesses in your community just got easier. We have developed a successful appointment generation system that professionally sets appointments with decision makers who have an interest in your programs. This allows your sales team to spend more time selling in front of active prospects rather than investing time with the tedious and time consuming cold call appointment initiation process.";
			headlineText ="Business Lead Generation Programs";
			imgSource = "../Images/Marketing_Services/FL78349.jpg"
			break;
		
		case "Marketing_Consulting":
			bodyText = "We can consult and tackle any specific project needs you have or perhaps you would like to do it all yourself, but would like to have a professional marketing coach helping you through the process. <p> We welcome any opportunity to coach you through your marketing process by simply giving you our opinion, developing recommendations, or setting up a monthly/weekly coaching call to guide you and your marketing team to success.";
			headlineText = "Marketing Consulting and Coaching Services";
			break;
		
		case "County_Fair":
			bodyText = "We can design, develop, and produce display units or stand alone marketing booths customized to deliver your chosen message. Whatever your needs, we have a display and strategy that will help you accomplish your goals.";
			headlineText = "County Fair, Open House and Special Event Displays"
			//imgSource = "../Images/Marketing_Services/specialevent.gif";
			break;
		
		case "Public_Relations":
			bodyText = "Coming Soon!";
			headlineText = "Public Relations";
			break;
		
		case "Levy_Campaign":
			bodyText = "Coming Soon!";
			headlineText = "Levy Campaign Planning & Support";
			break;
		
		default:
			bodyText = " ";
			
		
	}
	//Swap new text in
	if(document.getElementById)
	{
		// Search for body element
		var bodyElement = document.getElementById( "lblStatus" );
		if (bodyElement)
		{
			bodyElement.innerHTML =  bodyText; 
		}
		
		// Search for headline element
		var headlineElement = document.getElementById("lblHeadline");
		if (headlineElement)
		{
			headlineElement.innerHTML =  headlineText; 
		}
		
		var imageElement = document.getElementById("imgRightSide");
		if (imageElement)
		{
			imgRightSide.src = imgSource;
		}
	}

	return true;
}

//Show nice error when trying to send email
function ShowEmailSendError()
{
	
}

function TaskOpen(sURL) 
{
	var WindowW = 510
	var WindowH = 420
	var ScreenW = screen.availWidth - 10
	var ScreenH = screen.availHeight - 45

	Wizard = window.open(sURL, "Wizard", "height=" + WindowH + ",width=" + WindowW + 
							",top=" + (ScreenH - WindowH) / 2 + ",left=" +
							(ScreenW - WindowW) / 2 + ",scrollbars=no,status=yes");
	Wizard.focus();
}