// JavaScript Document
function openWindowCMain1() {
  popupWin = window.open('links/docs_login.php?category=main', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}

function openWindowC3(mypage) {
  popupWin = window.open(mypage, 'remote', 'resizable,scrollbars=yes,width=550,height=600,left=20,top=20')
}

 function openWindowCoach1() {
  popupWin = window.open('links/docs_login.php?category=coch', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}
 function openWindowCoach2() {
  popupWin = window.open('links/docs_login.php?category=coch1', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}
 function openWindowCoach8() {
  popupWin = window.open('links/docs_login.php?category=coch2', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}
function openWindowCoach4() {
  popupWin = window.open('links/links_login.php?category=coch', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}

function openWindowC3(mypage) {
  popupWin = window.open(mypage, 'remote', 'resizable,scrollbars=yes,width=550,height=600,left=20,top=20')
}

function openWindowCplyr1() {
  popupWin = window.open('links/player_login.php', 'remote', 'resizable,scrollbars=yes,width=450,height=600,left=20,top=20')
}

function openWindowCsch1() {
  popupWin = window.open('links/schedule_login.php', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}

 function openWindowCspon1() {
  popupWin = window.open('links/links_login.php?category=spon1', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}
 function openWindowCspon3() {
  popupWin = window.open('links/links_login.php?category=spon2', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}
function openWindowCspon4() {
  popupWin = window.open('links/links_login.php?category=spon3', 'remote', 'resizable,scrollbars=yes,width=450,height=400,left=20,top=20')
}

function checkParent( src, tagName ) {
	while ( src != null ) {
		if (src.tagName == tagName) 
			return src;
		src = src.parentElement;
	}
	return null;
}

	
// Returns the first tag with tagName contained by
// the src tag. If no such tag is found - null is returned.
function checkContent( src, tagName ) {
	var pos = src.sourceIndex ;
	while ( src.contains( document.all[++pos] ) )
		if ( document.all[pos].tagName == tagName )
			return document.all[pos] ;
	return null ;
}

      
// Handle onClick event in the outline box
function outlineAction() {     
	var src = event.srcElement ;
	var item = checkParent( src, "LI" ) ;

	if ( parent != null ) {
		var content = checkContent( item, "UL" ) ;

		if ( content != null )
			if ( content.style.display == "" )
				content.style.display = "block" ;
			else
				content.style.display = "" ;
	}
	event.cancelBubble = true;
}
