function article()							// Run for every document, executed only for Article
	{
	if (document.title == "Articles")				// Checks if this document is Articles
		{							// If so, inserts code for the Article pulldown
		document.write("<select name='Articles' onChange=\"MM_jumpMenu('parent',this,1)\"><option id='articles' value='http://www.donaldpbeck.com/articles.html' selected>12 Ways Landlords Discriminate Against Prospective Tenants</option><option id='develop' value='http://www.donaldpbeck.com/articles/develop.html'>Develop a Checklist to Screen Prospective Tenants</option><option id='rents' value='http://www.donaldpbeck.com/articles/rents.html'>Raise Rents to Increase Your Net Worth</option><option id='list' value='http://www.donaldpbeck.com/articles/list.html'>List Tenant Caused Damages as Additional Rent</option><option id='change' value='http://www.donaldpbeck.com/articles/change.html'>Can You Change a Lock in 3 Seconds?</option><option id='lock' value='http://www.donaldpbeck.com/articles/lock.html'>A Must Job&ndash;Change Locks Between Tenants</option><option id='pets' value='http://www.donaldpbeck.com/articles/pets.html'>Pets Can Be a Cash Flow Generator</option><option id='renter1' value='http://www.donaldpbeck.com/articles/renter1.html'>Renters Insurance - A Good Deal for Tenants AND Landlords: Part I</option><option id='renter2' value='http://www.donaldpbeck.com/articles/renter2.html'>Renters Insurance - A Good Deal for Tenants AND Landlords: Part II</option><option id='vacant' value='http://www.donaldpbeck.com/articles/vacant.html'>Vacant Units Before Settlement Can Be a Plus</option></select><br>");
		var option = document.getElementsByTagName("option");
		for (j=0; j<option.length; j++)
			{
			var str = option[j].id + ".html";
			if (document.location.href.search(str) != -1)	// Checks the document's URL against each option's value
				{					// If the  document's URL matches the option's value, the Article's title becomes the document's title
				document.title = "Articles - " + option[j].innerHTML;
				option[j].selected = "selected";	// The Article's title becomes the selected option
				}
			}
		}
	}
function course()
	{
	if (document.title == "Course Description")			// Checks if this document is Course Description
		{							// Inserts a link to Order Form
		document.write("<td colspan='3' class='bottom'><a class='footer' href='http://donaldpbeck.com/cgi-bin/online/store.php' target='_self' title='Order Now'>Order Now</a></td>");
		}
	if (document.title == "Order Form")				// Checks if this document is Order Form
		{							// Inserts a link to Course Description
		document.write("<td colspan='3' class='bottom'><a class='footer' href='course.html' target='_self' title='Course Description'>Course Description</a></td>");
		}
	else
		document.write("<td colspan='3'>&nbsp;</td>");
		
	}
function cruiseArticle()						// Run for every document, executed only for Cruise - Article
	{
	if (document.title == "National REIA Cruise - Articles")	// Checks if this document is Cruise - Articles
		{
		var option = document.getElementsByTagName("option");
		for (j=0; j<option.length; j++)
			{
			var str = option[j].id + ".html";
			if (document.location.href.search(str) != -1)	// Checks the document's URL against each option's value
				{					// If the document's URL matches the option's value, the Cruise - Article's title becomes the document's title
				document.title = "National REIA Cruise - Articles - "+option[j].innerHTML;
				option[j].selected = "selected";	// The Cruise - Article's title becomes the selected option
				}
			}
		}
	}
function cruise()							// Called by table(), executed only for Cruise
	{
	if (document.title == "National REIA Cruise")			// Checks if this document is Cruise
		{
		document.title = "National REIA Cruise - Articles";	// Sets the document's title to Cruise - Article
		var tab = document.getElementById("tab1");
		selectIt(tab);						// 'Selects' the initial tab, Articles
		document.getElementById("content1").style.display = "block";	// Displays the initial content,  Articles
		document.getElementById("content2").style.display = "none";	// Hides the other content, Testimonials
		document.getElementById("content3").style.display = "none";	// Hides the other content, Registration
		cruiseArticle();
		}
	}
var targ;								// div.tab#tab_ that is clicked in Cruise
function deSelectIt(temp)						// Changes the style of the given element to 'deselect' it
	{
	temp.style.borderStyle = "outset";
	temp.style.borderColor = "#003366";
	temp.style.backgroundColor = "#003366";
	temp.style.color = "#80BFFF";
	temp.style.textDecoration = "none";
	}
function extraLink()							// Performs the same function as hover(), but for the subsequent documents of Articles and Cruise. Called by table().
	{
	var links = document.getElementsByTagName("a");			// Creates a collection of all the links.
	for (i=0; i<links.length; i++)
		{							// Checks all the links to see if they are in the title, for both Article and Cruise
		if (((!document.title.search("Articles"))&&(links[i].innerHTML == "Articles"))||((!document.title.search("National REIA Cruise"))&&(links[i].innerHTML == "National REIA Cruise")))
			{
			selectIt(links[i]);				// 'Selects' the link
			links[i].style.textAlign = "right";
			}
		}
	}
function getObj(objectId)						// Given an id, returns the object with that id, regardless of platform
	{
	if (document.getElementById)					// Netscape
		{
		this.obj = document.getElementById(objectId);
		this.style = document.getElementById(objectId).style;
		}
	else if (document.all)						// MSIE
		{
		this.obj = document.all[objectId];
		this.style = document.all[objectId].style;
		}
	else if (document.layers)					// Opera, Safari? I don't even remember
		{
	 	this.obj = document.layers[objectId];
	 	this.style = document.layers[objectId];
		}
	}
function hover()
	{
	for (i=1; i<=12; i++)						// A loop for each of the 12 links
		{
		var temp = "global" + i;				// Creates a variable 'temp' by concantenating global with a number for each of the links
		var name = new getObj(temp);				// Creates a variable 'name' with getObj(), returning the link with the id supplied by 'temp'
		var title = document.title;				// Retrieves the document's current title
		if (name.obj.title == title)				// Compares the link's title with the document's title
			{
			selectIt(name);					// If they are the same, this block 'selects' that link
			name.style.textAlign = "right";
			}
		}
	}
function MM_jumpMenu(targ,selObj,restore)				// Changes the document location when a new option is selected
	{
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore)
		{
		selObj.selectedIndex = 0;
		}
	}
function page()
	{
	document.write("<TITLE>Donaldpbeck.com, the home of Donald Beck, Realtor, Landord, Author</TITLE><META NAME='description' CONTENT='Real Estate, Landording made easy with Donald Beck's Course. Buy his new book, read online articles, and purchase his course!'><META NAME='keywords' CONTENT='real estate , real , estate , realtor , realator , land , lord , landlord , land-lord , course , don , beck , donald , p. , beck's , book , tips , buy , advice , purchase , read , articles'>");
	}
function selectIt(temp)							// Changes the style of the given element to 'select' it
	{
	temp.style.borderStyle = "inset";
	temp.style.borderColor = "#BFDFFF";
	temp.style.backgroundColor = "#BFDFFF";
	temp.style.color = "#002244";
	temp.style.textDecoration = "underline";
	}
function tab(temp)							// Manipulates the div.tab#tab_ in Cruise when it is clicked
	{
	var tab = document.getElementsByTagName("div");			// Creates a collection of all the 'div' tags
	for (i=0; i<tab.length; i++)
		{
		if (tab[i].className == "tab")				// Checks to see if the div is div.tab
			{						// 'Deselects' all of the tabs
			deSelectIt(tab[i]);
			}
		}
	if (temp == 1)							// If the div.tab is div.tab#tab1
		{
		targ = document.getElementById("tab1");			// Sets the global variable of 'targ' to div.tab#tab1

		}
	if (temp == 2)							// If the div.tab is div.tab#tab2
		{
		targ = document.getElementById("tab2");			// Sets the global variable of 'targ' to div.tab#tab2
		}
	if (temp == 3)							// If the div.tab is div.tab#tab3
		{
		targ = document.getElementById("tab3");			// Sets the global variable of 'targ' to div.tab#tab3
		}
	selectIt(targ);							// 'Selects' the div.tab#tab_
	document.title = "National REIA Cruise - " + targ.innerHTML;	// Sets the document's title to the tab name
	tabSwitch("content1");						// Calls tabSwitch() for each of the tab's content
	tabSwitch("content2");
	tabSwitch("content3");
	cruiseArticle();						// Calls cruiseArticle() to update the title
	}
function tabSwitch(name)						// Takes the id given and compares it to it's related content
	{
	var div = document.getElementById(name);			// Sets 'div' to the element with the given id
	div.style.display = "none";					// Hides the contents of the div
	if (div.className == targ.id)					// If the div's class is the same as the tab's id
		{
		div.style.display = "block";				// Shows that tab's contents
		}
	}
function table()							// Closes the body of every document, inserts the navigation, and calls some functions needed by every document
	{
	document.write("</td><td class='links'><a class='global' id='global1' href='http://www.donaldpbeck.com/index.html' name='home' target='_self' title='Home'>Home</a><a class='global' id='global2' href='http://www.donaldpbeck.com/about.html' name='about' target='_self' title='About Don'>About Don</a><a class='global' id='global3' href='http://www.donaldpbeck.com/course.html' name='course' target='_self' title='Course Description'>Course Description</a><a class='global' id='global4' href='http://donaldpbeck.com/cgi-bin/online/store.php' name='order' target='_self' title='Order Form'>Order Form</a><a class='global' id='global5' href='http://www.donaldpbeck.com/articles.html' name='articles' target='_self' title='Articles'>Articles</a><a class='global' id='global6' href='http://www.donaldpbeck.com/test.html' name='test' target='_self' title='Testimonials'>Testimonials</a> <!-- <a class='global' id='global7' href='http://www.donaldpbeck.com/sched.html' name='sched' target='_self' title='Speaking Schedule'>Speaking Schedule</a> --> <a class='global' id='global8' href='http://www.donaldpbeck.com/cruise.html' name='cruise' target='_self' title='National REIA Cruise'>National REIA Cruise</a><a class='global' id='global9' href='http://www.donaldpbeck.com/laws.html' name='laws' target='_self' title=\"Beck's Laws\">Beck&prime;s Laws</a><a class='global' id='global10' href='http://www.donaldpbeck.com/find.html' name='find' target='_self' title='Find REIA Group'>Find REIA Group</a><a class='global' id='global11' href='http://www.donaldpbeck.com/answer.html' name='answer' target='_self' title='Can You Answer These?'>Can You Answer These?</a><a class='global' id='global12' href='http://www.donaldpbeck.com/tips.html' name='answer' target='_self' title='Survival Tips'>Survival Tips</a></td></tr><tr>");
	course();
	document.write("</tr><tr><td colspan='3' class='bottom'><a class='footer' href='#top' target='_self' title='Top'>&nbsp;Top&nbsp;</a>&nbsp;&nbsp;&nbsp;<a class='footer' href='http://www.donaldpbeck.com/index.html' target='_self' title='Home'>Home</a></td></tr></table>");
	hover();							// 'Selects' the navigation link of the document
	cruise();							// Calls cruise(), a function specific to any Cruise document
	extraLink();							// Calls extraLink(), a function similar to hover(), specifically to the extra Cruise and Article documents
	}
document.write("<a name='top'></a><table style='width:100%;height:auto;'><tr><td colspan='3' class='banner'><div class='banner'>"/*<a name='top'><img src='http://www.donaldpbeck.com/resources/donald.png'></a><br><img style='text-align:center' src='http://www.donaldpbeck.com/resources/hr.png'>*/+"Donald P. Beck<br><hr noshade color='#003366' size='3'></div></td></tr><tr><td style='width:10%;'>&nbsp;</td><td class='body'>");
									// ^ Sets up the header of every document
article();								// Calls article(), a function specific to any Article document
cruiseArticle();							// Calls cruiseArticle(), a function, in this context, specific to any Cruise document with articles excluding 'cruise.html'
page();


/*----------------------------------------------------------------------
The term 'select' indicates a tab or link which has been clicked,
	denoting its appearance as having been selected.
This has no connection with the HTML element, <select></select>.
Any link starting with 'http://www.donaldpbeck.com/' needs to be relative to the
	Site Root, not the document. The current link is only temporary.
Any link beginning without the above, or with '../', is relative to the
	document, and can be left as such provided the file structure
	stays the same.
Currently, the site is fully functioning in MSIE 4+, MacIE 5+, and
	Netscape 5+. As no client should be using MSIE below 4+, MacIE
	below 5+, or Netscape below 5+, that is not of consequence.
----------------------------------------------------------------------*/