var occupied_header = new Array();
var occupied_menu = new Array();
//email address getting and posting function
function message_post(form) {
var email_address=document.contact_info.email.value;
var regExpObject = /\w+\@+\w+\.+\w/;
if (email_address=="" ||regExpObject.test(email_address)==false)
                                                                                                                                                                                                                       
{
alert ("Please, input correct email address.");
document.contact_info.action="";
}
else
{
document.contact_info.action="mailto:newsletter@hope4kidz.org?subject=Newsletter Sign-Up";
document.contact_info.method="post";
}
}
//end  function

//contact information getting and posting function
function contact_post() {
var client_name=document.contact.name.value;
 email_address=document.contact.email.value;
 client_comment=document.contact.comment.value;

if (client_name=="") 
{
alert ("Please, input your name.");
return false;
}
else
{

var regExpObject = /\w+\@+\w+\.+\w/;
if (email_address=="" ||regExpObject.test(email_address)==false)
{
alert ("Please, input correct email address.");
return false;
	}

else
{
document.contact.action="mailto:info@hope4kidz.org?subject=Contact";
document.contact.method="post";
}
}
}
//end  function

for(i=1;i<=7;i++) {
	occupied_header[i] = 0;
	occupied_menu[i] = 0; 
}

function CreateLayer(text, id, t, l) {
	if(document.layers)
	{
		var str="<LAYER ID=smenu" + id + " TOP=" + t
		+ " LEFT=" + l + " onmouseover=\"occupied_menu["
		+ id + "]=1;\" onmouseout=\"Turn('"
		+ id + "',0);occupied_menu[" + id
		+ "]=0;\" VISIBILITY=hide>"
		+ text + "</LAYER>";
		document.write(str);
	}
	else if(document.getElementById)
	{
		var strng="<div id=smenu" + id + " style=\"position:absolute;top:"
		+ t + ";left:" + l
		+ ";visibility:hidden;width:100;filter:alpha(opacity=90);z-index:100\""
		+ " onmouseover=\"occupied_menu[" + id
		+ "]=1;\" onmouseout=\"Turn('" + id
		+ "',0);occupied_menu[" + id
		+ "]=0;\">" + text + "</div>";
		document.write(strng);
	}
}
 
function Turn(id, mode) {
	if(document.layers || document.getElementById) {
		if(mode)
			eval("setTimeout(\"On(" + id + ", " + mode + ");\",100)");
		else {
			eval("setTimeout(\"Off(" + id + ", " + mode + ");\",100)");
		}
	}
}

function On(id, mode){
	if(occupied_header[id])
		if(document.getElementById)
			eval("smenu" + id).style.visibility = 'visible';
		else if(document.layers)
			eval("document.layers['smenu" + id + "']").visibility = "show";
	}
 
function Off(id, mode){
	if(!occupied_menu[id] && !occupied_header[id])
		if(document.getElementById)
			eval("smenu" + id).style.visibility = 'hidden';
		else if(document.layers)
			eval("document.layers['smenu" + id + "']").visibility = "hide";
}

txt = new Array();
//About
txt[0] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"85\">"
    	+ "<tr bgcolor=\"#E3FAFF\">"
	+ "<td>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "aboutus/aboutus.html\">About Us</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "aboutus/contactus.html\">Contact Us</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "aboutus/feedback.html\">Feedback</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "aboutus/how2Help.html\">How2Help</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "aboutus/mission.html\">Mission</a><br>"
	+ "</td>"
	+ "</tr></table>";
//Forums
txt[1] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"130\">"
    	+ "<tr bgcolor=\"#E3FAFF\">"
	+ "<td>"
	
	+ "<a class=\"menuItemPop\" href=\"" + "http://pub39.bravenet.com/guestbook/3280808867\">Guestbook</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + "http://pub39.bravenet.com/forum/show.php?usernum=3280808867&cpv=1\">Msgs.4 Kids</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + "http://com1.runboard.com/bhope4kidzfindingsolutions4children\">SpeakOut Forum</a><br>"
//	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "forums/forums.html\">Solutions</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "forums/Wall.html\">The Memory Wall</a><br>"
//	+ "<a class=\"menuItemPop\" href=\"" + "http://pub39.bravenet.com/chat/show.php/3280808867\">H4K Chat Room</a>"
	+ "</td>"
	+ "</tr></table>";
//Humanitarian
txt[2] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"145\">"
    	+ "<tr bgcolor=\"#E3FAFF\">"
	+ "<td>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "humanitarian/ashleigh.html\">Ashleigh's Luggage</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "humanitarian/blossom.html\">Blossom International</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/kayla/tombstone.html\">Kayla's Tombstone Project</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "humanitarian/paige.html\">Paige's Clothes</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "humanitarian/pgs.html\">RTC Help</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "humanitarian/soc.html\">SOC Day</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "humanitarian/newMoms.html\">Young Moms</a><br>"
	
	+ "</td>"
	+ "</tr></table>";
//Links
txt[3] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"120\">"
    	+ "<tr bgcolor=\"#E3FAFF\">"
	+ "<td>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "links/attorney.html\">Attorney</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + 
 "links/doctor.html\">Doctor</a>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + 
 "links/guardian.html\">Guardian AL</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + 
"links/judge.html\">Judge</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "links/therapist.html\">Therapist</a><br>"

	+ "</td>"
	+ "</tr></table>";
//News
txt[4] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"150\">"
    	+ "<tr bgcolor=\"#E3FAFF\">"
	+ "<td>"
	
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "news/dayStar.html\">Day Star</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "news/forgottenChildren.html\">Forgotten Children</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "news/kidsNews.html\">H4K Kids In The News</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "kids_cry/kids_cry.html\">Kids Cry</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "news/restraint.html\">Restraint Deaths</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "news/FLDS.html\">FLDS</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "news/statewide.html\"> * Statewide News</a><br>"
	
	
	
	
	+ "</td>"
	+ "</tr></table>";
//Research
txt[5] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"154\">"
    	+ "<tr bgcolor=\"#E3FAFF\">"
	+ "<td>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "research/childCareLic.html\">Child Care Licensing</a><br>"
//	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "research/reportAbuse.html\">Report Abuse</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "research/rtcArea.html\">RTC / Area</a><br>" 
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "research/rtcGrant.html\">RTC / Grant Funds</a><br>"
//	 + "<a class=\"menuItemPop\" href=\"" + pathRoot + "research/rtcCitations.html\">RTC / Citations</a><br>"
//	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "research/rtcClosing.html\">RTC / Closing</a>" 
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "research/rtcWatch.html\">RTC / Watch</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "research/texas.html\"> * Texas Laws </a><br>"
	+ "</td>"
	+ "</tr></table>";
//Stories  http://www.hope4kidz.org/
txt[6] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"140\">"
    	+ "<tr bgcolor=\"#E3FAFF\">"
	+ "<td>"
    + "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/3-boys/threeboys.html\">Three Boys</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/lisa_amber/amberLisa.html\">Amber & Lisa</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + 
"stories/bobbiekay/bobbieKay.html\">Bobbie Kay</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot +                   "stories/bobbieLynn.html\">BobbieLynn</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/briana.html\">Briana</a><br>" 
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + 
 "stories/cole.html\">Cole</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/crystal/crystal_UK.html\">Crystal</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + 
 "stories/jorden.html\">Jorden Grace</a><br>"
	//+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/joshua/joshua.html\">Joshua Smith</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/kathy.html\">Kathy</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + 
"stories/kayla/k_a.html\">Kayla Allen</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + 
"stories/kendall.html\">Kendall Hunt</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/kristen.html\">Kristen</a><br>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/lex_wesley/lexi_wesley.html\">Lexi & Wesley</a><br>"
//	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/rebekah.html\">Rebekah</a><br>" 

//	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/brandy.html\">Brandy</a><br>"


	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "stories/trevor/trevor.html\">Trevor Nolan</a><br>"
	+ "</td>"
	+ "</tr></table>";
//SiteMap
txt[7] = "<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" width=\"140\">"
    	+ "<tr bgcolor=\"#E3FAFF\">"
	+ "<td>"
	+ "<a class=\"menuItemPop\" href=\"" + pathRoot + "site_map.html\">Site Map</a>"
	+ "</td>"
	+ "</tr></table>";
CreateLayer(txt[0], 0, 150, 190);  
CreateLayer(txt[1], 1, 150, 238);  
CreateLayer(txt[2], 2, 150, 298);  
CreateLayer(txt[3], 3, 150, 394);  
CreateLayer(txt[4], 4, 150, 440);  
CreateLayer(txt[5], 5, 150, 486);  
CreateLayer(txt[6], 6, 150, 560);  
CreateLayer(txt[7], 7, 150, 680);  