var dict= new Array();
dict[0]="அரவம்";
dict[1]="ஊன்";
dict[2]="களிறு";
dict[3]="புரவி";
dict[4]="பரி";
dict[5]="அகம்";
dict[6]="புறம்";
dict[7]="கோட்டம்";
dict[8]="படலை";
dict[9]="அரண்";
dict[10]="நஞ்சு";
dict[11]="சீர்";
dict[12]="நகை";
dict[13]="அணி";
dict[14]="அகவை";
dict[15]="அகிலம்";
dict[16]="அன்னம்";
dict[17]="கமலம்";
dict[18]="சீருடை";
dict[19]="குழவி";
dict[20]="அருள்";
dict[21]="கட்டாரி";
dict[22]="தொடி";
dict[23]="பத்தாயம்";
dict[24]="வனம்";
dict[25]="காரிகை";
dict[26]="காலன்";
dict[27]="குருதி";
dict[28]="குழாம்";
dict[29]="சரடு";
dict[30]="துயில்";
dict[31]="ரதம்";
dict[32]="பரிமளம்";
dict[33]="பவனம்";
dict[34]="சிதல்";
dict[35]="வராகம்";
dict[36]="நீலி";
dict[37]="பிறை";
dict[38]="நெடி";
dict[39]="பட்சி";
dict[40]="கசடு";
dict[41]="படல்";
dict[42]="காங்கை";
dict[43]="பதம்";
dict[44]="பண்";
dict[45]="கஜம்";
dict[46]="கடுவன்";
dict[47]="சாரதி";
dict[48]="சித்தம்";
dict[49]="நுதல்";
dict[50]="மா";
dict[51]="அகில்";

var idv=0;
var d1;
var d2;
var d3;
var d4;

function createdict() {
                var body = document.getElementById('tdictionary');
                var ol = document.createElement('ol');
        ol.innerHtml="";
        ol.className = 'old';
        body.appendChild(ol);
        var start=Math.floor(Math.random()*52);
        var end;
        if(start<46) {
        end=start +5;
        
        }
        else {
        start = start-5;
        end=start +5;
        }
                
        for(var s=start;s<end;s++) {
                var li = document.createElement('li');
                var a = document.createElement('a');
                li.className ='f2';
                ol.appendChild(li);
                li.appendChild(a);
                
                var i = a.id="anchor1"+s;
                a.className="a2";
                a.style.cursor="hand";
                a.innerHTML=dict[s];
                idv=idv+i+"*";
                
        }
        idv = idv.replace("0","");
        idv = idv.split("*");
        
                d1=idv[0];        
                 d2=idv[1];
                d3=idv[2];
                d4=idv[3];
                d5=idv[4];
                
                document.getElementById(d1).onclick= function() {window.location="tamil-english-dictionary.jsp?ttextbox="+encodeURI(document.getElementById(d1).innerHTML)};
                document.getElementById(d2).onclick= function() {window.location="tamil-english-dictionary.jsp?ttextbox="+encodeURI(document.getElementById(d2).innerHTML)};
                document.getElementById(d3).onclick= function() {window.location="tamil-english-dictionary.jsp?ttextbox="+encodeURI(document.getElementById(d3).innerHTML)};
                document.getElementById(d4).onclick= function() {window.location="tamil-english-dictionary.jsp?ttextbox="+encodeURI(document.getElementById(d4).innerHTML)};
                document.getElementById(d5).onclick= function() {window.location="tamil-english-dictionary.jsp?ttextbox="+encodeURI(document.getElementById(d5).innerHTML)};
                
}

