I have developed a New Website in HTML. Its a Multi Location or Country Website. For the same I have created the Welcome Page where it will show the list of countries available and I need to place a Remember me Check box so that next time the same computer visit my website it will not have to choose its country and will be directed to the country which it had chosen earlier.

Please tell me How can I place a cookie there. Really I don't have any Idea about cookies nor I know how to create them.

Please help me.

You place this in index.html

<script type="text/javascript" language="JavaScript">
function cookie1(){
  var sadrzaj = document.cookie;
  var ime = 'kukac';
  var pocetak = sadrzaj.indexOf(ime);
    var kraj= sadrzaj.indexOf(";", pocetak);
    pocetak += ime.length + 1;
    var vrijednost = sadrzaj.substring(pocetak, kraj);
    alert("Cookie procitan: " + vrijednost);
        var dani = 7;
        var datum = new Date();
        var istjecanje; 
        var ispis;
        ispis = ime +" = " + ime +  "; expires=" + istjecanje + "; path=/" ;
        document.cookie = ispis;
        alert( "Cookie kreiran: \n" + ispis);