var CO2logicCL = "en";

function CO2logicAddRadio(cl, TextEn, TextFr, TextNl, TextES, RadioValue)
{
	document.write("<input type=radio name='CO2logicEngine' value='" + escape(RadioValue) + "'>");
	if (cl == "en") document.write(TextEn);
	if (cl == "fr") document.write(TextFr);
	if (cl == "nl") document.write(TextNl);
	if (cl == "es") document.write(TextES);
	document.write("<br>");
}

function CO2logicGo()
{
	var radio = document.forms[0].elements["CO2logicEngine"];
	var selectedValue = "";
	
	for(var i = 0; i < radio.length; i++) 
		if (radio.item(i).checked==true) selectedValue = radio.item(i).value;
	
	document.location.href = "http://www.co2logic.com/calculator/default.aspx?Partner=&CL=" + CO2logicCL + "&Engine=" + escape(selectedValue);
}

function CO2logicDisplayCalculator()
{
	var cl = CO2logicCL;
	document.write("<table><tr><td>");
	document.write("<table>");
	document.write("<tr>");
	document.write("<td>");
	document.write("<a href='http://www.co2logic.com/calculator/default.aspx?Partner=&CL=" + cl + "'><img border=0 src='http://www.co2logic.com/images/Car.gif'></a>");
	document.write("</td>");
	document.write("<td>");
	document.write("<a href='http://www.co2logic.com/calculator/home.aspx?Partner=&CL=" + cl + "'><img border=0 src='http://www.co2logic.com/images/Home.gif'></a>");
	document.write("</td>");
	document.write("<td>");
	document.write("<a href='http://www.co2logic.com/calculator/Plane.aspx?Partner=&CL=" + cl + "'><img border=0 src='http://www.co2logic.com/images/Plane.gif'></a></td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</td>");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td>");
	
	if (cl == 'en') document.write("My car's engine is:");
	if (cl == 'fr') document.write("Le moteur de ma voiture est:");
	if (cl == 'nl') document.write("De motor van mijn wagen is:");
	if (cl == 'es') document.write("Y es:");
	
	document.write("<br><br>");
	
	CO2logicAddRadio(cl, 
		"Small (4,0 l / 100km)", 
		"Petit (4,0 l / 100km)", 
		"Klein (4,0 l / 100km)", 
		"Peque&ntilde;o (4,0 l / 100km)", "4");
	CO2logicAddRadio(cl, 
		"Medium (6,0 l / 100km)", 
		"Moyen (6,0 l / 100km)", 
		"Medium (6,0 l / 100km)", 
		"Mediano (6,0 l / 100km)", "6");
	CO2logicAddRadio(cl, 
		"Large (8,0 l / 100km)", 
		"Grand (8,0 l / 100km)", 
		"Groot (8,0 l / 100km)", 
		"Grande (8,0 l / 100km)", "8");
	CO2logicAddRadio(cl, 
		"Very large (10,0 l / 100km)", 
		"Tr&egrave;s grand (10,0 l / 100km)", 
		"Heel groot (10,0 l / 100km)", 
		"Muy grande (10,0 l / 100km)", "10");

	document.write("<br></td></tr>");	
	document.write("<tr><td align=center>");
	document.write("<a href='#' onclick='CO2logicGo();'><img border=0 src='http://www.co2logic.com/images/Compute" + cl + ".gif'></a></td>");
	document.write("</tr>");
	document.write("</table>");
}

