

var	pollList = new Array();

var pCount = 0;
var writecount = 0;


function printAllReverse()

{

	

	var		x;



	removeDuplicatepollsRev();



	for(x = pCount-1; x >= 0; x--){

		if(pollList[x].isDup == false){

			pollList[x].write2screen();

		

		}

	}

}



//function printAll()

//{

//alert ("made it into print all");

//var		x;



//	removeDuplicatepolls();



//	for(x = 0; x < pCount; x++){

//		if(plineList[x].isDup == false){

//			pollList[x].write2screen();

//		}

//	}

//}







//function removeDuplicatepolls()

//{

//	

//var	x, y;

//

//

//	for(x = 0; x < pCount; x++){

//		if(pollList[x].isDup != true){

//			for(y = x + 1; y < pCount; y++){

//				if(pollList[x].text == pollList[y].text){

//					pollList[y].isDup = true;

//				}

//			}

//		}

//	}

//}





function removeDuplicatepollsRev()

{

	var	x, y;

  //  alert("removeDuplicatepollsRev is working!");



	for(x = pCount-1; x >= 1; x--){

		if(pollList[x].isDup != true){

			for(y = x - 1; y >= 0; y--){

				if(pollList[x].text == pollList[y].text){

					pollList[y].isDup = true;

				}

			}

		}

	}

}





function write2screen()



{

	
//	alert(writecount);
    document.open();

	document.writeln("<tr>\n<td align=\"left\" width=\"350\" bgcolor=\"#EEEEEE\">\n");

	document.writeln("<FONT COLOR=\"black\" SIZE=\"3\">");

	document.writeln("&#149; <A HREF=\"" + this.url + "\" + TARGET=\"_self\">" + this.text + "</A>");

	document.writeln("</FONT>\n");

	document.writeln("</td>\n");

    document.writeln("<td align='right'>");
	if (writecount == 0){
		document.writeln("<img src=\"/images/new2.gif\" width=\"28\" height=\"11\" alt=\"Brand New!\" border=\"0\">" + this.date);
	}
	else{
	document.writeln(this.date);
	}
	document.writeln("</td>\n");
	
	document.writeln("</tr>\n");

	document.close();
	writecount++;

}





function poll(url, text, date, newwindow)



{

//alert ("made it into poll");

this.url = url;

	this.text = text;



	this.date = date;



	this.isDup = false;

	this.newwindow = newwindow;



	this.write2screen = write2screen;

//alert (this.url);

}



function addpoll(url, text, date, newwindow)

{

//alert ("Made it into addpoll");

pollList[pCount] = new poll(url, text, date, newwindow);

	pCount++;

}



 

