/* ==============================================================================
Code to solve the problem of double-click the flash elements in IE
============================================================================== */
var theObjects = document.getElementsByTagName("object"); 
for (var i = 0; i < theObjects.length; i++) 
{ 
	theObjects[i].outerHTML = theObjects[i].outerHTML; 
}
/* ============================================================================= */

/* ==============================================================================
FUNCTION:	OpenPopupWindow(winURL, winName, winFeatures)
- Opens a new browser window with the parameters passed into the function
============================================================================== */
function OpenPopupWindow(winURL, winName, winFeatures) 
{
	var objWin = window.open(winURL, winName, winFeatures);
	objWin.focus();
}

/* ==============================================================================
FUNCTIO:    info(flight_position)
================================================================================= */
function info(flight_position)
{
    var form = window.open("AirFlightInfo.aspx", "flight_info", "left=30,screenX=30,top=50,screenY=50,width=850,height=700,scrollbars=yes,resizable=yes");
    form.focus();
}

/* ======================================================================
FUNCTION:	isValidEmail(strEmail)
INPUT:		strEmail - String representing the e-mail to validade
RETURNS:		true, if the e-mail is valid according to the regular expression
				false, otherwise.
====================================================================== */
function isValidEmail(strEmail)
{
	var reg = /^(\w+(?:(\.|\-)\w+)*)@((?:\w+(?:(\.|\-)\w+)*\.)+)([a-z\d]{2,})$/i;
	return reg.test(strEmail);
}

function oc(a)
{
  var o = {};
  for(var i=0;i<a.length;i++)
  {
    o[a[i]]='';
  }
return o;
}

function upEngineContainer(){
var sIdEngineContainer = "divEngineContainer";
var objEngineContainer = document.getElementById(sIdEngineContainer);
if (objEngineContainer != null)
{   
var strOpen = "<table cellspacing='0' cellpadding='0'><tbody><tr><td width='336' style='width: 336px;'><table class='conteudo_left' cellspacing='0' cellpadding='0'><tbody><tr><td class='boxMotor'>";
var strClose = "</td></tr></tbody></table></td></tr></tbody></table>";
var elementInnerHTML=objEngineContainer.innerHTML;
//alert(elementInnerHTML.match("conteudo_left"));
if (elementInnerHTML.match("conteudo_left")==null) objEngineContainer.innerHTML = strOpen+objEngineContainer.innerHTML+strClose;
}
}