function writeCookies(GLat, GLng, GLevel)
{
	var expdate=new Date();
	expdate.setTime(expdate.getTime()+(1000*3600*1));
	//document.cookie="GMap="+GLat+"|"+GLng+"|"+GLevel+"; path=/"+window.location.pathname.substring(1,3)+"/;expires="+expdate.toGMTString();
	document.cookie="GMap="+GLat+"|"+GLng+"|"+GLevel+"; path=/;expires="+expdate.toGMTString();

}
function readCookies(name)
{
	var first, last;
	var myGmap=document.cookie;
	first=myGmap.indexOf(name+'=');
	if(first!=-1)
	{
		first+=name.length+1;
		last=myGmap.indexOf(';',first);
		if(last==-1) last=myGmap.length;
		return myGmap.substring(first, last);
	}
	else
	{
		//return "42.293564192170095|-108.6328125|3"
	}
}

function writeCookiesCommon(cookieName, cookieValue)
{
    var expdate=new Date();
	expdate.setTime(expdate.getTime()+(1000*3600*1));
    cookieName=escape(cookieName);
    cookieValue=escape(cookieValue);
    var mycookies=cookieName+"="+cookieValue+";path=/;expires="+expdate.toGMTString();
	document.cookie=mycookies;
}
function readCookiesCommon(cookieName)
{
	var first, last;
	var mycookies=document.cookie;
	first=mycookies.indexOf(cookieName+'=');
	if(first!=-1)
	{
		first+=cookieName.length+1;
		last=mycookies.indexOf(';',first);
		if(last==-1) last=mycookies.length;
		return mycookies.substring(first, last);
	}
	else
	{
		return "-1";
	}
}