function openFull(url,width,height,top,left)
{
	if(!width)
		width =  800;
		
	if(!height)
		height =  600;
		
    window.open(url,'',"scrollbars=yes,resizable=yes,toolbar=yes,location=yes,status=no,menubar=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left);
}

function openMedium(url,width,height,top,left)
{
	if(!width)
		width =  800;
		
	if(!height)
		height =  600;
		
    window.open(url,'',"scrollbars=yes,resizable=yes,toolbar=no,location=no,status=no,menubar=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left);
}

function openSimple(url,width,height,top,left)
{
	if(!width)
		width =  800;
		
	if(!height)
		height =  600;
		
    window.open(url,'',"scrollbars=no,resizable=yes,toolbar=no,location=no,status=no,menubar=no,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left);
}

function openSimpleWithScroll(url,width,height,top,left)
{
	if(!width)
		width =  800;
		
	if(!height)
		height =  600;
		
    window.open(url,'',"scrollbars=yes,resizable=yes,toolbar=no,location=no,status=no,menubar=no,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left);
}

function openEmailNotification(showUnder)
{
	var topicID = getTopic();
	//alert(topicID);
	var div_id = "divNotification";
	var ypos = 0;
	
	try
	{
		var email_div =
			document.getElementById
			? document.getElementById(div_id)
			: document.all
			  ? document.all[div_id]
			  : document.layers[div_id];
			 
		if (navigator.appName.indexOf ("Microsoft") == -1) 
		{
	    	ypos = (window.document.body.scrollTop + window.document.body.clientHeight) - 146;
			var flashMovie = thisMovie("EmailNotificationMovie");
			//alert(thisMovie("EmailNotificationMovie").IsPlaying());
			if(flashMovie.CurrentFrame()=="0" || flashMovie.CurrentFrame()=="-1")
			{
				flashMovie.SetVariable("topicId", topicID);
				flashMovie.Play();
				//email_div.style.left = thisMovie("ContentArea_Template_Footer_SearchSubmittal1").style.left;
				email_div.style.top = ypos + "px";
				//email_div.style.left = "190px";
				setTimeout("waitTimer()", 200);
			}
			else
			{
				flashMovie.GotoFrame(0);
			}
		}
		else
		{
			ypos = window.document.body.clientHeight - 298;
			//document.getElementById("divNotification").style.left = document.getElementById("ContentArea_Template_Footer_SearchSubmittal1").style.left;
			if(document.getElementById("EmailNotificationMovie").frameNum=="0")
			{
				document.getElementById("divNotification").style.top = ypos;
				//document.getElementById("divNotification").style.left = "100px";
				document.getElementById("EmailNotificationMovie").FlashVars = "topicId=" + topicID + "&a=" + document.getElementById("groupname").value;
				document.getElementById("EmailNotificationMovie").Play();
				//alert(document.getElementById("EmailNotificationMovie").frameNum);
				setTimeout("waitTimer()", 200);
			}
			else
			{
				document.getElementById("EmailNotificationMovie").GotoFrame(0);
			}
		}
	}
	catch ( e )
	{
		//alert(e);
		//If Flash is not installed, go straight to the signup page
		openMedium('/blast/blast_redirect.asp',710,590);
	}
	//openMedium('/blast/blast_redirect.asp',710,590);
}


function waitTimer() {
	if (navigator.appName.indexOf ("Microsoft") ==-1) 
	{
		//alert(thisMovie("EmailNotificationMovie").PercentLoaded());
		if(thisMovie("EmailNotificationMovie").CurrentFrame=="0")

		{
			openMedium('/blast/blast_redirect.asp',710,590);
		}
	}
	else
	{
		if(document.getElementById("EmailNotificationMovie").frameNum=="0")
		{
			openMedium('/blast/blast_redirect.asp',710,590);
		}
	}
}

function playmovie() {
    thisMovie("EmailNotificationMovie").Play();

}
function movieIsLoaded (theMovie) {
  if (typeof(theMovie) != "undefined") {
    return theMovie.PercentLoaded() == 100;
  } else {
    return false;
  }
}
function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  }	else {
    return document[movieName]
  }
}
function holidayTakeFlight()
{
	openMedium('/HolidaysTakeFlight_promo.htm',570,600);
}

function parentLocation(url)
{
		if(window.opener)
			window.opener.location.href = url;
		else
			openFull(url,800,590,25,75);
}

function openWayfinder( file )
{
	openSimple("/Airport_Wayfinder.aspx?file=" + file, 611,472);
}


function getTopic()
{
	return "55";
}


//v1.0
//Copyright 2006 Adobe Systems, Inc. All rights reserved.
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}

function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';

  document.write(str);
}

//Generates the Javascript after the loading of the page.
function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
	
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    

    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}