// sends game behind everything so links on page are active

function isFlying(going) // on or off
{
	var swf = document.getElementById("flying");
	if (going == "on")
	{
		swf.style.width = "100%";
	}
	else if (going == "off")
	{
		swf.style.width = "10px";
	}
}

// --------------------------------------------------------------------------------
var bites = document.cookie.split("; ");      // used for cookie functions

function getCookie(name) 
{
  for (i=0; i < bites.length; i++) 
  {
    nextbite = bites[i].split("="); // break into name and value
    if (nextbite[0] == name) // if name matches
      return unescape(nextbite[1]); // return value
  }
  return null; // if no match return null
}

function setCookie (name, value) // use setCookie("name", value)
{
	document.cookie=name+"="+escape(value)+
		"; path=/"
}

// DisableGame 1 means yes do not play

// --------------------------------------------------------------------------------

function clickCow (flashValue)
{
	//alert(flashValue);
	// added 10-10-07 to close div after click
	var swf = document.getElementById("flying");
		swf.style.width = "10px";
	//
	setCookie('cowClick', flashValue);
	msgWindow=window.open("/catch-cow/click.html","clickWindow","width=550,height=300,toolbar=no,scrollbars=yes,resizable=yes");

}
