//start of data
td_1 = "Home"
td_1_1="Freeing the Mind"
url_1_1="index.html"
td_1_2="Site Map"
url_1_2="Contents.htm"
td_1_3="Tools for Transformation"
url_1_3="../index.html"

td_2 = "Self Development"
td_2_1 = "Mind Mastery"
td_2_2 = "How to Feel Good"
td_2_3 = "Mind Techniques"
td_2_4 = "30 plus Articles"
td_2_5 = "Self Development Articles"
td_2_6 = "Developing Communication Skills"
td_2_7 = "Speed Maths"
td_2_8 = "Recommended Books"
url_2_1 = "mindMastery/index.html"
url_2_2 = "FeelingGood/index.html"
url_2_3 = "MindDev/index.html"
url_2_4 = "Vignettes/index.html"
url_2_5 = "1stSelfDevelopment/index.html"
url_2_6 = "1stCommunicationSkil/index.html"
url_2_7 = "mentalArithmetic/index.html"
url_2_8 = "self_development_books.htm"
td_2_9 = "Articles-Self Improvement"
url_2_9 = "http://www.trans4mind.com/explore/self-improvement-motivation/index.html"
td_2_10 = "Articles-Personal Growth"
url_2_10 = "http://www.trans4mind.com/explore/personal-growth/index.html"
td_2_11 = "Counterpoint-Article library"
url_2_11 = "http://www.trans4mind.com/counterpoint/index.html"

td_3 = "Spiritual"
td_3_1 = "Spiritual"
td_3_2 = "Dimensional Viewpoints"
td_3_3 = "e-Prime"
url_3_1="Spiritual/index.html"
url_3_2="DimensionalViewpoints/index.html"
url_3_3="GeneralSemantics/KensEPrime.htm"
td_3_4 = "Astrology"
td_3_4_1="Main Page"
td_3_4_2="Astronomical Astrology"
td_3_4_3="Calculations"
td_3_4_4="Counselling Astrology"
td_3_4_5="Learning Astrology"
td_3_4_6="Sun Signs"
url_3_4_1="astrology/index.html"
url_3_4_2="astrology/astronomicalAstrology/index.html"
url_3_4_3="astrology/Calculations/index.html"
url_3_4_4="astrology/counsellingAstrology/index.html"
url_3_4_5="astrology/LearningAstrology/index.html"
url_3_4_6="astrology/sunSigns/index.html"
td_3_5="Kabbalah"
td_3_6="Flatland"
url_3_5="kabbalah/index.html"
url_3_6 = "Flatland/voyage_from_flatland.htm"

td_4 = "Philosophy"
td_4_1 = "Philosophy"
td_4_2 = "Theory of Mental Development"
td_4_3="General Semantics"
url_4_1 = "Philos/index.html"
url_4_2 = "Theory/indexTheory.html"
url_4_3 = "GeneralSemantics/index.html"

td_5 = "Free Downloads"
td_5_1="Zipper -Unzip Files"
url_5_1="zipper/index.html"
td_5_2="Makeup -Compress Images"
url_5_2="http://www.trans4mind.com/personal_development/convertImage/index.html"
td_5_3="Mind Mastery (pdf)"
url_5_3="mindMastery/index.html"
td_5_4="Mind Development (pdf)"
url_5_4="mindMastery/downloads.htm"

td_6="Nutrition"
td_6_1="Nutrition"
url_6_1="nutrition/index.html"
td_6_2="Stress and Health"
url_6_2="nutrition/stress/index.html"

td_7="Courses"
td_7_1="New Life Course"
url_7_1="http://www.trans4mind.com/new_life_course/index.html"
td_7_2="Mind Development Courses"
url_7_2="../mind-development/index.html"

td_8="Computer Stuff"
td_8_1="Products"
url_8_1="products.htm"
td_8_2="JavaScript Tutorial"
url_8_2="JavaScript/index.html"
td_8_3="HTML Tutorial"
url_8_3="HTMLGuide/index.html"
td_8_4="Style Sheets"
url_8_4="StyleSheets/index.html"
td_8_5="Type"
url_8_5="Type/index.html"
td_8_6="PHP Tutorial"
url_8_6="phpTutorial/index.html"
td_8_7 = "Books & Software"
url_8_7 = "JavaScript/recommended_books_and_software.htm"
td_8_8 = "Free Basic Photo Editor"
url_8_8 = "convertImage/index.html"
td_8_9 = "Encryption"
url_8_9 = "encryption/index.html"
td_8_10 = "Double & Triple Menu Software"
url_8_10 = "DoubleMenu/index.html"
td_8_11 = "Articles-Computers & Internet"
url_8_11 = "http://www.trans4mind.com/explore/computers-internet/index.html"
td_8_12 = "Articles-Online Business"
url_8_12 = "http://www.trans4mind.com/explore/online-business/index.html"
td_8_13 = "Articles-Site Promotion"
url_8_13 = "http://www.trans4mind.com/explore/site-promotion/index.html"
td_8_14 = "Articles-Web Development"
url_8_14 = "http://www.trans4mind.com/explore/web-development/index.html"
//end of data
var verticalMenu=false;	// true - the main menu runs vertically, false - horizontally
//	After change, modify same values in 1dynamicMenu.css file:
var tdColor="#800040";		// menu item text color
var tdBgColor="#C0C0C0";	// menu item background color
var hlColor="#000000";		// highlight text color
var hlBgColor="#FFFFBB";	// highlight background color
var myDelay=250;
var myTimeOutID=-1;
var myMenuData=new Object;
myMenuData=null;
function makeMenu(myTableDataItem){
	clearTimeout(myTimeOutID);
	myTableDataItem.style.backgroundColor=hlBgColor;
	myTableDataItem.style.color=hlColor;
	var i;
	var sMenuItem="";
	var tableDataArray=new Array();
	tableDataArray=myTableDataItem.id.split("_");
	if(myMenuData!=null){
		var menuItemsArray=new Array();
		menuItemsArray=myMenuData.id.split("_");
		for(i=1;i<menuItemsArray.length;i++){
			sMenuItem+="_"+menuItemsArray[i];
			if(menuItemsArray[i]!=tableDataArray[i]){
				document.getElementById("td"+sMenuItem).style.backgroundColor=tdBgColor;
				document.getElementById("td"+sMenuItem).style.color=tdColor;
				if(document.getElementById("tbl"+sMenuItem)!=null)
					document.getElementById("tbl"+sMenuItem).style.visibility="hidden";
			}
		}			
	}
	myMenuData=myTableDataItem;
	sMenuItem="tbl";
	for(i=1;i<tableDataArray.length;i++)
		sMenuItem+="_"+tableDataArray[i];
	if(document.getElementById(sMenuItem)!=null)
		document.getElementById(sMenuItem).style.visibility="visible";

}
function clearMenu(){
	if(myMenuData!=null){
		var menuItemsArray=new Array();
		menuItemsArray=myMenuData.id.split("_");
		var sMenuItem="";
		for(var i=1;i<menuItemsArray.length;i++){
			sMenuItem+="_"+menuItemsArray[i];
			document.getElementById("td"+sMenuItem).style.backgroundColor=tdBgColor;
			document.getElementById("td"+sMenuItem).style.color=tdColor;
			if(document.getElementById("tbl"+sMenuItem)!=null)
				document.getElementById("tbl"+sMenuItem).style.visibility="hidden";
		}
		myMenuData=null;			
	}
}
//go to page
function menuGo(theURL){
	location.href=theURL;
}

var tableArrayBuildItem="";
var sMenuItem="";
var myArray=new Array();
var tableArray=new Array();
function getItemPos(st){
	tableArray=st.split("_");
	if(tableArray.length>2){
		tableArray=tableArray.slice(0,-1);
		tableArrayBuildItem=tableArray.join("_");
		return (document.getElementById("tbl"+tableArrayBuildItem).offsetTop+document.getElementById("td"+st).offsetTop+4)+"px;left:"+
			(document.getElementById("tbl"+tableArrayBuildItem).offsetLeft+document.getElementById("td"+st).offsetWidth-2)+"px'>";
	}
	var p1=verticalMenu?document.getElementById("td"+st).offsetTop+4:document.getElementById("td"+st).offsetHeight-2;
	var p2=verticalMenu?document.getElementById("mainmenu").offsetWidth-4:document.getElementById("td"+st).offsetLeft+5;
	return (document.getElementById("mainmenu").offsetTop+p1)+"px;left:"+(document.getElementById("mainmenu").offsetLeft+p2)+"px'>";
}

if(document.getElementById){
var a1=verticalMenu?"":"<tr>";
var a2=verticalMenu?"":"</tr>";
var b1=verticalMenu?"<tr>":"";
var b2=verticalMenu?"</tr>":"";
var b3=verticalMenu?" style='float:left'>":">";
var sTableCode="<table class='menu' id='mainmenu' cellspacing='0'"+b3+a1;
var k=0;
var j=0;
while(eval("typeof(td_"+ ++j +")!='undefined'")){
	sTableCode+=b1+"<td id='td_"+j+"' onmouseover='makeMenu(this)' onmouseout=\"myTimeOutID=setTimeout('clearMenu()',myDelay)\"";
	sTableCode+=(eval("typeof(url_"+j+")!='undefined'"))?" onclick=\"menuGo('"+eval("url_"+j)+"')\">":">";
	sTableCode+=eval("td_"+j)+"</td>"+b2;
	if (eval("typeof(td_"+j+"_1)!='undefined'"))
		myArray[k++]="_"+j;
}
sTableCode+=a2+"</table>";
document.write(sTableCode);
for(var q=0;typeof(myArray[q])!="undefined";q++){
	sMenuItem=myArray[q];
	sTableCode="";
	j=0;
	sTableCode+="<table class='menu' id='tbl"+sMenuItem+"' cellspacing='0' style='top:"+getItemPos(sMenuItem);
	while(eval("typeof(td"+sMenuItem+"_"+ ++j +")!='undefined'")){
		sTableCode+="<tr><td id='td"+sMenuItem+"_"+j+"' onmouseover='makeMenu(this)' onmouseout=\"myTimeOutID=setTimeout('clearMenu()',myDelay)\"";
		sTableCode+=(eval("typeof(url"+sMenuItem+"_"+j+")!='undefined'"))?" onclick=\"menuGo('"+eval("url"+sMenuItem+"_"+j)+"')\">":">";
		sTableCode+=eval("td"+sMenuItem+"_"+j)+"</td></tr>";
		if (eval("typeof(td"+sMenuItem+"_"+j+"_1)!='undefined'"))
			myArray[k++]=sMenuItem+"_"+j;
	}
	sTableCode+="</table>";
	document.write(sTableCode);
}
document.getElementById("mainmenu").style.visibility="visible";
}
else document.write("<p>This code does not work in your browser because it isn't IE5 or Nav6 or better.</p>");
