
var xmlhttp;  // this is for the 'retrievePswd' function below

//var person = "info";
var co = "castlerockfilmfestival";

function emailContact(doc,person,lnkSrc) {
	doc.write("<a href=\"mailto:");
	doc.write(person);
	doc.write("@");
	doc.write(co);
	doc.write(".com\"");
	doc.write(">" + lnkSrc + "</a>");
}

function adjustPage()
{
  // Get natural heights
  var lHeight = xHeight("sidebar1");
  var rHeight = xHeight("mainContent");

  // Find the maximum height
  var maxHeight =
    Math.max(lHeight, rHeight);

  if (maxHeight < 452 )
  {
	  maxHeight = 452
  }
  // Assign maximum height to all columns
//  xHeight("content", maxHeight);
//  xHeight("sidebar1", maxHeight + (HM_IE ? 0 : 20));
  xHeight("sidebar1Gradient", maxHeight);
  xHeight("sidebar1", maxHeight);
  xHeight("mainContent", maxHeight);
//  xHeight("right", maxHeight);

  // Show the footer
//  xShow("footer");
}

function targetOpen(currLink, winName)
{

var win = window.open(currLink, winName);

win.focus();

}

//function showUserExample(str)
function retrievePswd(currEmail)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
//var url="getuser.php";
var url="getAccount.php";
//url=url+"?q="+str;
url=url+"?q="+currEmail;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
if (xmlhttp.readyState==4)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }

return null;
}