// Convert location.search into	an array of	values
// indexed by name.
function processCommandLine()
{
	 var minNav3 = (navigator.appName == "Netscape"	&&
	 parseInt(navigator.appVersion)	>= 3);
	 var minIE4	= (navigator.appName.indexOf("Microsoft") >= 0 &&
	 parseInt(navigator.appVersion)	>= 4);
	 var minDOM	= minNav3 || minIE4; //	baseline DOM required for this
	 var results = new Array();
	 if	(minDOM)
	 {
		var	input =	unescape(location.search.substring(1))
		if (input)
		{
		   var srchArray = input.split("&");
		   var tempArray = new Array();
		   for (i =	0; i < srchArray.length; i++)
		   {
				tempArray =	srchArray[i].split("=");
				results[tempArray[0]] =	tempArray[1];
		   }
		}
	 }
	 return	results;
}
function getAllCookies()
{
	var results = new Array();
	var	input =	unescape(document.cookie);
	if (input)
	{
	   var srchArray = input.split("; ");
	   var tempArray = new Array();
	   for (i =	0; i < srchArray.length; i++)
	   {
			tempArray =	srchArray[i].split("=");
			results[tempArray[0]] =	tempArray[1];
	   }
	}
	return results;
}
function GetCookie (name)
{
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen)
    {
        var j = i + alen;
        if (document.cookie.substring(i, j) == arg)
        {
            return getCookieVal (j);
            break;
        }
        i = document.cookie.indexOf(" ", i) + 1;
        if (i == 0) break;
    }
    return null;
}
function getCookieVal (offset) {
        var endstr = document.cookie.indexOf (";", offset);
        if (endstr == -1)
                endstr = document.cookie.length;
                return unescape(document.cookie.substring(offset, endstr));
}
function SetCookie (name, value) {
        var argv = SetCookie.arguments;
        var argc = SetCookie.arguments.length;
        var expires = (argc > 2) ? argv[2] : null;
        var path = (argc > 3) ? argv[3] : null;
        var domain = (argc > 4) ? argv[4] : null;
        var secure = (argc > 5) ? argv[5] : false;
        document.cookie = name + "=" + escape (value) +
        ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
        ((path == null) ? "" : ("; path=" + path)) +
        ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {
        var exp = new Date();
        exp.setTime (exp.getTime() - 1);
        // This cookie is history
        var cval = GetCookie (name);
        document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
function help(filename)
{
 	window.open(filename,"POPUP",
"width=500,height=250,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,screenX=6,screenY=6");
}
function gotoToMar()
{
	parent.location = "../tmMenu/menu.jsp";
}
function directions()
{	
 	window.open("http://www.capitoldinnertheatre.org","POPUP",
	"width=800,height=450,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,screenX=6,screenY=6");
}
function commercial()
{
//	document.write('<p align="center">');
//	document.write('<img src="../theater/gifs/lesmis.GIF" border="1" alt="Les Mis" width="100" height="120">');
//	document.write('<span class="darkviolet12"><br>at <a href="javascript:directions()">CPAC</a> all week!</span>');
//	document.write('</p>');
//	document.write('<form action="http://www.capitoldinnertheatre.org">');
//	document.write('<input type="hidden" name="business" value="baldys2@comcast.net">');
//	document.write('<input type="hidden" name="item_name" value="ToMar Games">');
//	document.write('<input type="hidden" name="no_shipping" value="1">');
//	document.write('<input type="hidden" name="return" value="http://www.tomargames.com/tmMenu/thankyou.jsp?donor=yes">');
//	document.write('<input type="hidden" name="cancel_return" value="http://www.tomargames.com">');
//	document.write('<input type="hidden" name="no_note" value="1">');
//	document.write('<input type="hidden" name="currency_code" value="USD">');
//	document.write('<input type="hidden" name="tax" value="0">');
//	document.write('<input type="hidden" name="lc" value="US">');
//	document.write('<input type="button" class="btn" name="submit" value="Donate">');
//	document.write('</form></p>');
//	document.write('<center>');
//	document.write('<a href="http://games.groups.yahoo.com/group/ToMarGamers/join" target="_window">');
//	document.write('<img src="http://us.i1.yimg.com/us.yimg.com/i/yg/img/i/us/ui/join.gif" border="0" target="_window"');
// 	document.write('alt="Click here to join ToMarGamers"><br>Join ToMarGamers</a>');
//	document.write('</center>');
}	