function toggleWelcomeTab (oRef,a) {
	var sections = a.split(',');
	for ( var i=0; i<sections.length; i++ ) {
		section = sections[i].split(':');
		properties = section[1].split('|');
		_gei('welcome-d-'+section[0]).className = 'welcome-section'+(properties[1]=='dn'?' welcome-section-down':'');
		_gei('welcome-a-'+section[0]).className = (properties[0]=='mid'?'':'welcome-nav-'+properties[0])+(properties[1]!='dn'&&properties[0]!='mid'?'-':'')+(properties[1]=='dn'?'':'selected');
	}
	oRef.blur();
	return false;
}

function yt_swapVideo(sId) {
	var oVars = new Array();
	oVars['id'] = sId;
	rr_doRequest('nowplaying','POST',uriRoot+'contest/swapvideo',oVars,true);
	return false;
}

function checkForSubmit(sId) {
	if ( _gei(sId) ) {
		if ( _gei(sId).disabled == true ) return false;
		_gei(sId).disabled = true;
	}
	return true;
}

function toggleMI(sList,sLink,sWhat) {
	var oKChildren = _gei(sLink).getElementsByTagName('a');
	var oTChildren = _gei(sList).getElementsByTagName('ul');
	if ( oTChildren.length > 0 && oKChildren.length > 0 ) {
		//alert('before: '+_gei('mi_link_'+sWhat).className);
		for ( var i=0; i<oKChildren.length; i++ ) {
			if ( oKChildren[i].className )
				oKChildren[i].className = 'mi-link-cold';
		}
		for ( var i=0; i<oTChildren.length; i++ ) {
			if ( oTChildren[i].className )
				oTChildren[i].className = 'mi-list-cold';
		}
		//alert('after: '+_gei('mi_link_'+sWhat).className);
		_gei('mi_link_'+sWhat).className = 'mi-link-hot';
		_gei('mi_list_'+sWhat).className = 'mi-list-hot';
	}
	return false;
}

