function get_radio_value(id) { var value; var index; var radiogroup = document.getElementById(id); var radio = radiogroup.getElementsByTagName('input'); for (index=0; index < radio.length; index++) { if(radio[index].checked == true) { value = radio[index].value; } } return value; } function dl_iso(e) { var http = new Array( 'http://ftp.jaist.ac.jp/pub/Linux/Vine/', 'http://ftp.kddilabs.jp/pub/Linux/packages/Vine/', 'http://ftp.vinelinux.org/pub/Vine/' ); var ftp = new Array( 'ftp://ftp.jaist.ac.jp/pub/Linux/Vine/', 'ftp://ftp.kddilabs.jp/pub/Linux/packages/Vine/', 'ftp://ftp.vinelinux.org/pub/Vine/' ); var imgprefix = 'Vine-6.2/IMAGES/Vine621-'; var protocol; var arch; var media; var uri; protocol = get_radio_value ('protocol'); arch = get_radio_value ('arch'); media = get_radio_value ('media'); var select = document.getElementById('mirror'); switch (protocol) { case 'http': uri = http[select.value]; break; case 'ftp': uri = ftp[select.value]; } uri = uri + imgprefix + media + "-" + arch + ".iso"; closewin(); window.location = 'thanks.html?' + uri; } function closewin() { var closebtn = document.getElementById("close"); removeListener(closebtn, 'click', dl_cancel, false); var download = document.getElementById("downloads"); removeListener(download, 'click', dl_iso, false); var dlwin = document.getElementById("dlwin"); document.getElementsByTagName("body")[0].removeChild(dlwin); } function openwin(e) { if(!document.getElementById("dlwin")) { var dlwin = document.createElement("div"); dlwin.id = "dlwin"; dlwin.innerHTML = '