document.write("<script language='javascript' src='/js/global/util.js'></script>");

var img_suf = new Array("off", "off", "off", "off", "off","off");

var anchorSubNavOpen = new Array( "<a href='javascript:showSection(\"price\")'>",
							"<a href='javascript:showSection(\"itinerary\")'>", 
							"<a href='javascript:showSection(\"ship\")'>", 	
							"<a href='javascript:showSection(\"flights\")'>",
							"<a href='javascript:showSection(\"shorex\")'>",							
							"<a href='javascript:showSection(\"weather\")'>");

var anchorSubNavClose = new Array("</a>", "</a>", "</a>", "</a>", "</a>","</a>");

var subPageNames = new Array( "price",	
							"itinerary",
							"ship",		
							"flights",
							"shorex",								
							"weather"
							);


function printCruiseDetailsNav(tabName,isRestrictedAirAvailable) {
    var tabPos = 0;
	for(i=0;i<subPageNames.length;++i)
	   if(tabName==subPageNames[i]) tabPos=i;
	eval("img_suf[" + tabPos + "] = 'on'");
	eval("anchorSubNavOpen[" + tabPos + "] = '' ");
	eval("anchorSubNavClose[" + tabPos + "] = '' ");
	printSubNav(isRestrictedAirAvailable);
}

function enablePricingNav() {
	document.getElementById("imgNavPricing").innerHTML = "<a href='javascript:showSection(\"price\")'><img src=\"/images/find/cd_nav_pricing_off.gif\" height=\"21\" width=\"153\" border=\"0\"></a>";
}


function printSubNav(isRestrictedAirAvailable){
	document.write( '<table width="745" border="0" cellspacing="0" cellpadding="0">' );
	document.write( '<tr>' );
		document.write( '<td valign="top" id="imgNavPricing">'+anchorSubNavOpen[0]+'<img src="/images/find/cd_nav_pricing_'+img_suf[0]+'.gif" height="21" width="153" border="0">'+anchorSubNavClose[0]+'</td>' );
		document.write( '<td valign="top"><img src="/images/find/cd_nav_div.gif" height="21" width="2" border="0"></td>' );
		document.write( '<td valign="top">'+anchorSubNavOpen[1]+'<img src="/images/find/cd_nav_itinerary_'+img_suf[1]+'.gif" alt="" height="21" width="79" border="0">'+anchorSubNavClose[1]+'</td>' );
		document.write( '<td valign="top"><img src="/images/find/cd_nav_div.gif" height="21" width="2" border="0"></td>' );
		document.write( '<td valign="top">'+anchorSubNavOpen[2]+'<img src="/images/find/cd_nav_ship_'+img_suf[2]+'.gif" height="21" width="48" border="0">'+anchorSubNavClose[2]+'</td>' );
		if(isRestrictedAirAvailable=='true'){
			document.write( '<td valign="top"><img src="/images/find/cd_nav_div.gif" height="21" width="2" border="0"></td>' );
			document.write( '<td valign="top">'+anchorSubNavOpen[3]+'<img src="/images/find/cd_nav_flights_'+img_suf[3]+'.gif" height="21" width="98" border="0">'+anchorSubNavClose[3]+'</td>' );
		}
		document.write( '<td valign="top"><img src="/images/find/cd_nav_div.gif" height="21" width="2" border="0"></td>' );
		document.write( '<td valign="top">'+anchorSubNavOpen[4]+'<img src="/images/find/cd_nav_shoreex_'+img_suf[4]+'.gif" height="21" width="132" border="0">'+anchorSubNavClose[4]+'</td>' );
		document.write( '<td valign="top"><img src="/images/find/cd_nav_div.gif" height="21" width="2" border="0"></td>' );
		document.write( '<td valign="top">'+anchorSubNavOpen[5]+'<img src="/images/find/cd_nav_weather_'+img_suf[5]+'.gif" height="21" width="75" border="0">'+anchorSubNavClose[5]+'</td>' );
		if(isRestrictedAirAvailable=='true')
			document.write( '<td valign="top"><img src="/images/find/cd_nav_end.gif" height="21" width="152" border="0"></td>' );
		else
			document.write( '<td valign="top"><img src="/images/find/cd_nav_end.gif" height="21" width="250" border="0"></td>' );
	document.write( '</tr>' );
	document.write( '</table>' );
}
