function setCount(n)
{
  theDay=30;
  setDay=new Date();
  setDay.setTime(setDay.getTime()+(theDay*1000*60*60*24));
  expDay=setDay.toGMTString();
  document.cookie="count="+n+";expires="+expDay;
}
function getCount()
{
  theName="count=";
  theCookie = document.cookie+";"
  start=theCookie.indexOf(theName);
  if(start !=-1)
  {
     end = theCookie.indexOf(";",start);
     count = eval(unescape(theCookie.substring(start+theName.length,end)));
     document.write(count + "Time Visit");
     setCount(count+1);
   }else{
      document.write("Welcome, First Time VisitI");
      setCount(2);
        }
}
getCount();

