if(location.href.toString().search('www0.gfs.gov.hk') != -1)
{
	var gfs_url = 'ht'+'tp://www0.gfs.gov.hk/eng/';
}
else if (location.href.toString().search('www.gfs.gov.hk') != -1)
{
	var gfs_url = 'ht'+'tp://www.gfs.gov.hk/eng/';
}

else
{
	var gfs_url = '/eng/';
} 

com_image_path =	 "/Document/graphics/imgbgd/"

image_path =	 "/Document/graphics/imgbgd/eng/"


function changever(lang) {
	
		var chan_url="";
	
	
		if (lang=='tc') { 

			chan_url_temp = document.location.href.replace("/eng/", "/tch/");

			chan_url = chan_url_temp.replace(".htm", "c.htm");
			
	
		}

		

		else if (lang=='en_text') { 

			chan_url = document.location.href.replace(".htm", "tx.htm");
			 
			
		}
		
		else if (lang=='sc') { 

			chan_url_temp = document.location.href.replace("/eng/", "/sch/");
			chan_url = chan_url_temp.replace(".htm", "c.htm");
			
			
		}
	
	document.location=chan_url;
}


function getCurrentBanner(){

  var scriptBuffer='';

		scriptBuffer+='<img src="'+com_image_path+'banner_'+mainTopicNo+'.jpg" alt="image">';


		return scriptBuffer;
}

function getCurrentTopic(){

  var scriptBuffer='';

		scriptBuffer+='<img src="'+image_path+'t_'+mainTopicNo+'.gif" alt="'+title[mainTopicNo]+'">';


		return scriptBuffer;
}



function gfs_header(){
	
	var scriptBuffer='';

		scriptBuffer+='<table width="100%" height="87" border="0" cellpadding="0" cellspacing="0" background="'+image_path+'bkgdtexture.gif"><FORM name="search"  action="http://search.gov.hk/search.html" method=get onsubmit="if( document.getElementById(\'search\').query.value.length == 0 ) {alert(\'Please enter keyword\');}  else { document.getElementById(\'search\').submit();} return false;">             <input type=hidden name=ui_lang value="en">             <input type=hidden name=ui_charset value="utf-8">             <input type=hidden name=gp1 value="gfs_home">             <input type=hidden name=gp0 value="gfs_home">             <input type=hidden name=tpl_id value="gfs">             <input type=hidden name=web value="this">  <tr align="left" valign="top">    <td width="642" height="66" class="sidebar"><A HREF="http://www.gfs.gov.hk"><img src="'+image_path+'branding.gif" alt="Government Flying Service"  border=0></A></td>    <td height="66"  width="154">      <div align="center">      </div>    </td>        <td  height="66" valign="top" colspan=4>      <div align="right"><a href="http://www.brandhk.gov.hk/brandhk/" target="_blank"><img name="BrandHK" src="'+image_path+'BrandHK.gif"  border="0" alt="Brand Hong Kong - Asia\'s world city"></a></div>    </td>  </tr>  <tr align="left" valign="top">    <td height="19" valign="bottom"><table width="44%" border="0" cellspacing="0" cellpadding="0">      <tr>        <td valign="bottom"><a href="http://www.gov.hk/en/residents/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'info\',\'\',\''+image_path+'mainbar1_f2.gif\',1)" target="_blank"><img src="'+image_path+'mainbar1.gif" alt="GovHK" name="info"  border="0"></a></td><td valign="bottom"><a href="javascript:changever(\'en_text\')"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'mainbar2\',\'\',\''+image_path+'mainbar2_f2.gif\',1)"><img src="'+image_path+'mainbar2.gif" alt="Text Only" name="mainbar2" border="0"></a></td><td valign="bottom"><a href="javascript:changever(\'tc\')"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'mainbar3\',\'\',\''+image_path+'mainbar3_f2.gif\',1)"><img src="'+image_path+'mainbar3.gif" alt="繁體版" name="mainbar3" border="0"></a></td>        <td valign="bottom"><a href="javascript:changever(\'sc\')"" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image15\',\'\',\''+image_path+'mainbar4_f2.gif\',1)"><img src="'+image_path+'mainbar4.gif" alt="简体版" name="Image15" border="0"></a></td>        <td valign="bottom"><img src="'+image_path+'mainbar5.gif" ></td>      </tr>    </table></td>    <td align="right" valign="bottom"><A href="javascript:submit_search_form()" onclick="if( document.getElementById(\'search\').query.value.length == 0 ) {alert(\'Please enter keyword.\');}  else { document.getElementById(\'search\').submit();} return false;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'search2\',\'\',\''+image_path+'mainbar6_f2.gif\',1)"><img src="'+image_path+'mainbar6.gif" alt="Search" name="search2"  border="0"></a></td><td valign="bottom" width="72" rowspan="2"><INPUT name="query" type="text" id="qu" size="12" class="search_box"></td>    <td valign="bottom" height="19"><table width="123" border="0" cellspacing="0" cellpadding="0">      <tr>        <td width="30"><A href="javascript:submit_search_form()" onclick="if( document.getElementById(\'search\').query.value.length == 0 ) {alert(\'Please enter keyword.\');}  else { document.getElementById(\'search\').submit();} return false;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'search1\',\'\',\''+image_path+'mainbar8_f2.gif\',1)"><img src="'+image_path+'mainbar8.gif" alt="Search" name="search1"  border="0"></a></td>        <td width="65"><a href="' + gfs_url + 'site.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'sitemap\',\'\',\''+image_path+'mainbar9_f2.gif\',1)"><img src="'+image_path+'mainbar9.gif" alt="Site map" name="sitemap"  border="0"></a></td>        <td width="28"><a href="' + gfs_url + 'contact.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'contact\',\'\',\''+image_path+'mainbar10_f2.gif\',1)"><img src="'+image_path+'mainbar10.gif" alt="Contact us" name="contact" border="0"></a></td>      </tr>    </table></td>  </tr>  <tr align="left" valign="top" bgcolor="#BB3333">    <td height="2" colspan="4"><img src="Templates/tc/reddot.gif" width="1" height="1"></td>  </tr> </form></table>';	

	
	return scriptBuffer;
	
	
}


function gfs_header_notext(){
	
	var scriptBuffer='';

		scriptBuffer+='<table width="100%" height="87" border="0" cellpadding="0" cellspacing="0" background="'+image_path+'bkgdtexture.gif"><FORM name="search"  action="http://search.gov.hk/search.html" method=get onsubmit="if( document.getElementById(\'search\').query.value.length == 0 ) {alert(\'Please enter keyword\');}  else { document.getElementById(\'search\').submit();} return false;">             <input type=hidden name=ui_lang value="en">             <input type=hidden name=ui_charset value="utf-8">             <input type=hidden name=gp1 value="gfs_home">             <input type=hidden name=gp0 value="gfs_home">             <input type=hidden name=tpl_id value="gfs">             <input type=hidden name=web value="this">  <tr align="left" valign="top">    <td width="642" height="66" class="sidebar"><A HREF="http://www.gfs.gov.hk"><img src="'+image_path+'branding.gif" alt="Government Flying Service"  border=0></A></td>    <td height="66"  width="154">      <div align="center">      </div>    </td>        <td  height="66" valign="top" colspan=4>      <div align="right"><a href="http://www.brandhk.gov.hk/brandhk/" target="_blank"><img name="BrandHK" src="'+image_path+'BrandHK.gif"  border="0" alt="Brand Hong Kong - Asia\'s world city"></a></div>    </td>  </tr>  <tr align="left" valign="top">    <td height="19" valign="bottom"><table width="44%" border="0" cellspacing="0" cellpadding="0">      <tr>        <td valign="bottom"><a href="http://www.gov.hk/en/residents/" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'info\',\'\',\''+image_path+'mainbar1_f2.gif\',1)" target="_blank"><img src="'+image_path+'mainbar1.gif" alt="GovHK" name="info"  border="0"></a></td><td valign="bottom"><a href="javascript:changever(\'tc\')"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'mainbar3\',\'\',\''+image_path+'mainbar3_f2.gif\',1)"><img src="'+image_path+'mainbar3.gif" alt="繁體版" name="mainbar3" border="0"></a></td>        <td valign="bottom"><a href="javascript:changever(\'sc\')"" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'Image15\',\'\',\''+image_path+'mainbar4_f2.gif\',1)"><img src="'+image_path+'mainbar4.gif" alt="简体版" name="Image15" border="0"></a></td>        <td valign="bottom"><img src="'+image_path+'mainbar5.gif" ></td>      </tr>    </table></td>    <td align="right" valign="bottom"><A href="javascript:submit_search_form()" onclick="if( document.getElementById(\'search\').query.value.length == 0 ) {alert(\'Please enter keyword.\');}  else { document.getElementById(\'search\').submit();} return false;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'search2\',\'\',\''+image_path+'mainbar6_f2.gif\',1)"><img src="'+image_path+'mainbar6.gif" alt="Search" name="search2"  border="0"></a></td><td valign="bottom" width="72" rowspan="2"><INPUT name="query" type="text" id="qu" size="12" class="search_box"></td>    <td valign="bottom" height="19"><table width="123" border="0" cellspacing="0" cellpadding="0">      <tr>        <td width="30"><A href="javascript:submit_search_form()" onclick="if( document.getElementById(\'search\').query.value.length == 0 ) {alert(\'Please enter keyword.\');}  else { document.getElementById(\'search\').submit();} return false;" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'search1\',\'\',\''+image_path+'mainbar8_f2.gif\',1)"><img src="'+image_path+'mainbar8.gif" alt="Search" name="search1"  border="0"></a></td>        <td width="65"><a href="' + gfs_url + 'site.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'sitemap\',\'\',\''+image_path+'mainbar9_f2.gif\',1)"><img src="'+image_path+'mainbar9.gif" alt="Site map" name="sitemap"  border="0"></a></td>        <td width="28"><a href="' + gfs_url + 'contact.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage(\'contact\',\'\',\''+image_path+'mainbar10_f2.gif\',1)"><img src="'+image_path+'mainbar10.gif" alt="Contact us" name="contact" border="0"></a></td>      </tr>    </table></td>  </tr>  <tr align="left" valign="top" bgcolor="#BB3333">    <td height="2" colspan="4"><img src="Templates/tc/reddot.gif" width="1" height="1"></td>  </tr> </form></table>';	

	
	return scriptBuffer;
	
	
}

var leftMenuSectionImageOut = ".gif";
var leftMenuSectionImageOver = "_over.gif";
var leftMenuName = "Menu";
var leftMenuImageName = "icon";
var layerCommonName = "Popup";
var leftMenuFlag = false;
var firstLayerFlag = false;
var firstLayerTimerID;
var activeLeftMenuID = "";
var mainTopicNo;
var mainTopic = mainTopicNo;

var arLayer = new Array()
var arLayer2 = new Array()


var firstLayerImagesFlag = false;
var secondLayerFlag = false;
var activeFirstLayerImageID = "";
var activeSecondLayerID = "";
var secondLayerTimerID;
var subTopic = "";

var arSecondLayer = new Array()
var arSecondLayer2 = new Array()


function doShowMenu(imgName)
{
	var iconNo = parseInt(imgName);
	(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
	
	if (imgName==1){imgName=99;}
	
	if(mainTopic != imgName && !leftMenuFlag)
	//if(!leftMenuFlag)
	{
		document.images[leftMenuName+imgName].src=document.images[leftMenuName+imgName].src.replace(leftMenuSectionImageOut, leftMenuSectionImageOver)
		leftMenuFlag = true;
	}
	if (!firstLayerFlag)
	{
		MM_showHideLayers(layerCommonName+iconNo,'','show');
		firstLayerFlag=true;
	}
	activeLeftMenuID = imgName
}

function leftMenuMouseOver(imgName) 
{
	if (activeLeftMenuID == imgName)
	{
		if (firstLayerTimerID) clearTimeout(firstLayerTimerID);
		firstLayerTimerID = null;
	}
	else
	{
		if (firstLayerTimerID) clearTimeout(firstLayerTimerID);
		firstLayerTimerID = null;
		if (activeLeftMenuID!=""){doHideMenu(activeLeftMenuID);}
		doShowMenu(imgName)	
	}
}

function doHideMenu(imgName)
{
	var iconNo = parseInt(imgName);
	(iconNo<10)?iconNo='0'+iconNo:iconNo=iconNo;
	//if(true)
	if (imgName==1){imgName=99;}
	
	if(mainTopic != imgName)
	{
		document.images[leftMenuName+imgName].src=document.images[leftMenuName+imgName].src.replace(leftMenuSectionImageOver, leftMenuSectionImageOut)
		leftMenuFlag = false;
	}
	if (firstLayerFlag)
	{
		MM_showHideLayers(layerCommonName+iconNo,'','hide')
		firstLayerFlag=false;
	}
	activeLeftMenuID = "";
}

function leftMenuMouseOut(imgName) {
	
	if (activeLeftMenuID == imgName)
	{
		firstLayerTimerID = setTimeout("doHideMenu('"+imgName+"')", 500);
	}
	else
	{
		doHideMenu(imgName);
	}
}


function doShowLayer(imgName, layerName)
{
	var tempLayerName = layerName
	var tempLayer = "";
	var tempImage = "";
	var tempPath = "";
	if(subTopic != imgName && !firstLayerImagesFlag)
	{
		if(document.layers)
		{
			tempLayer = document.layers[tempLayerName].document;
			tempImage = tempLayer.images[imgName];
			tempImage.src=tempImage.src.replace(leftMenuSectionImageOut, leftMenuSectionImageOver)
		}
		else
		{document.images[imgName].src=document.images[imgName].src.replace(leftMenuSectionImageOut, leftMenuSectionImageOver)}
		
		firstLayerImagesFlag = true;
	}
	if (!secondLayerFlag )
	{
		secondLayerFlag =true;
	}
	activeFirstLayerImageID = imgName
	activeSecondLayerID = layerName
}

function firstLayerMouseOver(imgName, layerName) 
{
	if (activeFirstLayerImageID == imgName && activeSecondLayerID == layerName)
	{
		if (secondLayerTimerID) clearTimeout(secondLayerTimerID);
		secondLayerTimerID = null;
	}
	else
	{
		if (secondLayerTimerID) clearTimeout(secondLayerTimerID);
		secondLayerTimerID = null;
		if (activeFirstLayerImageID!=""){doHideLayer(activeFirstLayerImageID, activeSecondLayerID);}
		doShowLayer(imgName, layerName)	
	}
}

function doHideLayer(imgName, layerName)
{
	var tempLayerName = layerName
	var tempLayer = "";
	var tempImage = "";
	if(subTopic != imgName)
	{
		if(document.layers)
		{
			tempLayer = document.layers[tempLayerName].document;
			tempImage = tempLayer.images[imgName];
			tempImage.src=tempImage.src.replace(leftMenuSectionImageOver, leftMenuSectionImageOut)
		}
		else
		{document.images[imgName].src=document.images[imgName].src.replace(leftMenuSectionImageOver, leftMenuSectionImageOut)}
		
		firstLayerImagesFlag = false;
	}
	if (secondLayerFlag )
	{
		
		secondLayerFlag =false;
	}
	activeFirstLayerImageID = "";
	activeSecondLayerID = "";
}

function firstLayerMouseOut(imgName, layerName) {
	
	
	if (activeFirstLayerImageID == imgName && activeSecondLayerID == layerName)
	{
		secondLayerTimerID = setTimeout("doHideLayer('"+imgName+"', '"+layerName+"')", 9000000);
	}
	else
	{
		doHideLayer(imgName, layerName);
	}
}



var title = new Array()
title[100] = "Home";
title[2] = "News & Rescue";
title[3] = "About Us";
title[4] = "Aircraft";
title[5] = "Service & Operation";
title[6] = "Insignia";
title[7] = "Photo Gallery";
title[8] = "HK Air Tour";
title[9] = "Location";
title[10] = "Performance Statistics";
title[11] = "Environmental Report";
title[12] = "Contact Us";
title[13] = "Recruitment ";
title[14] = "Access to Information";
title[15] = "Public Forms";
title[16] = "Tender Notices";
title[17] = "Links";
title[18] = "Important Notices";	  
title[19] = "Site Map";


var subTitle = new Array()

subTitle[2] = new Array()
subTitle[2][1] = "News";
subTitle[2][2] = "Rescue Missions";
 

subTitle[3] = new Array()
subTitle[3][1] = "About GFS";
subTitle[3][2] = "Welcome";
subTitle[3][3] = "Mission";
subTitle[3][4] = "Organization Structure";


subTitle[4] = new Array()
subTitle[4][1] = "Jetstream J-41";
subTitle[4][2] = "Eurocopter EC 155";
subTitle[4][3] = "Eurocopter Super Puma";
subTitle[4][4] = "ZLIN Z242L";

subTitle[10] = new Array()
subTitle[10][1] = "1997-2000";
subTitle[10][2] = "2001-2005";	
subTitle[10][3] = "2006-2009";




function getLeftMenu(){
	var scriptBuffer='';
	var isOver='';

	scriptBuffer+='<table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="'+com_image_path+'/bg_01.gif" alt="image"></td></tr>';	   

	
    (mainTopicNo==100)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'home.htm" onmouseout="leftMenuMouseOut(\'100\')" onmouseover="leftMenuMouseOver(\'100\')"><img name="Menu100" border="0" src="'+image_path+'btn_01'+isOver+'.gif" alt="'+title[100]+'"></a></td></tr>';	              
	(mainTopicNo==2)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'newsmenu.htm" onmouseout="leftMenuMouseOut(\'2\')" onmouseover="leftMenuMouseOver(\'2\')" ><img name="Menu2" border="0" src="'+image_path+'btn_02'+isOver+'.gif"  alt="'+title[2]+'"></a></td></tr>';
	 (mainTopicNo==3)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'aboutus.htm" onmouseout="leftMenuMouseOut(\'3\')" onmouseover="leftMenuMouseOver(\'3\')"><img name="Menu3" border="0" src="'+image_path+'btn_03'+isOver+'.gif"  alt="'+title[3]+'"></a></td></tr>';
	(mainTopicNo==4)?isOver='_over':isOver=''; scriptBuffer+='<tr><td><a href="' + gfs_url + 'aircraftmenu.htm" onmouseout="leftMenuMouseOut(\'4\')" onmouseover="leftMenuMouseOver(\'4\')"><img name="Menu4" border="0" src="'+image_path+'btn_04'+isOver+'.gif"  alt="'+title[4]+'"></a></td></tr>';
   (mainTopicNo==5)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'service.htm" onmouseout="leftMenuMouseOut(\'5\')" onmouseover="leftMenuMouseOver(\'5\')"><img name="Menu5" border="0" src="'+image_path+'btn_05'+isOver+'.gif"  alt="'+title[5]+'"></a></td></tr>';
   (mainTopicNo==6)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'insignia.htm" onmouseout="leftMenuMouseOut(\'6\')" onmouseover="leftMenuMouseOver(\'6\')"><img name="Menu6" border="0" src="'+image_path+'btn_06'+isOver+'.gif"  alt="'+title[6]+'"></a></td></tr>';
   (mainTopicNo==7)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'gallery.htm" onmouseout="leftMenuMouseOut(\'7\')" onmouseover="leftMenuMouseOver(\'7\')"><img name="Menu7" border="0" src="'+image_path+'btn_07'+isOver+'.gif"  alt="'+title[7]+'"></a></td></tr>';
	(mainTopicNo==8)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'gfsvideo/video.htm" onmouseout="leftMenuMouseOut(\'8\')" onmouseover="leftMenuMouseOver(\'8\')"><img name="Menu8" border="0" src="'+image_path+'btn_08'+isOver+'.gif"  alt="'+title[8]+'"></a></td></tr>';
	(mainTopicNo==9)?isOver='_over':isOver=''; scriptBuffer+='<tr><td><a href="' + gfs_url + 'location.htm" onmouseout="leftMenuMouseOut(\'9\')" onmouseover="leftMenuMouseOver(\'9\')"><img name="Menu9" border="0" src="'+image_path+'btn_09'+isOver+'.gif"  alt="'+title[9]+'"></a></td></tr>';
 (mainTopicNo==10)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'performmenu.htm" onmouseout="leftMenuMouseOut(\'10\')" onmouseover="leftMenuMouseOver(\'10\')"><img name="Menu10" border="0" src="'+image_path+'btn_10'+isOver+'.gif"  alt="'+title[10]+'"></a></td></tr>';
 (mainTopicNo==11)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'enviro.htm"  onmouseout="leftMenuMouseOut(\'11\')" onmouseover="leftMenuMouseOver(\'11\')"><img name="Menu11" border="0" src="'+image_path+'btn_11'+isOver+'.gif"  alt="'+title[11]+'"></a></td></tr>';
(mainTopicNo==12)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'contact.htm"  onmouseout="leftMenuMouseOut(\'12\')" onmouseover="leftMenuMouseOver(\'12\')"><img name="Menu12" border="0" src="'+image_path+'btn_12'+isOver+'.gif"  alt="'+title[12]+'"></a></td></tr>';
(mainTopicNo==13)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'recruit.htm" onmouseout="leftMenuMouseOut(\'13\')" onmouseover="leftMenuMouseOver(\'13\')"><img name="Menu13" border="0" src="'+image_path+'btn_13'+isOver+'.gif"  alt="'+title[13]+'"></a></td></tr>';
(mainTopicNo==14)?isOver='_over':isOver='';scriptBuffer+=' <tr><td><a href="' + gfs_url + 'aboutgfs2.htm" onmouseout="leftMenuMouseOut(\'14\')" onmouseover="leftMenuMouseOver(\'14\')"><img name="Menu14" border="0" src="'+image_path+'btn_14'+isOver+'.gif" alt="'+title[14]+'"></a></td> </tr>';
(mainTopicNo==15)?isOver='_over':isOver='';scriptBuffer+='<tr><td><a href="' + gfs_url + 'aboutgfs2a.htm" onmouseout="leftMenuMouseOut(\'15\')" onmouseover="leftMenuMouseOver(\'15\')"><img name="Menu15" border="0" src="'+image_path+'btn_15'+isOver+'.gif"  alt="'+title[15]+'"></a></td></tr>';
(mainTopicNo==16)?isOver='_over':isOver='';scriptBuffer+='<tr> <td><a href="' + gfs_url + 'tender.htm"  onmouseout="leftMenuMouseOut(\'16\')" onmouseover="leftMenuMouseOver(\'16\')"><img name="Menu16" border="0" src="'+image_path+'btn_16'+isOver+'.gif"  alt="'+title[16]+'"></a></td></tr>';
(mainTopicNo==17)?isOver='_over':isOver='';scriptBuffer+='<tr> <td><a href="' + gfs_url + 'link.htm" onmouseout="leftMenuMouseOut(\'17\')" onmouseover="leftMenuMouseOver(\'17\')"><img name="Menu17" border="0" src="'+image_path+'btn_17'+isOver+'.gif"  alt="'+title[17]+'"></a></td> </tr>';
scriptBuffer+='<tr><td><img src="'+com_image_path+'/bg_02.gif"  alt="image"></td></tr></table>';	



return scriptBuffer;


}


function getLayer()
{
	var scriptBuffer='';
	var isOver='';	

   // layer2
	if (document.layers)
	{document.writeln('<layer name="Popup02" top='+188+' left='+150+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'2\')" onMouseOut="leftMenuMouseOut(\'2\')">');}
	else
	{document.writeln('<div id="Popup02" style="position:absolute; left:'+150+'; top:'+188+'; width:150; height:58; z-index:2; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'2\')" onMouseOut="leftMenuMouseOut(\'2\')">');
	document.writeln('<tr><td><a href="' + gfs_url + 'news.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_1\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_1\', \''+layerCommonName+'02\');"><img src="'+image_path+'popup/popup_news_01'+isOver+'.gif" name="Menu2_1" border="0" alt="'+subTitle[2][1]+'"></a></td></tr>');
	document.writeln('<tr><td><a href="' + gfs_url + 'event.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'2_2\', \''+layerCommonName+'02\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'2_2\', \''+layerCommonName+'02\');"><img src="'+image_path+'popup/popup_news_02'+isOver+'.gif" name="Menu2_2" border="0" alt="'+subTitle[2][2]+'"></a></td></tr>');
	document.writeln('</table>');
	
	
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}

	 // layer3 

	 if (document.layers)
	{document.writeln('<layer name="Popup03" top='+214+' left='+150+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'3\')" onMouseOut="leftMenuMouseOut(\'3\')">');}
	else
	{document.writeln('<div id="Popup03" style="position:absolute; left:'+150+'; top:'+214+'; width:150; height:58; z-index:3; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'3\')" onMouseOut="leftMenuMouseOut(\'3\')">');

	document.writeln('<tr><td><a href="' + gfs_url + 'aboutgfs.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_1\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_1\', \''+layerCommonName+'03\');"><img src="'+image_path+'popup/popup_about_01'+isOver+'.gif" name="Menu3_1" border="0" alt="'+subTitle[3][1]+'"></a></td></tr>');
	
	document.writeln('<tr><td><a href="' + gfs_url + 'welcome.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_2\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_2\', \''+layerCommonName+'03\');"><img src="'+image_path+'popup/popup_about_02'+isOver+'.gif" name="Menu3_2" border="0" alt="'+subTitle[3][2]+'"></a></td></tr>');
	
	document.writeln('<tr><td><a href="' + gfs_url + 'mission.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_3\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_3\', \''+layerCommonName+'03\');"><img src="'+image_path+'popup/popup_about_03'+isOver+'.gif" name="Menu3_3" border="0" alt="'+subTitle[3][3]+'"></a></td></tr>');
	
	document.writeln('<tr><td><a href="' + gfs_url + 'aboutgfs1.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'3_4\', \''+layerCommonName+'03\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'3_4\', \''+layerCommonName+'03\');"><img src="'+image_path+'popup/popup_about_04'+isOver+'.gif" name="Menu3_4" border="0" alt="'+subTitle[3][4]+'"></a></td></tr>');
	document.writeln('</table>');
	
	
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}
	



	//layer4

if (document.layers)
	{document.writeln('<layer name="Popup04" top='+242+' left='+150+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'4\')" onMouseOut="leftMenuMouseOut(\'4\')">');}
	else
	{document.writeln('<div id="Popup04" style="position:absolute; left:'+150+'; top:'+242+'; width:150; height:58; z-index:4; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'4\')" onMouseOut="leftMenuMouseOut(\'4\')">');

	document.writeln('<tr><td><a href="' + gfs_url + 'aircraft.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'4_1\', \''+layerCommonName+'04\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'4_1\', \''+layerCommonName+'04\');"><img src="'+image_path+'popup/popup_aircraft_01'+isOver+'.gif" name="Menu4_1" border="0" alt="'+subTitle[4][1]+'"></a></td></tr>');
	
	document.writeln('<tr><td><a href="' + gfs_url + 'aircraft5.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'4_2\', \''+layerCommonName+'04\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'4_2\', \''+layerCommonName+'04\');"><img src="'+image_path+'popup/popup_aircraft_02'+isOver+'.gif" name="Menu4_2" border="0" alt="'+subTitle[4][2]+'"></a></td></tr>');
	
	document.writeln('<tr><td><a href="' + gfs_url + 'aircraft4.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'4_3\', \''+layerCommonName+'04\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'4_3\', \''+layerCommonName+'04\');"><img src="'+image_path+'popup/popup_aircraft_03'+isOver+'.gif" name="Menu4_3" border="0" alt="'+subTitle[4][3]+'"></a></td></tr>');
	
	document.writeln('<tr><td><a href="' + gfs_url + 'aircraft6.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'4_4\', \''+layerCommonName+'04\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'4_4\', \''+layerCommonName+'04\');"><img src="'+image_path+'popup/popup_aircraft_04'+isOver+'.gif" name="Menu4_4" border="0" alt="'+subTitle[4][4]+'"></a></td></tr>');
	document.writeln('</table>');
	
	
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}


	//layer10

	if (document.layers)
	{document.writeln('<layer name="Popup10" top='+394+' left='+150+' width=150 height=58 visibility="hide" onMouseOver="leftMenuMouseOver(\'10\')" onMouseOut="leftMenuMouseOut(\'10\')">');}
	else
	{document.writeln('<div id="Popup10" style="position:absolute; left:'+150+'; top:'+394+'; width:150; height:58; z-index:10; visibility: hidden;">');}
	
	document.writeln('<table width="100%" border="0" alt="" cellspacing="0" cellpadding="0" onMouseOver="leftMenuMouseOver(\'10\')" onMouseOut="leftMenuMouseOut(\'10\')">');

	document.writeln('<tr><td><a href="' + gfs_url + 'perform2000.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'10_1\', \''+layerCommonName+'10\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'10_1\', \''+layerCommonName+'10\');"><img src="'+image_path+'popup/popup_perf_01'+isOver+'.gif" name="Menu10_1" border="0" alt="'+subTitle[4][1]+'"></a></td></tr>');
	
	document.writeln('<tr><td><a href="' + gfs_url + 'perform2004.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'10_2\', \''+layerCommonName+'10\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'10_2\', \''+layerCommonName+'10\');"><img src="'+image_path+'popup/popup_perf_02'+isOver+'.gif" name="Menu10_2" border="0" alt="'+subTitle[4][2]+'"></a></td></tr>');
	
	document.writeln('<tr><td><a href="' + gfs_url + 'perform.htm" onmouseout="firstLayerMouseOut(\''+leftMenuName+'10_3\', \''+layerCommonName+'10\');" onmouseover="firstLayerMouseOver(\''+leftMenuName+'10_3\', \''+layerCommonName+'10\');"><img src="'+image_path+'popup/popup_perf_03'+isOver+'.gif" name="Menu10_3" border="0" alt="'+subTitle[4][3]+'"></a></td></tr>');
	
	
	document.writeln('</table>');
	
	
	
	if (document.layers)
	{document.writeln('</layer>');}
	else
	{document.writeln('</div>');}
	
	
}






function get_footer(){



	if (revisionDate==''||revisionDate=='MM/DD/YYYY') revisionDate='01/07/2010';
	
	var monthArray=new Array();
	monthArray[0]='January';
	monthArray[1]='February';
	monthArray[2]='March';
	monthArray[3]='April';
	monthArray[4]='May';
	monthArray[5]='June';
	monthArray[6]='July';
	monthArray[7]='August';
	monthArray[8]='September';
	monthArray[9]='October';
	monthArray[10]='November';
	monthArray[11]='December';
	var reDate=new Date(Date.parse(revisionDate))
	var showDate=reDate.getDate()+' '+monthArray[reDate.getMonth()]+' '+reDate.getFullYear();
	
	var scriptBuffer='';
	scriptBuffer+='<table width="100%" border="0" cellspacing="0" cellpadding="0">';

	scriptBuffer+='<tr>';

	scriptBuffer+='<td><img src="'+com_image_path+'spacer.gif" width="8" height="1" alt="image"></td><td  colspan=2 background="'+com_image_path+'botdot.jpg""><img src="'+com_image_path+'spacer.gif" width="100%" height="3" alt="image"></td><td><img src="'+com_image_path+'spacer.gif" width="8" height="1" alt="image"></td></tr> ';

	
	scriptBuffer+='<tr>';

	scriptBuffer+='<td><img src="'+com_image_path+'spacer.gif" width="8" height="30" alt="image"></td>';	

	

	scriptBuffer+='<td>2010<img src="'+image_path+'copy.gif" alt="Copyright" width="12" height="11"> | <a href="' + gfs_url + 'notice.htm">Important notices</a></td>';
	scriptBuffer+='<td align="right">Last revision date: '+showDate+'</td>';
	scriptBuffer+='<td><img src="'+com_image_path+'spacer.gif" width="8" height="30" alt="image"></td>';	
	scriptBuffer+='</tr>';
	scriptBuffer+='</table>';
	return scriptBuffer;
	
	
	

	
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

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_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];}
}

function NewWindow(mypage,myname,w,h,scroll){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=yes';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
