function showPlayer(url)
{
	var win = window.open(url, "rteplayer", "height=560,width=860,status=yes,toolbar=no,menubar=no,location=no");
	win.focus();
}
function PrintPreview(contentDiv)
{
	
	var win = window.open();
	win.document.write("<html>");
	win.document.write("<head>");	
	win.document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/news/elections/style/elections_print.css\" />");
	win.document.write("</head>");
	win.document.write("<body>");	
	win.document.write("<img src=\"/news/images/logo_printable_news.gif\">\n");	
	win.document.write("<hr>");		
	win.document.write($$("."+contentDiv)[0].innerHTML);
	win.document.write("<p><strong>Story from RT&Eacute; News:<br />"+document.location+"</strong></p>");
	win.document.write("</body>");
	win.document.write("</html>");	
	win.document.close();
	
}
var pop1;
function showCounts(url)
{
 pop1 = window.open(url, "counts", "height=500,width=500,status=yes,toolbar=no,menubar=no,location=no,scrollbars=1,resizable=yes");
 pop1.focus();
}

function loadPieChartHome(id, title, xml){
	var so = new SWFObject("/news/elections/swf/ampie.swf", "ampie", "380", "380", "8", "#FFFFFF");
	so.addParam("wmode", "opaque");
	so.addVariable("path", "/news/elections/inc/");
	so.addVariable("settings_file", encodeURIComponent("/news/elections/ajaxxml/pie_home_settings.xml"));
	so.addVariable("additional_chart_settings","<settings><labels><label lid='0'><text_size>18</text_size><text><![CDATA[<font color='#8a7c95' face='Georgia'>"+title+"</font>]]></text></label></labels></settings>");
	so.addVariable("data_file", escape("/news/elections/ajaxxml/"+xml));
	so.write(id);
}

var byetitle = "% Change in 1st Pref. Vote 2007 - 2009";

function loadPieChart(xml){
	var so = new SWFObject("/news/elections/swf/ampie.swf", "ampie", "380", "280", "8", "#FFFFFF");
	so.addParam("wmode", "opaque");
	so.addVariable("path", "/news/elections/inc/");
	so.addVariable("settings_file", encodeURIComponent("/news/elections/ajaxxml/pie_large_settings.xml"));
	so.addVariable("chart_data", xml);
	so.write("piechart");
}

function loadBarChart(xml,type){
	var so = new SWFObject("/news/elections/swf/amcolumn.swf", "amcolumn", "380", "280", "8", "#FFFFFF");
	so.addParam("wmode", "opaque");
	so.addVariable("path", "/news/elections/inc/");
	if(typeof(type) != "undefined"){
		if (type == "Bye"){
			so.addVariable("additional_chart_settings","<settings><labels><label lid='0'><text_size>18</text_size><text><![CDATA[<font color='#8a7c95' face='Georgia'>"+byetitle+"</font>]]></text></label></labels></settings>");
		}
	}
	so.addVariable("settings_file", encodeURIComponent("/news/elections/ajaxxml/column_large_settings.xml"));
	so.addVariable("chart_data", xml);
	so.write("barchart");
}