function getCookie()
{
	c_name = "authenticmass";
	if (document.cookie.length>0)
  	{
  		c_start=document.cookie.indexOf(c_name + "=");
  		if (c_start!=-1)
    	{ 
    		c_start=c_start + c_name.length+1 ;
    		c_end=document.cookie.indexOf(";",c_start);
    		if (c_end==-1) c_end=document.cookie.length
    		return unescape(document.cookie.substring(c_start,c_end));
    	} 
  	}
	return ""
}

function setCookie(value){
	//alert( value )
	c_name = "authenticmass";
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+365);
	document.cookie=c_name+ "=" +escape(value)+((365==null) ? "" : "; expires="+exdate.toGMTString());
//	alert( "set cookie = "+value );
}

function checkCookie()
{
	
	authenticmass=getCookie('authenticmass');
	if (authenticmass!=null && authenticmass!="")
  	{
		///////////// return value	
		return authenticmass;
  		
  	}
	else {
		setCookie( "skipIntro@@NO" );
		//////////// there is no cookie
		/*
  		authenticmass=prompt('Please enter your name:',"");
  		if (authenticmass!=null && authenticmass!="")
    	{
    		setCookie('authenticmass',authenticmass,365);
    	}
		*/
  	}
}