// JavaScript Document
var xmlHttp



function showHint(str)
{
	//txtHint may not exist yet, need to check it for IE8 first.
	document.getElementById('txtHint').innerHTML = "Searching.....&nbsp;&nbsp;<img src='../Images/loading.gif' alt='loading' width='107' height='13' longdesc='../Images/loading.gif'>";
//if (str.length==0)
//  { 
//  document.getElementById("txtHint").innerHTML="";
//  return;
//  }

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/video/gethint.php";
url=url+"?q="+str;
url=url+"&sid="+Math.random();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	//alert(xmlHttp.responseText);
	try
	{
		var D = document.createElement("div");
		D.innerHTML=xmlHttp.responseText;
		document.getElementById('txtHint').innerHTML='';
		document.getElementById('txtHint').appendChild(D);
	}
	catch (e)
		{
		alert("Error retreiving items from database.");
		}
	}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function showConsentForm(){
	
	document.getElementById('txtPlaceholder').innerHTML="<table width=\"100%\"><tr><td align=\"left\" valign=\"top\"><span class=\"errorlist\"><p align=\"center\"><!-- web2printer:start --><strong>&nbsp;Permission  to Participate</strong></p><p>For your child to participate  in Xbox Gaming Tournaments (the &ldquo;Event&rdquo;), &nbsp; we  require your consent for your child to participate in the Event.</p><p>I am the parent or legal guardian of  _______________________________ (&ldquo;Minor&rdquo;) who is under 18 years of age.&nbsp; I hereby consent to Minor&rsquo;s attendance and  participation in the Event consisting primarily of PC  and console video game tournaments in which an entry fee is charged and cash  and other prizes may be awarded to certain winners [edit as appropriate for  your event].&nbsp; I am aware the  Events may feature PC and console video games that may have a rating of &ldquo;M&rdquo; for  Mature as specified by the Entertainment Software Ratings Board.&nbsp; I am aware this rating indicates the ESRB  has deemed the content of the PC or console video game to be unsuitable for  children under 17 years old.&nbsp; </p><p>I assume all responsibility and liability for any injury,  minor or serious, accidental or intentional, to Minor while at the Event.&nbsp; </p><p>By my signature below as the Parent or Legal Guardian, I  give my permission to allow the Minor to attend and participate in this Event  and all activities at the Event without restriction or limitation, including,  without limitation playing PC and console video games with ESRB ratings of &ldquo;M&rdquo;  and I release ___________________Main Street Entertainment including it&rsquo;s organizers, sponsors, and affiliates from any and all  liabilities that may arise from my decision to allow the Minor to participate  in the Event. </p><p><strong><u>Parent or Legal  Guardian</u></strong></p><p>_______________________________&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __________________<br />Signature of Parent or Legal Guardian&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Date</p><p>_______________________________<br />Printed Name of Parent or Legal Guardian<br /><br />Address of Parent / Legal Guardian:  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ___________________________________<br />  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;___________________________________<br />Telephone # of Legal Guardian:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ___________________________________&nbsp; </p>Emergency Contact &amp; Phone Number: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ___________________________________&nbsp; </th><!-- web2printer:end --></span></td></tr></table><a href=\"web2printer4.php?img=0&amp;lnk=0&amp;page=http://www.mainstreetentertainment.net/Consent.php\" target=\"_blank\">Printable Page</a>";
}
function ViewVideos(){
	document.getElementById('txtPlaceholder').innerHTML="<u>Find your movie!</u><br>Movie Name:<input type=\"text\" id=\"txt1\" name=\"txt1\" /><input type=\"button\" name=\"btnFind\" id=\"btnFind\" value=\"Find\" onClick=\"showHint(txt1.value)\" /><span class=bodytext id=txtHint></span>";
}
function PizzaOrders(){
document.getElementById('txtPlaceholder').innerHTML='<table width="100%" height="597"><tr><td width="66%" valign="top"><span id="orderPizza"> &nbsp; </span><span id="CheckOut"></span><span id="currentOrder"><b>Current Order Details</b><br></span><span id="currentVideoOrder"></span></td></tr></table>';
}
function ViewCandy(){
document.getElementById('txtPlaceholder').innerHTML="<u>Find your favorite snacks!</u><br>Name:<input type=text id=txtCandy name=txtCandy /><input type=button name=btnFindCandy id=btnFindCandy value=Find onclick=GetCandy(txtCandy.value) /><br /><br /><span class=bodytext id=txtHint></span>";
}