// W3C valid XHTML target by Uhvo 20070922 \\

var elms = document.getElementsByTagName("a");

for (var i = 0; i < elms.length; i++)
 if (elms[i].getAttribute("rel"))
     elms[i].setAttribute("target", elms[i].getAttribute("rel"));


function check(){
var elm  = document.getElementById("sec");
var human = document.getElementById("human");

if (human.value.length < 1){
 alert("Nimesi puuttuu!");
 return false;
}
 
if (elm.value.length < 4){
    alert("Robosuojanumero puuttuu tai on väärä!");
    return false;
   } else {
    return true;
 } 
}
 

function openWindow(obj, url){
 var urls = new Array(
 "http://linux.topdome.com/",
 "http://www.brunolinux.com/",
 "http://linux.fi/foorumi/",
 "http://forum.ubuntu-fi.org/",
 "http://code.google.com/",
 "http://gentoo-wiki.com/Main_Page",
 " http://web.archive.org",
 "http://www.w3.org/QA/2002/04/valid-dtd-list.html"
 );

 if (url == "Topdone") url = urls[0];
 if (url == "Tips for Linux explorers") url = urls[1];
 if (url == "Linux.fi foorumi") url = urls[2];
 if (url == "Ubuntu FI foorumi") url = urls[3];
 if (url == "Google code") url = urls[4];
 if (url == "Gentoo Wiki") url = urls[5];
 if (url == "WaybackMachine") url = urls[6];
 if (url == "Doctypes") url = urls[7];
 
 
var rand = Math.floor(Math.random() * 999);
 window.open(url, rand);
 obj.selectedIndex = 0;
}

//