var FlashWidgetStrTest;
var AllDipslayedContestID = new Array();
var totalContestsDisplayed;
var randomContestIndex;

function thisMovie(A){if(navigator.appName.indexOf("Microsoft")!=-1){return window[A]}else{return document[A]}}
function sendToAS(B, E)
{
	//alert("sendToAS:: B = " + B + ", E = " + E);
	try
	{
		thisMovie("noevilWidget").callAS(B, E)
		//alert(E);
	}
	catch(A)
	{
		
	}
}
function addContestID(id)
{
	AllDipslayedContestID.push(id);
	//alert(AllDipslayedContestID.length);
}
function changRowColor(A,E,B)
{
	totalContestsDisplayed = B;
	randomContestIndex = E;
	
	//alert("changRowColor::A="+A+", E="+E+", B="+B);
	if(isReady()&&fo){
		var C="contestId="+escape(A);
		FlashWidgetStrTest=C;
		sendToAS(C, E)	
		
		refreshRows(randomContestIndex);
	}
}
function refreshRows(E)
{
	if(isReady()&&fo){
		for(i=0;i<totalContestsDisplayed;i++){
			if(i==E){
				document.getElementById("row"+i).className="selected_contest"
			}else{
				document.getElementById("row"+i).className=""
			}
		}
	}	
}
function autoShowWidget()
{
	refreshRows(randomContestIndex);
	//alert("autoShowWidget:: FlashWidgetStrTest = " + FlashWidgetStrTest);
	sendToAS(FlashWidgetStrTest, randomContestIndex)
}
function changFirstRowColor(D,A,F,E,C,B)
{
	document.getElementById("row0").className="selected_contest";
	FlashWidgetStrTest="alldata="+escape(A)+"&initialTime="+escape(F)+"&roundsUrl="+escape(E)+"&"+C
}
function CheckEnter()
{
	alert("You must first vote in the Contest at the Top of the List")
}
function changeSubcat(A)
{
	if(document.getElementById("Select2").value!="n")
	{
		A.subcat_select.value="All"
	}
	A.submit()
};