//names of dropdowns stored here
mlist=new Array()
mlist[0]="Home"
mlist[1]="ChildCare"
mlist[2]="Family"
mlist[3]="Community"
mlist[4]="AboutUs"
mlist[5]="ContactUs"
mlist[6]="Finance"
mlist[7]="HR"
mlist[8]="Donation"
mlist[9]="Publications"
mlist[10]="Support"

statusl=new Array()
statusl[0]="***go to Home of Tri-City***"
statusl[1]="***go to Department of Child Care***"
statusl[2]="***go to Family Development Services***"
statusl[3]="***go to Office of Community and Economic Development***"
statusl[4]="***go to About Us***"
statusl[5]="***go to Contact Us***"
statusl[6]="***go to Finance Department***"
statusl[7]="***go to Human Resources Deparment***"
statusl[8]="***make a donation***"
statusl[9]="***Get our publications***"
statusl[10]="***Family Support Services***"



var desp=new Array()
desp[0]="Tri-City Peoples Corp's Home"
desp[1]="We love your child as much as you do. Click to view child care program for children 2 1/2 to 13 years of old"
desp[2]="Click to view our Family Development Services and more..."
desp[3]="Click to view what we do for your neighborhood and community for both young and old"
desp[4]="Click to view our company's history, our mission statement"
desp[5]="Want to contact us? It is easy."
desp[6]="Financial froms and reports."
desp[7]="Infomation for Tri-City employees and job hunters"
desp[8]="Make a donation to us"
desp[9]="Get your publications toaday"
desp[10]="Click to view our Family Support Services"

var dropmenu=new Array()
dropmenu[0]="d_Family"
dropmenu[1]="d_Community"
dropmenu[2]="d_Finance"
dropmenu[3]="d_AboutUs"
dropmenu[4]="d_HR"
dropmenu[5]="d_Support"
dropmenu[6]="d_PUB"

var mousex
var mousey
var x_min
var y_min
var x_max
var y_max

//browser check
var ie4=(document.all)?1:0
var ns4=(document.layers)?1:0
var ns6=document.getElementById&&!document.all?1:0

//code for drops

function showdrop(id,dropID){
	if(dropID){
		keep=dropID
		hideall()
		showit(dropID)
		showitnow=1
	}		
		
	for (i=0; i<mlist.length; i++){
		if(id==mlist[i]){
			eval(mlist[i]+'.className="menuh_'+mlist[i]+'"')
			if(!dropID){
				x=getObj(id)
				x.cursor='hand'
				}
			movein(desp[i])
			window.status=statusl[i]
			}
		else
			eval(mlist[i]+'.className="menu"')
		}		
}
	
function showSub(parID, id){
	keep=id
	hideall()
	showit(id)
	showitnow=1
	eval(parID+'.className="menuh_'+parID+'"')
	
	for (i=0; i<mlist.length; i++){
		if(parID==mlist[i]){
			movein(desp[i])
			window.status=statusl[i]
			}
	}
}	

function hideSub(parID){
	eval(parID+'.className="menu"')
	moveout()
	keep=null
	hideit=1
	hideall()
	window.status="Tri-City Peoples's Corp"
	}
	
function showit(dropID){
	if(ie4){ 
		eval(dropID+'.style.visibility="visible"') 
		}
	if(ns4){ 
		eval('document.'+dropID+'.visibility="show"')
		}
	}	
		
function hidedrop(thisobj){
	if(thisobj)
		thisobj.className='menu'
	moveout()
	keep=null
	setTimeout('hideall()', 100)
	window.status="Tri-City People's Corp"
	}
	


function hideall(){
	for(i=0;i<dropmenu.length;i++){  
		hideit=0;
		checkmousepos(i) 
		if(ie4 && keep!=dropmenu[i]){ 
			if(hideit){ eval(dropmenu[i]+'.style.visibility="hidden"')
						 } 
			}
		if(ns4 && keep!=dropmenu[i]){ 
			if(hideit){ eval('document.'+dropmenu[i]+'.visibility="hide"')
						 }
			}
		}
	}

//deal with cursor over layer
document.onmousemove = getmousepos
if (ns4) document.captureEvents(Event.MOUSEMOVER)

function getmousepos(e){
	if(ns4){
		mousex=e.pageX; 
		mousey=e.pageY;
		}
	if(ie4){
		mousex=event.clientX; 
		mousey=event.clientY;
		}
	}

function checkmousepos(i){          
	if(ns4){     
		x_min=eval('document.'+dropmenu[i]+'.left')
		x_max=x_min+eval('document.'+dropmenu[i]+'.clip.width')
		y_min=eval('document.'+dropmenu[i]+'.top')
		y_max=y_min+eval('document.'+dropmenu[i]+'.clip.height')
		}    
	if(ie4){     
		x_min=eval(dropmenu[i]+'.style.pixelLeft')
		x_max=x_min+eval(dropmenu[i]+'.style.pixelWidth')
		y_min=eval(dropmenu[i]+'.style.pixelTop')
		y_max=y_min+eval(dropmenu[i]+'.style.pixelHeight')
		}
	if (mousex>=x_min && mousex<=x_max && mousey>=y_min && mousey<=y_max){
		hideit=0;
		keep= dropmenu[i]
		setTimeout('hideall()',100)
		}
	else { hideit=1 }
	return hideit
}


function getObj(name){
	if(document.getElementById)
		return document.getElementById(name).style;
	else if(document.all)
		return document.all[name].style;
	else if(document.layers)
		return document.layers[name];
	else
		return false
	}

//description of menu
function movein(html){
	if(ie4){ 
		eval('boxdescription.style.visibility="visible"') 
		}
	if(ns4){ 
		eval('document.boxdescription.visibility="show"')
		}
	if (document.getElementById)
 		document.getElementById("boxdescription").innerHTML=html
	else {
 		boxdescription.innerHTML=html;
		}
}


function moveout(){
	
	if (document.getElementById)
 		document.getElementById("boxdescription").innerHTML='&nbsp;'
	else
 		boxdescription.innerHTML='&nbsp;'
	if(ie4){ 
		 eval('boxdescription.style.visibility="hidden"')  
		}
	if(ns4){ 
		 eval('document.boxdescription.visibility="hide"') 
		}

}

//open new window for financial forms
function openWindow(url){
	window.open(url, 'fin2000', 'scrollbars=yes, width=800, height=600')
	}

//code for news scroll
var thissize=10
var textfont="Verdana"

var textcolor= new Array()
textcolor[0]="EEEEEE"
textcolor[1]="DDDDDD"
textcolor[2]="CCCCCC"
textcolor[3]="AAAAAA"
textcolor[4]="888888"
textcolor[5]="666666"
textcolor[6]="555555"
textcolor[7]="444444"
textcolor[8]="333333"
textcolor[9]="222222"
textcolor[10]="111111"
textcolor[11]="000000"

title_s="<a href='javascript:mouseOnNews()'><font face='Comic Sans MS' size=2 color=#0000ff>"
title_f="</font></a><br>"
text_s="<font face='Arial' size=2s color=#660066>"
var message = new Array()
message[0]= title_s+"Millennium Partners Institute" + title_f
message[0] +=text_s+"High school students ages 14-18 are encouraged to participate in our after school MPI program. <br>"
message[0] +="Every Tuesday and Thursday from 3:00 pm to 5:00 pm.</font><br>"
message[0] +="<font face='Comic Sans MS' size=2 color=#CC3300>Come and enjoy a program that will enrich you!</font>"
message[1]= title_s+"Enroll For Child Care" + title_f
message[1] +=text_s+"Multi-Cultural child care for children 2 1/2 to 13 years of age.<br>"
message[1] += "Quality child care that will provide children with the skill they require to grow intellectually, socially, emotionally and physically.</b></font>"

var i_blurstrength=10
var i_message=0
var i_textcolor=0

var stopRolling=0

function blurtext() {		
	if(document.all) {
		if (i_blurstrength >=-2) {
			if (i_textcolor >=textcolor.length-1) {
				i_textcolor=textcolor.length-1
			}
			blurthis.innerHTML="<span id='blurpit1' style='position:absolute;visibility:visible;width:180px;top:3px;left:3px;filter:blur(add=0,strength="+i_blurstrength+",direction=90);font-family:"+textfont+";font-size:"+thissize+"pt;color:"+textcolor[i_textcolor]+"'>"+message[i_message]+"</span>";
			document.close()
			i_blurstrength=i_blurstrength-2
			i_textcolor++
			var timer1=setTimeout("blurtext()",60)
			}
		else {
			if (i_textcolor >=textcolor.length-1) {
				i_textcolor=textcolor.length-1
				}
				blurthis.innerHTML="<div id='blurit1' style='position:absolute;visibility:visible;width:180px; top:3px;left:3px;filter:blendTrans(duration=4.2);font-family:"+textfont+";font-size:"+thissize+"pt;color:000000'>"+message[i_message]+"</div>";
				i_message++
				if (i_message>=message.length){
					i_message=0
				}
				i_blurstrength=20
				i_textcolor=0
				clearTimeout(timer1)
				var timer2=setTimeout("blurtext()",8000)
			}
		}	
	}
	
function mouseOnNews(){
	document.location="news.htm"
}
	
	


