function clearField(fieldToClear, defaultValue)
{
	if(fieldToClear.value == defaultValue)
	{
		fieldToClear.value = '';
	}
}

function populateList(o, changePos)
{
	d=document.getElementById('player_conference');
	pos=document.getElementById('positions');
	if(!d){return;}                 
	var mitemsText=new Array();
	var mitemsVal=new Array();
	var posItems = new Array();
	mitemsText['']=['ALL PLAYERS'];
	mitemsText['baseball']=['ALL PLAYERS','American Only','National Only'];
	mitemsText['basketball']=['ALL PLAYERS','Eastern Only','Western Only'];
	mitemsText['football']=['ALL PLAYERS','AFC Only','NFC Only'];
	mitemsText['hockey']=['ALL PLAYERS','Eastern Only','Western Only'];
	mitemsVal['']=['ALL'];
	mitemsVal['baseball']=['ALL','American','National'];
	mitemsVal['basketball']=['ALL','Eastern','Western'];
	mitemsVal['football']=['ALL','AFC','NFC'];
	mitemsVal['hockey']=['ALL','Eastern','Western'];
	
	if(changePos == true)
	{
		posItems['']=[''];
		posItems['baseball']=['C,1B,2B,3B,SS,OF,UTL,SP,RP'];
		posItems['basketball']=['PG,SG,SF,PF,C,UTL'];
		posItems['football']=['QB,RB,WR,TE,K,DEF'];
		posItems['hockey']=['C,LW,RW,D,G'];
		pos.value = posItems[o.options[o.selectedIndex].value];
	}
	d.options.length=0;
	curText=mitemsText[o.options[o.selectedIndex].value];
	curVal=mitemsVal[o.options[o.selectedIndex].value];
	if(!curText){return;}
	d.options.length=curText.length;
	for(var i=0;i<curText.length;i++)
	{
		d.options[i].text=curText[i];
		d.options[i].value=curVal[i];
	}
}
