function createObjCss(divId,nest){var obj = (bw.ns && nest) ? d.layers[nest].document.layers[divId] : (bw.ns) ? document.layers[divId] : (bw.ie4) ? d.all[divId] : (bw.ie5Plus || bw.ns6) ? d.getElementById(divId) : false ; return obj;}
function createObjStyle(divId,nest){var obj = (bw.ns&&nest)? d.layers[nest].document.layers[divId]:(bw.ns)?d.layers[divId]:(bw.ie4)?d.all[divId].style:(bw.ie5Plus||bw.ns6)?d.getElementById(divId).style:false;return obj;}
function xLeft_pos (obj){var xLeft = (bw.ns)? obj.pageX : obj.offsetLeft;return xLeft;}
function yTop_pos (obj){var yTop = (bw.ns)? obj.pageY : obj.offsetTop;return yTop;}
function get_Height (obj){var iHeight = (bw.ns)? obj.clip.bottom : obj.offsetHeight;return iHeight;}
function get_Width (obj){var iWidth = (bw.ns)? obj.clip.right : obj.offsetWidth;return iWidth;}

function writeInObj(objN,nest,sTxt){
var obj=(nest!=''&&bw.ns)? d.layers[nest].document.layers[objN] : createObjCss(objN);
	if (bw.ns){	obj.document.open();obj.document.write(sTxt);obj.document.close();}
	else{obj=createObjCss(objN);obj.innerHTML = sTxt;}
}


var timerId = setTimeout("",10);
var scrollObj="";var objY="";var objH="";var obj1="";var obj2="";
var iSpeed=20;var whichS="";

function scroll_up(div1,div2,iV){
if((get_Height(createObjCss(div2))-get_Height(createObjCss(div1,div2)))>0){turnOnFlash();return;}
	
	if (scrollObj==''){
		scrollObj=createObjStyle(div1,div2);
		obj1=div1;obj2=div2;}
		else{scrollObj=createObjStyle(obj1,obj2);}
objY=scrollObj.top;
	if (objY==''){
		scrollObj='';
		turnOnFlash();
		return false;
	}
objY=parseInt(objY);
if(objY+22==0){turnOnFlash();return;}
scrollObj.top=(objY+8)>0?objY+1:objY+8;
timerId = setTimeout("scroll_up(obj1,obj2,whichS)",iSpeed);
}

function scroll_down(div1,div2,iV){
	if (scrollObj==''){
		scrollObj=createObjStyle(div1,div2);
		obj1=div1;obj2=div2;
	}else{
		scrollObj=createObjStyle(obj1,obj2);
	}
objY=scrollObj.top;
	if (objY==''){
		scrollObj.top=0;
		objY=scrollObj.top;
	}
objY=parseInt(objY);
	if (objY<(0-(get_Height(createObjCss(obj1,obj2))-get_Height(createObjCss(obj2))))){
		flashIsUp();
	flashFixNS();
	clearTimeout(timerId);
	return false;
	}
scrollObj.top=(objY-8)<0?objY-8:objY-1;
timerId = setTimeout("scroll_down(obj1,obj2,whichS)",iSpeed);
}
var flOutLayer = 'flashContainer';
var flInLayer = 'flashLayer';
var flashDisplayed = false;
var intransition = false;
function flashClick(){
/*
copyright twii 2003, an add-on to existing code created by Laurent Muchacho (twii)
mark peterson 
mpeterson@xyz.abc
xyz.abc = twii.net (them spam-bots will get ya if you put a legit email address)
*/
if(intransition){return;}
	if(flashDisplayed){
	flashUp();
	}else{
	flashDown();
	}
	flashDisplayed = !flashDisplayed;
	intransition = true;
}
nsFixed = false;
function flashFixNS(){
outerObj=createObjStyle(flOutLayer,false);
	if(bw.ns){
		if(nsFixed){
			outerObj.clip.height = 21;
		}else{
			outerObj.clip.height = 229;
		}
	}else{
		if(nsFixed){
			outerObj.clip = 'rect(0px 569px 21px 0px)';
			outerObj.height = 0;
		}else{
			outerObj.clip = 'rect(0px 569px 229px 0px)';
			outerObj.height = 229;			
		}	
	}
	nsFixed = !nsFixed
}
function flashIsUp(){
	changeOC('/pix/drop_down/open.gif?a')
	intransition = false;		
}
function flashUp(){
/*
conversion of a scroll down function, which in effect, makes the flash
appear to go up, hence, flash up
*/
	turnOffFlash();
	changeOC('/pix/drop_down/transition.gif?AB')
	scroll_down(flInLayer,flOutLayer,'fast')	
}
function flashDown(){
/*
conversion of a scroll up function, which in effect, makes the flash
appear to go down, hence, flash down
*/
	changeOC('/pix/drop_down/close.gif?A')
	flashFixNS();
	//hideDropDowns();
	scroll_up(flInLayer,flOutLayer,'fast');	
}
function turnOnFlash(){
	intransition = false;
}
function turnOffFlash(){
	if(!bw.ns){	}else{//document.layers[0].layers[0].layers[0].src = 'http://www.ussoccer.com/pix/1.gif';
	}
}
var curStrImg
function changeOC(strImg){
	if(!bw.ns){
	curStrImg = strImg
	setTimeout("document.images['OC'].src = curStrImg",50);
	}else{
	document.layers[0].layers[0].document.images['OC'].src = strImg;	
	}	
}
function initiateScroll(div1,div2,iV){
innerObj=createObjStyle(div1,div2);
innerObj.top=-230;
outerObj=createObjStyle(div2,false);
if(bw.ns){
outerObj.clip.height = 21;
}else{
outerObj.clip = 'rect(0px 569px 21px 0px)';
}
//id of headertable declared in top most 'centered' table
//it will always be in the center, and it's left will always
//be the leftmost portion of the page, used as a point of reference.
	xPos = 128;
	if(!bw.ns){
	findLeftObj = document.images['headerImage'];	
	while(findLeftObj.offsetParent)
	{
	xPos += findLeftObj.offsetLeft;
	findLeftObj = findLeftObj.offsetParent;
	}
	outerObj.left = xPos;
	}else{
	xPos += document.anchors['headerImage'].x
	outerObj.left = xPos;
	}
	//below sets the Drop Down To Automatically Scroll down upon page load
	
	//setTimeout("flashClick()",1250);
	
	setTimeout("changeOC('/pix/drop_down/open.gif?A')",1250);

}
function rePositionScroll(){
outerObj=createObjStyle(flOutLayer,false);
//id of headertable declared in top most 'centered' table
//it will always be in the center, and it's left will always
//be the leftmost portion of the page, used as a point of reference.
xPos = 128;
findLeftObj = document.images['headerImage'];	
while(findLeftObj.offsetParent)
	{
	xPos += findLeftObj.offsetLeft;
	findLeftObj = findLeftObj.offsetParent;
	}
outerObj.left=xPos;
}
window.onresize = rePositionScroll;