document.writeln('<script language=\"JavaScript\">');
document.writeln('<!-- Skript av kurt.grigg@virgin.net tilpasset norsk lotto av tresfjording@tresfjordin.com');
document.writeln('function lotto(){');
document.writeln('for (j=1; j < 34; j++)//stop zero!?');
document.writeln(' {');
document.writeln(' var a=Math.round(Math.random()*j+1);');
document.writeln(' var b=Math.round(Math.random()*j+1);');
document.writeln(' var c=Math.round(Math.random()*j+1);');
document.writeln(' var d=Math.round(Math.random()*j+1);');
document.writeln(' var e=Math.round(Math.random()*j+1);');
document.writeln(' var f=Math.round(Math.random()*j+1);');
document.writeln(' var g=Math.round(Math.random()*j+1);');
document.writeln(' }');
document.writeln('var x=new Array(a,b,c,d,e,f,g);');
document.writeln('if ((x[0] == x[1]) || (x[0] == x[2]) || (x[0] == x[3]) || (x[0] == x[4]) || (x[0] == x[5]) || (x[0] == x[6]) ||');
document.writeln('    (x[1] == x[2]) || (x[1] == x[3]) || (x[1] == x[4]) || (x[1] == x[5]) || (x[1] == x[6]) || ');
document.writeln('    (x[2] == x[3]) || (x[2] == x[4]) || (x[2] == x[5]) || (x[2] == x[6]) ||                        ');
document.writeln('    (x[3] == x[4]) || (x[3] == x[5]) || (x[3] == x[6]) ||');
document.writeln('    (x[4] == x[5]) || (x[5] == x[4]))');
document.writeln('lotto();//restart ');
document.writeln('else');
document.writeln(' {');
document.writeln(' var y=x.toString();');
document.writeln(' var z=y.split(\',\');');
document.writeln(' for (i=0; i < z.length; i++)');
document.writeln(' {');
document.writeln(' z[i]=z[i]+\" \";');
document.writeln(' if (z[i].length < 3)//add \'0\' to singles  ');
document.writeln(' z[i]=\"0\"+z[i]+\" \";');
document.writeln(' }');
document.writeln(' z=z.sort();');
document.writeln(' Nos=z[0]+z[1]+z[2]+z[3]+z[4]+z[5]+z[6];');
document.writeln('  if (document.all)');
document.writeln('  {document.all.layer1.innerHTML=Nos;}//OR Z!');
document.writeln('  else if (document.layers)');
document.writeln('  {');
document.writeln('  document.layers.layer1.document.open();');
document.writeln('  document.layers.layer1.document.write(\"<span style=\'position:absolute;top:0px;left:0px;font-family:Verdana;font-size:20px;color:#888888;text-align:center\'>&nbsp;\"+Nos+\"</span>\");');
document.writeln('  document.layers.layer1.document.close();');
document.writeln('  }');
document.writeln('  T=setTimeout(\'lotto()\',10);');
document.writeln(' }');
document.writeln('}');
document.writeln('function StOp(){');
document.writeln('setTimeout(\'clearTimeout(T)\',3000);');
document.writeln('}');
document.writeln('//-->');
document.writeln('</script>');
document.writeln('');
document.writeln('<table border=\'0\' width=190 height=50>');
document.writeln('<tr valign=\'middle\'>');
document.writeln('<td align=\'center\'>');
document.writeln('<form name=form>');
document.writeln('<input type=button value=\'Lottotallgenerator\' onClick=\"lotto();StOp()\">');
document.writeln('</form>');
document.writeln('<span id=layer1 class=a1><font size=\"1\" color=\"black\">Trykk p&aring; knappen for nytt forslag</font></span><br>');
document.writeln('<a href=\"mailto:tresfjording@tresfjording.com\" target=\"_blank\"><font size=\"1\" color=\"black\">');
document.writeln('Vinner du p&aring; en rekke generert her<br>s&aring; send meg noen ord da...</font></a>');
document.writeln('</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('');

