// JavaScript Document
<!--
/*
print top logo and pic
*/
document.write('<table width="99%" border="0" cellpadding="0" cellspacing="0">');
document.write('<tr>');
document.write('<th rowspan="3" scope="col"><img name="home_pre_r1_c1" src="images/home_pre_r1_c1.jpg" width="4" height="108" border="0" alt=""></th>');
document.write('<th scope="col"><a href="home.htm"><img name="home_pre_r1_c2" src="images/home_pre_r1_c2.jpg" width="223" height="58" border="0" alt=""></a></th>');

document.write('<th height="58" colspan="6" background="images/title.jpg" scope="col" align="right" valign="bottom">');

document.write('<table width="166" border="0" cellpadding="0" cellspacing="0"><tr><td width="99"><a href="contact.htm"><img border="0" src="images/b_contant.jpg"></a></td><td width="66"><a href="home.htm"><img border="0" src="images/b_home.jpg"></a></td></tr></table>');
document.write('</th>');
//document.write('<th height="58" colspan="4" background="images/home_pre_r1_c6.jpg" scope="col">&nbsp;</th>');
//document.write('<td width="100" height="58" background="images/home_pre_r1_c14.jpg" class="style10" scope="col"><div align="center" class="style13"><a href="#">Contact Us</a></div></td>');
//document.write('<th scope="col"><a href="home.htm"><img name="home_pre_r1_c15" src="images/home_pre_r1_c15.jpg" width="66" height="58" border="0" alt=""></th>');
document.write('<th rowspan="3" scope="col"><img name="home_pre_r1_c16" src="images/home_pre_r1_c16.jpg" width="4" height="108" border="0" alt=""></th>');
document.write('</tr>'); 


/*
print navigation
*/
var NaLinks=new Array();
var NaImages=new Array();
var NaSubMenu=new Array();
var mouse_out=true;
var menu_on=false;
var timeid;
//NaLinks[0]="index.htm?0";
//NaLinks[0]="home.htm?0";
NaLinks[1]="reservations.htm?1";
NaLinks[2]="promotions.htm?2";
//NaLinks[2]="#?2";
NaLinks[3]="destination_guide.htm?3";
//NaLinks[3]="#?3";
NaLinks[4]="eastern_miles.htm?4";
NaLinks[5]="in_flight.htm?5";
//NaLinks[5]="#?5";
//NaLinks[6]="about_china_eastern.htm?6";
NaLinks[6]="about_china_eastern.htm?6";


//NaImages[0]="home";
NaImages[1]="reservations";
NaImages[2]="promotions";
NaImages[3]="travelplanning";
NaImages[4]="easternmiles";
NaImages[5]="travelservices";
NaImages[6]="aboutus";
var imgePath="images/menu_";

//NaSubMenu[0]="";
NaSubMenu[1]="";
NaSubMenu[2]="<a href=\"promotions.htm?2\" class=\"menu1\" >Internet Specials</a>&nbsp;";
NaSubMenu[3]="<a href=\"destination_guide.htm?3\" class=\"menu1\" >Destination Guide</a> &nbsp;|&nbsp;&nbsp; <a href=\"destination_route_map.htm?3\" class=\"menu1\" >Route Map</a> &nbsp;|&nbsp;&nbsp;<a href=\"trip_preparation.htm?3\" class=\"menu1\">Trip Preparation</a> &nbsp;|&nbsp;&nbsp;<a href=\"travel_requirements.htm?3\" class=\"menu1\" >Travel Requirements</a>&nbsp;";
NaSubMenu[4]="";

NaSubMenu[5]="<a href=\"in_flight.htm?5\" class=\"menu1\">In-flight</a> &nbsp;|&nbsp;&nbsp;<a href=\"airport_guide.htm?5\" class=\"menu1\">Airport Guide</a> &nbsp;|&nbsp;&nbsp;<a href=\"special_needs.htm?5\" class=\"menu1\">Special Needs</a>&nbsp;|&nbsp;<a href=\"seat_maps.htm?5\" class=\"menu1\" >Seat Maps</a>&nbsp;";

NaSubMenu[6]="<a href=\"about_china_eastern.htm?6\" class=\"menu1\">About China Eastern</a> &nbsp;<span style=\"display:none\">|&nbsp;&nbsp;<a href=\"#?6\" class=\"menu1\">News &amp; Updates    Airline Partners</a> &nbsp;</span>";

document.write(' <th scope="col"><img name="home_pre_r2_c2" src="images/home_pre_r2_c2.jpg" width="223" height="32" border="0" alt=""></th>');
//document.write('<div ><table width="774" border="0" align="center" cellpadding="0" cellspacing="0" >');
//document.write('<tr><td>');
//document.write('<table border="0" cellpadding="0" cellspacing="0" width="774">');
//document.write('<tr>');
//0onmouseout="MM_swapImage(\''+imageId+'\',\'\',\''+imgePath+NaImages[i]+'_mouseout.jpg\',1)"
for (i=1; i<NaLinks.length;i++){
	var  imageId='NaImage'+i;
document.write('<td><a href="'+NaLinks[i]+'" onmouseout=\"OutMenu();\" onmouseover="OverMenu();MM_swapImage(\''+imageId+'\',\'\',\''+imgePath+NaImages[i]+'_mouseover.jpg\',1);showthismenu('+i+')"><img src="'+imgePath+NaImages[i]+'_mouseout.jpg" name="'+imageId+'"  border="0" id="'+imageId+'" /></a></td>');
}



//sub menu
document.write('<tr>');
document.write('<th align="right" name="thismenu" id="thismenu" height="18" colspan="7"   background="images/m_b.jpg" scope="col" style="color:white;"></th>');
document.write('</tr>');

//menu shadow

document.write('<tr>');
document.write('<th colspan="9" scope="col"><img name="home_pre_r4_c1" src="images/home_pre_r4_c1.jpg" width="772" height="4" border="0" alt=""></th>');
document.write('</tr>');
document.write('</table>');




function thisshow(){	
  document.getElementById("NaImage"+PageIndex).src=imgePath+NaImages[PageIndex]+'_mouseover.jpg';
  document.getElementById('thismenu').innerHTML=NaSubMenu[PageIndex];
	}
function OutMenu(){	//当鼠标移出主菜单后，5秒内恢复原始选项
	timeid=setTimeout("MM_clearAll();thisshow()",5000);
	}
function OverMenu(){
	//当鼠标进入主菜单后，清除定时器
	clearTimeout(timeid);
	
	//清除原始选项
	//document.getElementById("NaImage"+PageIndex).src=imgePath+NaImages[PageIndex]+'_mouseout.jpg';
	MM_clearAll();
		}
function OverSubMenu(){
	//当鼠标进入主菜单后，清除定时器
	clearTimeout(timeid);
			}
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_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 MM_clearAll(){
   //MM_swapImage('NaImage0','','images/menu_home_mouseout.jpg',1);
   MM_swapImage('NaImage1','','images/menu_reservations_mouseout.jpg',1);
   MM_swapImage('NaImage2','','images/menu_promotions_mouseout.jpg',1);
   MM_swapImage('NaImage3','','images/menu_travelplanning_mouseout.jpg',1);
   MM_swapImage('NaImage4','','images/menu_easternmiles_mouseout.jpg',1);
   MM_swapImage('NaImage5','','images/menu_travelservices_mouseout.jpg',1);
   MM_swapImage('NaImage6','','images/menu_aboutus_mouseout.jpg',1);
}
function showthismenu(val){  document.getElementById('thismenu').innerHTML="<div  onmouseover=\"OverSubMenu();\" onmouseout=\"OutMenu();\">"+NaSubMenu[val]+"</div>";
        
		     }

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;
}
//-->
var pageIndex=0;
function selpage(){

	 pagestr=document.location.href;
		var LenIndex=pagestr.indexOf("?")+1;
		var EndIndex=pagestr.indexOf("#");
		 if (EndIndex!=-1){
		len=EndIndex-LenIndex;
	    PageIndex=pagestr.substr(LenIndex,len);}
		else{
		PageIndex=pagestr.substr(LenIndex);	
		}
		if (eval(PageIndex)>=0 && eval(PageIndex)<=6){
	
document.getElementById("NaImage"+PageIndex).src=imgePath+NaImages[PageIndex]+'_mouseover.jpg';}
 if (!isNaN(PageIndex)){ document.getElementById('thismenu').innerHTML=NaSubMenu[PageIndex];}

	}
	selpage();