var YearName=new Array(1980,1981,1982,1983,1984,1985,1986,1987,1988,1989,1990,1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010);
var k;
for (i=0;i<31; i++)
{
        if(2008==YearName[i])
        {
                k=i;
                i=30;
        }
}
document.myform.Year.options[k].selected="true";

        document.myform.Day.options[6-1].selected="true";
        document.myform.Month.options[0].selected="true";

//}
////////The above code to set the date of the today/////
////////This code to set the cookies value to the elements of the form///
//check if the cookies exist////////

//let the chossen country be checked


                document.myform.country.options[0].selected="true";
                document.myform.City.options.length=conn[0];
                for (var k=0; k<parseInt(conn[0]); k++)
                        {
                        document.myform.City.options[k].text=cities[0][k];////put the new value of the city according to the value of the cookies
                        document.myform.City.options[k].value=k;/////give city values which vary from country to another
                        }
                document.myform.City.options[0].selected="true";




 for (var i=0; i<2; i++)
        {
                if (document.myform.countchoice[i].value=="")
                        document.myform.countchoice[i].checked="1";
        }

for (var i=0; i<5; i++)
{
        if(document.myform.Twilightflag[i].value=="Egyptian")
        document.myform.Twilightflag[i].checked="1";
}

for (var i=0; i<2; i++)
{
        if (document.myform.Asrway[i].value=="Shafi")
                document.myform.Asrway[i].checked="1";
}

for (var i=0; i<2; i++)
{
        if (document.myform.time[i].value=="Daily")
                document.myform.time[i].checked="1";
}

if (""=="Dailysaving")
        document.myform.Dailysaving.checked="1";

if (""=="Hijri")
        document.myform.HijriFLag.checked="1";
