var path = "http://www.atlng.com/";
var txt = new Array(5);
txt[0] = "Build a printer friendly version of this page (opens in a new window)."
txt[1] = "Add this page to your favorites."
txt[2] = "If you need more details on this matter, contact us. We will be more than happy to hear from you."
txt[3] = "Guide your way with our website map."
//=======================================================
function controlFlashMovie(objElement, strValue)
{
	var objFlash, currentSelection;
	objFlash = document.getElementById( objElement );
	if (objFlash.PercentLoaded() == 100)	
	{
		try
		{						
			currentSelection = objFlash.GetVariable("_global.menu_selection");							
			if(currentSelection != strValue)
			{				
				objFlash.TGotoLabel("_level0.movie" + strValue,"pressed");
				objFlash.SetVariable("_global.menu_selection", strValue);
			}
			
		}
		catch(strError)
		{
		}
	}
}
//=======================================================
function changeClass(obj, className){
	document.getElementById(obj).className = className;
}
//=======================================================
function BrowseOurServicesOnChange( x )
{
window.location = "/" + x + ".asp";
}
//=======================================================
function ServicesOnChange( x )
{
window.location = "/services/default.asp?#category" + x;
}
//=======================================================
function swapImage(obj, file, ev)
{  
  if(ev==1)
  {
  	obj.src = "../images/icons/icon" + file + ".jpg";
  	obj.style.cursor="hand";
	document.getElementById("td1").innerHTML = txt[file-1];
  }
  else
  {
  	obj.src = "../images/icons/icon" + file + "_gray.jpg";
  document.getElementById("td1").innerHTML = "";
  }
}
//=======================================================
function sniffer()
{
	var agent = navigator.userAgent.toLowerCase();
	var app = navigator.appName.toLowerCase();
	
	// NETSCAPE
	this.ns = ((agent.indexOf('mozilla')!=-1) && (agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1) && (agent.indexOf('opera')==-1) && (agent.indexOf('webtv')==-1));
	//MSIE CHECK 
	this.ie = ((agent.indexOf("msie") != -1)&& (agent.indexOf('opera')==-1));
	//MAC CHECK 
	this.mac = (agent.indexOf("mac")!=-1); 
	//WIN CHECK
	this.win = ( (agent.indexOf("win")!=-1) || (agent.indexOf("16bit")!=-1) );
}
//=======================================================
function bookmarkIt()
{ 
	var bookmarktitle = "ATLNG - The Marketer of Liquified Natural Gas";
	var bookmarkurl = document.location;
	var netscape = "";
	var mac = "";
	var blnIs = new sniffer();
	
	if (blnIs.ns)
	{ 
		//alert(netscape);
		window.sidebar.addPanel(bookmarktitle, bookmarkurl,""); 
	}
	else if (blnIs.mac)
	{
		//alert(mac);
	}
	else if (blnIs.ie)
	{
		window.external.AddFavorite(bookmarkurl, bookmarktitle);
	}
	else if
	(window.opera && window.print)
	{
		return true;
	}
}
//=======================================================
function openWindow(url)
{
	window.open(url,'',"menubar=no,scrollbars=no,height=630,width=850,top=50,left=50");
}
//=======================================================
function go2(url)
{
	document.adminF.action = url
	document.adminF.submit();
}
//========================================================
function buildPrinterFriendly()
{
	var strHtml = document.getElementById("printContent").innerHTML;
	var objFormPrint = document.getElementById("printForm");
	var objInputPrint = objFormPrint.printInput;
	objFormPrint.action="../tools/print_page.asp";
	objFormPrint.target="_blank";
	objInputPrint.value=strHtml;
	objFormPrint.submit();
}
//========================================================
function MM_preloadImages()
{ //v3.0
	var d=document;
	if(d.images)
	{
		if(!d.MM_p) d.MM_p = new Array();
		var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
		for(i = 0; i < a.length; i++)
			if (a[i].indexOf("#") != 0)
			{
				d.MM_p[j]=new Image;
				d.MM_p[j++].src=a[i];
			}
	}
}
function MM_swapImgRestore()
{ //v3.0
	var i, x, a = document.MM_sr;
	for(i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++)
		x.src = x.oSrc;
}

function MM_findObj(n, d)
{ //v4.0
	var p,i,x;
	if(!d) d=document;
	if((p = n.indexOf("?")) > 0 && parent.frames.length)
	{
		d=parent.frames[n.substring(p+1)].document;
		n=n.substring(0,p);
	}
	if(!(x = d[n]) && d.all)
		x = d.all[n];
	for (i = 0; !x && i < d.forms.length; i++)
		x = d.forms[i][n];
	for(i = 0; !x && d.layers && i < d.layers.length; i++)
		x = MM_findObj(n, d.layers[i].document);
	if(!x && document.getElementById)
		x = document.getElementById(n);
	return x;
}

function MM_swapImage()
{ //v3.0
	var i, j = 0, x, a = MM_swapImage.arguments;
	document.MM_sr = new Array;
	for(i = 0; i < (a.length - 2); i += 3)
	if((x = MM_findObj(a[i])) != null)
	{
		document.MM_sr[j++] = x;
		if(!x.oSrc)
			x.oSrc = x.src;
		x.src = a[i + 2];
	}
}