// JavaScript Document      <script>

function ShowCookie()
{
	var yourname = getCookie("nome")
	
	if (yourname=="undefined"||yourname==null) yourname="ospite"
    yourname=yourname.substring(0,yourname.length)
	document.write("<span class=outerText><font size=-1><marquee behavior=\"alternate\" loop=\"1\" scrollamount=\"7\" scrolldelay=\"50\">Bentornato su www.guidomarche.net ", yourname,"!  </marquee></font></span>")

	}

function ShowPostCard()
{
	var today = new Date()
   	var expires = new Date() 
   	expires.setTime(today.getTime() + 1000*60*60*24*365*6)
	if (getCookie("GMCard")=="yes")
	{
		setCookie("GMCard","no",	expires);
	}
	else
	{	
		setCookie("GMCard","yes",	expires);
	}

	document.location.reload();
}

function setCookie(name, value, expire)
{  
 document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}

function getCookie(Name) 
{ 
  var search = Name + "=" 
  if (document.cookie.length > 0) 
  {
						// se ci sono cookie
     offset = document.cookie.indexOf(search)      
     if (offset != -1) 
      { 						// se il cookie esiste
        offset += search.length         
						// cerca inizio e fine del valore del cookie
        end = document.cookie.indexOf(";", offset) 
						 
        if (end == -1)            
            end = document.cookie.length        
        return unescape(document.cookie.substring(offset, end))      
      }
   }
}
function register(name) 

{
   var today = new Date()
   var expires = new Date() 
   expires.setTime(today.getTime() + 1000*60*60*24*365*6)
   setCookie("nome",name,expires)
}

