oc=0;
fg=0;

function capit(w) {
	capLetter=w.charAt(0).toUpperCase();
	return capLetter+w.substring(1,w.length);
}

function populateMenu(m){
	dr='/streams/asx/';
	ar='<img src="images/clipArrow.gif" width="6" height="7" alt="" align="absmiddle">';
	endStr='<div>'+capit(m)+'</div>';
	endStr+='Choose your<br>connection speed:<br><img src="/images/clr.gif" width="5" height="5"><br>';
	endStr+=ar+'<a href="'+dr+m+'H.asx">High</a> ';
	endStr+='<span>T1/T3</span><br>';
	endStr+=ar+'<a href="'+dr+m+'M.asx">Medium</a> ';
	endStr+='<span>Cable, DSL</span><br>';
	endStr+=ar+'<a href="'+dr+m+'L.asx">Low</a> ';
	endStr+='<span>56k, Dial-Up</span>';
	return endStr;
}

function openClip(c){
	closeAllClips();
	targetMenu=document.getElementById(c).getElementsByTagName('div')[0];
	targetMenu.innerHTML=populateMenu(c);
	targetMenu.style.visibility='visible';
	oc=1;
}

function hideClip(){
	if(oc){
		timer=setTimeout('closeAllClips()',300);
		fg=1;
	}
}

function keepClip(){
	if(fg){
		clearTimeout(timer);
		fg=0;
	}
}

function closeAllClips(){
	allClips=document.getElementsByTagName('div');
	for (i in allClips){
		if(allClips[i].className=='vidClip')
			allClips[i].getElementsByTagName('div')[0].style.visibility='hidden';
	}
	oc=0;
}