function exchange_rate()
{
return (6.7);  // dollar to rmb exchange rate
}


function beijing_hotels()
{
document.write('The Huayu Hotel <font color="#ffbf36" size=-1>(3-Star)</font><br>');
document.write('The Guxiang 20 <font color="#ffbf36" size=-1>(4-Star)</font><br>');
document.write('Crowne Plaza Wangfujing <font color="#ffbf36" size=-1>(5-Star)');
}


function shanghai_hotels()
{
document.write('Nanjing Hotel <font color="#ffbf36" size=-1>(3-Star)</font><br>');
document.write('Anting Villa Hotel <font color="#ffbf36" size=-1>(4-Star)</font><br>');
document.write('China Mansion Hotel <font color="#ffbf36" size=-1>(5-Star)');
}


function xian_hotels()
{
document.write('The City Hotel <font color="#ffbf36" size=-1>(3-Star)</font><br>');
document.write('The Bell Tower Hotel <font color="#ffbf36" size=-1>(4-Star)</font><br>');
document.write('Xian Titan Times Hotel <font color="#ffbf36" size=-1>(5-Star)');
}


function guilin_hotels()
{
document.write('Eva Inn <font color="#ffbf36" size=-1>(3-Star)</font><br>');
document.write('Guilin Royal Garden Hotel  <font color="#ffbf36" size=-1>(4-Star)</font><br>');
document.write('Sheraton Guilin Hotel <font color="#ffbf36" size=-1>(5-Star)');
}


function yangshuo_hotels()
{
document.write('Magnolia Hotel <font color="#ffbf36" size=-1>(3-Star)</font><br>');
document.write('New Century Hotel <font color="#ffbf36" size=-1>(4-Star)</font><br>');
document.write('Paradesa Hotel <font color="#ffbf36" size=-1>(5-Star)');
}


function tour_multi_dropdown()
{
document.write('<form name="jump">');
document.write('<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO" style="background-color: #5f0303; font-size: 14px; color: #ffbf36; padding: 3;">');
document.write('<option value="#" style="text-align: center;">Select another Tour Itinerary</option>');
document.write('<option value="#" style="text-align: center;">Beijing Only</option>');
document.write('<option value="#"> 1 Day Beijing Tour</option>');
document.write('<option value="#"> 2 Day Beijing Tour</option>');
document.write('<option value="#"> 3 Day Beijing Tour with Factory and School visits</option>');
document.write('<option value="#"> 4 Day Beijing Tour with Lecture and Factory visits</option>');
document.write('<option value="#"> 8 Day Beijing Language + Culture Course with tours and live on campus option</option>');
document.write('<option value="custom_itinerary.html" style="color: #efeeaa;"> &nbsp;Select the destinations you prefer and let us build you a custom itinerary &nbsp;</option>');
document.write('<option value="#" style="text-align: center;">Beijing &rarr; Xi\'an &rarr; Beijing</option>');
document.write('<option value="#" style="text-align: center;">Beijing &rarr;  Xi\'an &rarr; Shanghai</option>');
document.write('<option value="#" style="text-align: center;">Beijing &rarr;  Xi\'an &rarr; Guilin &rarr; Yangshuo &rarr; Shanghai</option>');
document.write('</select>');
document.write('</form>');
}

function tour_multi_dropdown2()
{
document.write('<p>');
document.write('<form name="jump2">');
document.write('<select name="menu2" onChange="location=document.jump2.menu2.options[document.jump2.menu2.selectedIndex].value;" value="GO" style="background-color: #5f0303; font-size: 14px; color: #ffbf36; padding: 3;">');
document.write('<option value="#" style="text-align: center;">Select another Tour Itinerary</option>');
document.write('<option value="beijing-xian-shanghai-1.html"> &nbsp;Beijing &rarr; Xi\'an &rarr; Shanghai - with airplane tickets</option>');
document.write('<option value="beijing-xian-shanghai-2.html"> &nbsp;Beijing &rarr; Xi\'an &rarr; Shanghai - with airplane and train tickets</option>');
//document.write('<option value="beijing-xian-shanghai-3.html"> &nbsp;Beijing &rarr; Xi\'an &rarr; Shanghai - with train tickets</option>');
//document.write('<option value="beijing-xian-yangtze-shanghai.html"> &nbsp;Beijing &rarr; Xian &rarr; Chongqing &rarr; Yangtze &rarr; Yichang &rarr; Shanghai</option>');
document.write('<option value="beijing-xian-guilin-shanghai.html"> &nbsp;Beijing &rarr; Xian &rarr; Guilin &rarr; Yangshuo &rarr; Shanghai</option>');
document.write('<option value="beijing-guilin-shanghai-1.html"> &nbsp;Beijing &rarr; Guilin &rarr; Shanghai</option>');
//document.write('<option value="#"> &nbsp;Beijing &rarr; Xian &rarr; Lhasa &rarr; Shigatse &rarr; Shanghai</option>');
//document.write('<option value="#"> &nbsp;Beijing &rarr; Xian &rarr; Lhasa &rarr; Chongqing &rarr; Yangtze &rarr; Yichang &rarr; Shanghai</option>');
//document.write('<option value="#"> &nbsp;Shanghai &rarr; Xi\'an &rarr; Beijing</option>');
//document.write('<option value="#"> &nbsp;Shanghai &rarr; Guilin &rarr; Beijing</option>');
//document.write('<option value="#"> &nbsp;Shanghai &rarr; Suzhou &rarr; Yellow Mountain &rarr; Hangzhou</option>');
//document.write('<option value="#"> &nbsp;Shanghai &rarr; Chengdu &rarr; Lhasa &rarr; Shigatse &rarr; Xian &rarr; Beijing</option>');
//document.write('<option value="#"> &nbsp;Hong Kong &rarr; Guilin &rarr; Chongqing &rarr; Yangtze &rarr; Yichang &rarr; Shanghai &rarr; Beijing &nbsp;</option>');
document.write('<option value="custom_itinerary.html" style="color: #efeeaa;"> &nbsp;Select the destinations you prefer and let us build you a custom itinerary &nbsp;</option>');
document.write('</select>');
document.write('</form>');
}


function contact_us(subj)
{
document.write('<p>');
document.write('<div align=center>');
document.write('<table width="420" bgcolor="#4d0405" cellpadding=12 class="contact"><tr><td>');
document.write('<font color="#efeeaa">');
document.write('<font color="#f72f2f">Enquire, customize or book this tour:</font><p>');
document.write('E-mail: <a href="mailto:book@thechinaguide.com?subject='+subj+'">book@thechinaguide.com</a>');
document.write('<br>Phone: (+8610) 8532-2274 ');
document.write('<br>Mobile: (+86) 15910740785 ');
document.write('</td><td><img src="../citsbeijing.jpg" width="84" height="45" alt="China Tours">');
document.write('<p><font size=-2>Print this page: <br><a href=# onclick="window.print();"><img src="print.gif" align=middle hspace=5 alt="Print this Page" title="Print this Page" border="0" /></a> ');
document.write('</font>');
document.write('</td></tr></table>');
document.write('</div>');
}




function advantages()
{
document.write('Our Advantages:</td><td align=left>&bull; ');
document.write('	Zero shopping stops at ripoff commission factories.<br> &nbsp; <font color="#ff4747"><i>');
document.write('		Your time and money is better spent.</i></font><br>&bull; ');
document.write('	Flexible time schedule to suit your pace.<br> &nbsp; <font color="#ff4747"><i>');
document.write('		No rush and schedule changes possible.</i></font> <br>&bull; ');
document.write('	Guides selected and trained by American management.<br> &nbsp; <font color="#ff4747"><i>');
document.write('		Excellent English, knowledge and personality.</i></font>   <br>&bull; ');
document.write('	Meals are in quality local restaurants.<br> &nbsp; <font color="#ff4747"><i>');
document.write('		Your guide handles flexible ordering.</i></font><br>&bull; ');
document.write('	24 hour English speaking hotline.<br> &nbsp; <font color="#ff4747"><i>');
document.write('		If there is a problem, a quick solution.</i></font><br> ');
document.write('	<font size=-1>(also a way for family to reach you with urgent matters): <br>(+8610) 8532-2274 / (+86) 15910740785 <br> (+86) 13699156687 / (+86) 13811512770</font>');
document.write('</td></tr><tr><td align=right valign=top><font color="#ffbf36">');
}


function dates()
{
document.write('Dates:</td><td align=left> 	');
document.write('	As a private tour you choose the dates.</td></tr><tr><td align=right><font color="#ffbf36">');
}


function price_table(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,p,includes,payment)
{
var ex = exchange_rate(); // dollar exchange rate
document.write('<p>');
document.write('<a name="prices"></a>');
document.write('<table class="prices"><tr><td colspan=4 bgcolor="#280008">');
document.write('<font size=+1 color="#ffbf36">Tour Price</font> &nbsp;  (per person) <br>With private land tour, domestic transport, admissions, meals specified and hotel. ');
document.write('</td></tr><tr><td align=left>');
// 3-star hotel package
document.write('<font color="#ffbf36"><div align=center>Tour + 3-Star hotel</div></font><pre>');
document.write(' &nbsp; 1 guest:   US$' + parseInt(Math.ceil(a1*p/ex)) + ' / RMB ' + parseInt(a1*p) + '<br>');
document.write(' &nbsp; 2 guests:  US$' + parseInt(Math.ceil(a2*p/ex)/2) + ' / RMB ' + parseInt(a2*p/2) + '<br>');
document.write(' &nbsp; 3 guests:  US$' + parseInt(Math.ceil(a3*p/ex)/3) + ' / RMB ' + parseInt(a3*p/3) + '<br>');
document.write(' &nbsp; 4 guests:  US$' + parseInt(Math.ceil(a4*p/ex)/4) + ' / RMB ' + parseInt(a4*p/4) + '<br>');
document.write(' &nbsp; 5 guests:  US$' + parseInt(Math.ceil(a5*p/ex)/5) + ' / RMB ' + parseInt(a5*p/5) + '<br>');
document.write(' &nbsp; 6 guests:  US$' + parseInt(Math.ceil(a6*p/ex)/6) + ' / RMB ' + parseInt(a6*p/6) + '<br>');
document.write(' &nbsp; 7 guests:  US$' + parseInt(Math.ceil(a7*p/ex)/7) + ' / RMB ' + parseInt(a7*p/7) + '<br>');
document.write(' &nbsp; 8 guests:  US$' + parseInt(Math.ceil(a8*p/ex)/8) + ' / RMB ' + parseInt(a8*p/8) + '<br>');
document.write(' &nbsp; 9 guests:  US$' + parseInt(Math.ceil(a9*p/ex)/9) + ' / RMB ' + parseInt(a9*p/9) + '<br>');
document.write(' &nbsp; 10 guests: US$' + parseInt(Math.ceil(a10*p/ex)/10) + ' / RMB ' + parseInt(a10*p/10) + '');
document.write('</td><td align=left>');
// 4-star hotel package
document.write('<font color="#ffbf36"><div align=center>Tour + 4-Star hotel</div></font><pre>');
document.write(' &nbsp; 1 guest:   US$' + parseInt(Math.ceil(b1*p/ex)) + ' / RMB ' + parseInt(b1*p) + '<br>');
document.write(' &nbsp; 2 guests:  US$' + parseInt(Math.ceil(b2*p/ex)/2) + ' / RMB ' + parseInt(b2*p/2) + '<br>');
document.write(' &nbsp; 3 guests:  US$' + parseInt(Math.ceil(b3*p/ex)/3) + ' / RMB ' + parseInt(b3*p/3) + '<br>');
document.write(' &nbsp; 4 guests:  US$' + parseInt(Math.ceil(b4*p/ex)/4) + ' / RMB ' + parseInt(b4*p/4) + '<br>');
document.write(' &nbsp; 5 guests:  US$' + parseInt(Math.ceil(b5*p/ex)/5) + ' / RMB ' + parseInt(b5*p/5) + '<br>');
document.write(' &nbsp; 6 guests:  US$' + parseInt(Math.ceil(b6*p/ex)/6) + ' / RMB ' + parseInt(b6*p/6) + '<br>');
document.write(' &nbsp; 7 guests:  US$' + parseInt(Math.ceil(b7*p/ex)/7) + ' / RMB ' + parseInt(b7*p/7) + '<br>');
document.write(' &nbsp; 8 guests:  US$' + parseInt(Math.ceil(b8*p/ex)/8) + ' / RMB ' + parseInt(b8*p/8) + '<br>');
document.write(' &nbsp; 9 guests:  US$' + parseInt(Math.ceil(b9*p/ex)/9) + ' / RMB ' + parseInt(b9*p/9) + '<br>');
document.write(' &nbsp; 10 guests: US$' + parseInt(Math.ceil(b10*p/ex)/10) + ' / RMB ' + parseInt(b10*p/10) + '');
document.write('</td><td align=left>');
// 5-star hotel package
document.write('<font color="#ffbf36"><div align=center>Tour + 5-Star hotel</div></font><pre>');
document.write(' &nbsp; 1 guest:   US$' + parseInt(Math.ceil(c1*p/ex)) + ' / RMB ' + parseInt(c1*p) + '<br>');
document.write(' &nbsp; 2 guests:  US$' + parseInt(Math.ceil(c2*p/ex)/2) + ' / RMB ' + parseInt(c2*p/2) + '<br>');
document.write(' &nbsp; 3 guests:  US$' + parseInt(Math.ceil(c3*p/ex)/3) + ' / RMB ' + parseInt(c3*p/3) + '<br>');
document.write(' &nbsp; 4 guests:  US$' + parseInt(Math.ceil(c4*p/ex)/4) + ' / RMB ' + parseInt(c4*p/4) + '<br>');
document.write(' &nbsp; 5 guests:  US$' + parseInt(Math.ceil(c5*p/ex)/5) + ' / RMB ' + parseInt(c5*p/5) + '<br>');
document.write(' &nbsp; 6 guests:  US$' + parseInt(Math.ceil(c6*p/ex)/6) + ' / RMB ' + parseInt(c6*p/6) + '<br>');
document.write(' &nbsp; 7 guests:  US$' + parseInt(Math.ceil(c7*p/ex)/7) + ' / RMB ' + parseInt(c7*p/7) + '<br>');
document.write(' &nbsp; 8 guests:  US$' + parseInt(Math.ceil(c8*p/ex)/8) + ' / RMB ' + parseInt(c8*p/8) + '<br>');
document.write(' &nbsp; 9 guests:  US$' + parseInt(Math.ceil(c9*p/ex)/9) + ' / RMB ' + parseInt(c9*p/9) + '<br>');
document.write(' &nbsp; 10 guests: US$' + parseInt(Math.ceil(c10*p/ex)/10) + ' / RMB ' + parseInt(c10*p/10) + '');
document.write('</td></tr><tr><td colspan=3>');
price_footer();
document.write('</td></tr></table>');
}


function pricetable_bxs_1(from_price)  // plane
{
var pp_extras = 0;
var base_extras = 0;
var stars = 3;
var star3 = new Array(11);
var star4 = new Array(11);
var star5 = new Array(11);
var p = "1.1";
for(guests  = 1; guests <= 10; guests++) 
	{ 
//		document.write('<br><br><font color="white">guests: '+guests+' stars'+stars+'<br> beijing_tour_1(guests, pp_extras, base_extras) '+beijing_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>beijing_hotel(guests, stars, 3) '+beijing_hotel(guests, stars, 3));
//		document.write(' <br>plane_ticket("beijing", "xian", guests) '+plane_ticket("beijing", "xian", guests));
//		document.write(' <br>xian_hotel(guests, stars, 3) '+xian_hotel(guests, stars, 3));
//		document.write(' <br>xian_tour_1(guests, pp_extras, base_extras) '+xian_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>plane_ticket("xian", "shanghai", guests) '+plane_ticket("xian", "shanghai", guests));
//		document.write(' <br>shanghai_tour_1(guests, pp_extras, base_extras) '+shanghai_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>shanghai_hotel(guests, stars, 2) '+shanghai_hotel(guests, stars, 2));
   		star3[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests, pp_extras, base_extras) +
				plane_ticket("xian", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
//		document.write(' <br>total '+star3[guests]);
				
	}
var stars = 4;
for(guests  = 1; guests <= 10; guests++) 
	{ 
   		star4[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests, pp_extras, base_extras) +
				plane_ticket("xian", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
	}
var stars = 5;
for(guests  = 1; guests <= 10; guests++) 
	{ 
   		star5[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests, pp_extras, base_extras) +
				plane_ticket("xian", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
	}
for(guests  = 1; guests <= 9; guests++) 
	{
	if (star3[guests]/guests < star3[guests+1]/(guests+1))
		star3[guests+1] = (star3[guests]/guests-100)*(guests+1);
	if (star4[guests]/guests < star4[guests+1]/(guests+1))
		star4[guests+1] = (star4[guests]/guests-100)*(guests+1);
	if (star5[guests]/guests < star5[guests+1]/(guests+1))
		star5[guests+1] = (star5[guests]/guests-100)*(guests+1);
	}
var ex = exchange_rate(); // dollar exchange rate
if (from_price == "1")
	document.write('From US$'+parseInt(Math.ceil(star3[2]*p/ex)/2)+' / RMB'+parseInt(Math.ceil(star3[2]*p)/2)+' <font size=-1>per person for 2 guests</font> <br><font size=-2>Including private tour, domestic transportation and 3 star hotels.</font>');
else
	price_table(star3[1],star3[2],star3[3],star3[4],star3[5],star3[6],star3[7],star3[8],star3[9],star3[10],star4[1],star4[2],star4[3],star4[4],star4[5],star4[6],star4[7],star4[8],star4[9],star4[10],star5[1],star5[2],star5[3],star5[4],star5[5],star5[6],star5[7],star5[8],star5[9],star5[10],p);
}


function pricetable_bxs_2(from_price)  //train
{
var pp_extras = 0;
var base_extras = 0;
var stars = 3;
var star3 = new Array(11);
var star4 = new Array(11);
var star5 = new Array(11);
var p = "1.1";
for(guests  = 1; guests <= 10; guests++) 
	{ 
//		document.write('<br><br><font color="white">guests: '+guests+' stars'+stars+'<br> beijing_tour_1(guests, pp_extras, base_extras) '+beijing_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>beijing_hotel(guests, stars, 3) '+beijing_hotel(guests, stars, 3));
//		document.write(' <br>plane_ticket("beijing", "xian", guests) '+plane_ticket("beijing", "xian", guests));
//		document.write(' <br>xian_hotel(guests, stars, 3) '+xian_hotel(guests, stars, 3));
//		document.write(' <br>xian_tour_1(guests, pp_extras, base_extras) '+xian_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>plane_ticket("xian", "shanghai", guests) '+plane_ticket("xian", "shanghai", guests));
//		document.write(' <br>shanghai_tour_1(guests, pp_extras, base_extras) '+shanghai_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>shanghai_hotel(guests, stars, 2) '+shanghai_hotel(guests, stars, 2));
   		star3[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				train_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests, -300, base_extras) +
				plane_ticket("xian", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
//		document.write(' <br>total '+star3[guests]);
				
	}
var stars = 4;
for(guests  = 1; guests <= 10; guests++) 
	{ 
   		star4[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				train_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests,  -300, base_extras) +
				plane_ticket("xian", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
	}
var stars = 5;
for(guests  = 1; guests <= 10; guests++) 
	{ 
   		star5[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				train_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests,  -300, base_extras) +
				plane_ticket("xian", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
	}
for(guests  = 1; guests <= 9; guests++) 
	{
	if (star3[guests]/guests < star3[guests+1]/(guests+1))
		star3[guests+1] = (star3[guests]/guests-100)*(guests+1);
	if (star4[guests]/guests < star4[guests+1]/(guests+1))
		star4[guests+1] = (star4[guests]/guests-100)*(guests+1);
	if (star5[guests]/guests < star5[guests+1]/(guests+1))
		star5[guests+1] = (star5[guests]/guests-100)*(guests+1);
	}
var ex = exchange_rate(); // dollar exchange rate
if (from_price == "1")
	document.write('From US$'+parseInt(Math.ceil(star3[2]*p/ex)/2)+' / RMB'+parseInt(Math.ceil(star3[2]*p)/2)+' <font size=-1>per person for 2 guests</font> <br><font size=-2>Including private tour, domestic transportation and 3 star hotels.</font>');
else
	price_table(star3[1],star3[2],star3[3],star3[4],star3[5],star3[6],star3[7],star3[8],star3[9],star3[10],star4[1],star4[2],star4[3],star4[4],star4[5],star4[6],star4[7],star4[8],star4[9],star4[10],star5[1],star5[2],star5[3],star5[4],star5[5],star5[6],star5[7],star5[8],star5[9],star5[10],p);
}


function pricetable_bxgs_1(from_price)  // guilin
{
var pp_extras = 0;
var base_extras = 0;
var stars = 3;
var star3 = new Array(11);
var star4 = new Array(11);
var star5 = new Array(11);
var p = "1.1";
for(guests  = 1; guests <= 10; guests++) 
	{ 
//		document.write('<br><br><font color="white">guests: '+guests+' stars'+stars+'<br> beijing_tour_1(guests, pp_extras, base_extras) '+beijing_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>beijing_hotel(guests, stars, 3) '+beijing_hotel(guests, stars, 3));
//		document.write(' <br>plane_ticket("beijing", "xian", guests) '+plane_ticket("beijing", "xian", guests));
//		document.write(' <br>xian_hotel(guests, stars, 3) '+xian_hotel(guests, stars, 3));
//		document.write(' <br>xian_tour_1(guests, pp_extras, base_extras) '+xian_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>plane_ticket("xian", "shanghai", guests) '+plane_ticket("xian", "shanghai", guests));
//		document.write(' <br>shanghai_tour_1(guests, pp_extras, base_extras) '+shanghai_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>shanghai_hotel(guests, stars, 2) '+shanghai_hotel(guests, stars, 2));
   		star3[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests, pp_extras, base_extras) +
				plane_ticket("xian", "guilin", guests) +
				guilin_tour_1 (guests, pp_extras, base_extras) +
				guilin_hotel(guests, stars, 2) +
				yangshuo_hotel(guests, stars, 2) +
				plane_ticket("guilin", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
//		document.write(' <br>total '+star3[guests]);
				
	}
var stars = 4;
for(guests  = 1; guests <= 10; guests++) 
	{ 
   		star4[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests, pp_extras, base_extras) +
				plane_ticket("xian", "guilin", guests) +
				guilin_tour_1 (guests, pp_extras, base_extras) +
				guilin_hotel(guests, stars, 2) +
				yangshuo_hotel(guests, stars, 2) +
				plane_ticket("guilin", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
	}
var stars = 5;
for(guests  = 1; guests <= 10; guests++) 
	{ 
   		star5[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "xian", guests) +
				xian_hotel(guests, stars, 2) +
				xian_tour_1(guests, pp_extras, base_extras) +
				plane_ticket("xian", "guilin", guests) +
				guilin_tour_1 (guests, pp_extras, base_extras) +
				guilin_hotel(guests, stars, 2) +
				yangshuo_hotel(guests, stars, 2) +
				plane_ticket("guilin", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
	}
for(guests  = 1; guests <= 9; guests++) 
	{
	if (star3[guests]/guests < star3[guests+1]/(guests+1))
		star3[guests+1] = (star3[guests]/guests-100)*(guests+1);
	if (star4[guests]/guests < star4[guests+1]/(guests+1))
		star4[guests+1] = (star4[guests]/guests-100)*(guests+1);
	if (star5[guests]/guests < star5[guests+1]/(guests+1))
		star5[guests+1] = (star5[guests]/guests-100)*(guests+1);
	}
var ex = exchange_rate(); // dollar exchange rate
if (from_price == "1")
	document.write('From US$'+parseInt(Math.ceil(star3[2]*p/ex)/2)+' / RMB'+parseInt(Math.ceil(star3[2]*p)/2)+' <font size=-1>per person for 2 guests</font> <br><font size=-2>Including private tour, domestic transportation and 3 star hotels.</font>');
else
	price_table(star3[1],star3[2],star3[3],star3[4],star3[5],star3[6],star3[7],star3[8],star3[9],star3[10],star4[1],star4[2],star4[3],star4[4],star4[5],star4[6],star4[7],star4[8],star4[9],star4[10],star5[1],star5[2],star5[3],star5[4],star5[5],star5[6],star5[7],star5[8],star5[9],star5[10],p);
}



function pricetable_bgs_1(from_price)  // guilin
{
var pp_extras = 0;
var base_extras = 0;
var stars = 3;
var star3 = new Array(11);
var star4 = new Array(11);
var star5 = new Array(11);
var p = "1.1";
for(guests  = 1; guests <= 10; guests++) 
	{ 
//		document.write('<br><br><font color="white">guests: '+guests+' stars'+stars+'<br> beijing_tour_1(guests, pp_extras, base_extras) '+beijing_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>beijing_hotel(guests, stars, 3) '+beijing_hotel(guests, stars, 3));
//		document.write(' <br>plane_ticket("beijing", "xian", guests) '+plane_ticket("beijing", "xian", guests));
//		document.write(' <br>xian_hotel(guests, stars, 3) '+xian_hotel(guests, stars, 3));
//		document.write(' <br>xian_tour_1(guests, pp_extras, base_extras) '+xian_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>plane_ticket("xian", "shanghai", guests) '+plane_ticket("xian", "shanghai", guests));
//		document.write(' <br>shanghai_tour_1(guests, pp_extras, base_extras) '+shanghai_tour_1(guests, pp_extras, base_extras));
//		document.write(' <br>shanghai_hotel(guests, stars, 2) '+shanghai_hotel(guests, stars, 2));
   		star3[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "guilin", guests) +
				guilin_tour_1 (guests, pp_extras, base_extras) +
				guilin_hotel(guests, stars, 2) +
				yangshuo_hotel(guests, stars, 2) +
				plane_ticket("guilin", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
//		document.write(' <br>total '+star3[guests]);
				
	}
var stars = 4;
for(guests  = 1; guests <= 10; guests++) 
	{ 
   		star4[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "guilin", guests) +
				guilin_tour_1 (guests, pp_extras, base_extras) +
				guilin_hotel(guests, stars, 2) +
				yangshuo_hotel(guests, stars, 2) +
				plane_ticket("guilin", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
	}
var stars = 5;
for(guests  = 1; guests <= 10; guests++) 
	{ 
   		star5[guests] = 	beijing_tour_1(guests, pp_extras, base_extras) + 
				beijing_hotel(guests, stars, 3) + 
				plane_ticket("beijing", "guilin", guests) +
				guilin_tour_1 (guests, pp_extras, base_extras) +
				guilin_hotel(guests, stars, 2) +
				yangshuo_hotel(guests, stars, 2) +
				plane_ticket("guilin", "shanghai", guests) +
				shanghai_tour_1(guests, pp_extras, base_extras) +
				shanghai_hotel(guests, stars, 3)
				; 
	}
for(guests  = 1; guests <= 9; guests++) 
	{
	if (star3[guests]/guests < star3[guests+1]/(guests+1))
		star3[guests+1] = (star3[guests]/guests-100)*(guests+1);
	if (star4[guests]/guests < star4[guests+1]/(guests+1))
		star4[guests+1] = (star4[guests]/guests-100)*(guests+1);
	if (star5[guests]/guests < star5[guests+1]/(guests+1))
		star5[guests+1] = (star5[guests]/guests-100)*(guests+1);
	}
var ex = exchange_rate(); // dollar exchange rate
if (from_price == "1")
	document.write('From US$'+parseInt(Math.ceil(star3[2]*p/ex)/2)+' / RMB'+parseInt(Math.ceil(star3[2]*p)/2)+' <font size=-1>per person for 2 guests</font> <br><font size=-2>Including private tour, domestic transportation and 3 star hotels.</font>');
else
	price_table(star3[1],star3[2],star3[3],star3[4],star3[5],star3[6],star3[7],star3[8],star3[9],star3[10],star4[1],star4[2],star4[3],star4[4],star4[5],star4[6],star4[7],star4[8],star4[9],star4[10],star5[1],star5[2],star5[3],star5[4],star5[5],star5[6],star5[7],star5[8],star5[9],star5[10],p);
}

function standard_includes()
{
document.write('<a name="here"></a><p>');
document.write('<table class="includes"><tr><td bgcolor="#280008"><font size=+1 color="#ffbf36">Your Private Tour Includes</font></td><td bgcolor="#280008"><font size=+1 color="#ffbf36">Not Included</font>');
document.write('</td></tr><tr><td align=left valign=top width=50%><font color="#ffbf36">&bull; </font>');

document.write('<A HREF="#here" onclick="noshopping();">No shopping</A> factory stops.<br><font color="#ffbf36">&bull; </font>');
document.write('Economy class air tickets as specified.<br><font color="#ffbf36">&bull; </font>');
document.write('Train tickets as specified. <font size=-1>(not all tours use trains)</font><br><font color="#ffbf36">&bull; </font>');
document.write('Hotel of selected class with breakfast.<br><font color="#ffbf36">&bull; </font>');
document.write('Private English speaking guide.<br><font color="#ffbf36">&bull; </font>');
document.write('Private vehicle and driver.<br><font color="#ffbf36">&bull; </font>');
document.write('Meals as specified including unlimited standard drinks.<br>	<font color="#ffbf36">&bull; </font>');
document.write('Free bottled water provided in vehicle.<br><font color="#ffbf36">&bull; </font>');
document.write('Entrance tickets to sights specified.');

document.write('</td><td align=left valign=top><font color="#ffbf36">&bull; </font>');
document.write('Tips for your guide and driver for good service.  <font size=-1><br> &nbsp; &nbsp; (2:1 ratio recommended)</font><br><font color="#ffbf36">&bull; </font>');
document.write('International travel and medical insurance.<br><font color="#ffbf36">&bull; </font>	');
document.write('Personal expenses, laundry, extra hotel services.<br><font color="#ffbf36">&bull; </font>	');
document.write('Changes to your itinerary which incur a cost. <br><font size=-1> &nbsp; &nbsp; (we are flexible but expenses involved not included)</font><br>	');
document.write('</td></tr></table>');
}



function city_photos (city)
{
if (city == "beijing")
		{
		document.write('	<p>Beijing:<br><object '); 
		document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="400" height="420"'); 
		document.write('id="beijing" align="middle">');
		document.write('	<param name="allowScriptAccess" value="sameDomain" />');
		document.write('	<param name="allowFullScreen" value="false" />');
		document.write('	<param name="movie" value="beijing.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#4c0708" />	<embed src="beijing.swf" quality="high" wmode="transparent" bgcolor="#4c0708" width="400" height="420" name="beijing" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('	</object><p><hr color="#a60002" width=100%>');
		}
if (city == "shanghai")
		{
		document.write('	<p>Shanghai:<br><object '); 
		document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="400" height="420"'); 
		document.write('id="beijing" align="middle">');
		document.write('	<param name="allowScriptAccess" value="sameDomain" />');
		document.write('	<param name="allowFullScreen" value="false" />');
		document.write('	<param name="movie" value="shanghai.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#4c0708" />	<embed src="shanghai.swf" quality="high" wmode="transparent" bgcolor="#4c0708" width="400" height="420" name="shanghai" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('	</object><p><hr color="#a60002" width=100%>');
		}
if (city == "xian")
		{
		document.write('	<p>Xi\'an:<br><object '); 
		document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="400" height="420"'); 
		document.write('id="beijing" align="middle">');
		document.write('	<param name="allowScriptAccess" value="sameDomain" />');
		document.write('	<param name="allowFullScreen" value="false" />');
		document.write('	<param name="movie" value="xian.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#4c0708" />	<embed src="xian.swf" quality="high" wmode="transparent" bgcolor="#4c0708" width="400" height="420" name="xian" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('	</object><p><hr color="#a60002" width=100%>');
		}
if (city == "guilin")
		{
		document.write('	<p>Guilin:<br><object '); 
		document.write('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="400" height="420"'); 
		document.write('id="beijing" align="middle">');
		document.write('	<param name="allowScriptAccess" value="sameDomain" />');
		document.write('	<param name="allowFullScreen" value="false" />');
		document.write('	<param name="movie" value="guilin.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#4c0708" />	<embed src="guilin.swf" quality="high" wmode="transparent" bgcolor="#4c0708" width="400" height="420" name="guilin" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		document.write('	</object><p><hr color="#a60002" width=100%>');
		}
}




function photos(cities)
{
document.write('<p>');
document.write('<table class="photos"><tr><td colspan=3 bgcolor="#280008">');
document.write('	<font size=+1 color="#ffbf36">Photograph Gallery</font>');
document.write('	</td></tr><tr><td><font size=+1 color="#ffbf36">');
if (cities.indexOf("beijing") >= 0)
	city_photos ("beijing");
if (cities.indexOf("xian") >= 0)
	city_photos ("xian");
if (cities.indexOf("guilin") >= 0)
	city_photos ("guilin");
if (cities.indexOf("shanghai") >= 0)
	city_photos ("shanghai");
document.write('</td></tr></table>');
}


function beijing_start(next_city, depart_by)
{
document.write('Day <font size=+2 color="#ffbf36"><br>1</font></td><td background="gradient-horiz.gif">');
document.write('Beijing arrival</td><td align=left><font color="#239400">&bull;</font>');
document.write('		Beijing airport pickup, check into your Beijing hotel</td><td>');
document.write('			- </td><td align=left width=300>');
beijing_hotels();
document.write('					</td></tr><tr><td bgcolor="#280008">');
document.write('');
document.write('Day <font size=+2 color="#ffbf36"><br>2</font></td><td background="gradient-horiz.gif">');
document.write('	Beijing</td><td align=left><font color="#940000">&bull;</font>');
document.write('		Tiananmen Square, the Forbidden City & its Treasure Halls<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Lunch - Chinese dumplings or standard style</font><br><font color="#940000">&bull;</font> ');
document.write('		Hutong Tour including cycle rickshaw ride, visit to traditional courtyard family home for tea and go up the Drum Tower.<br><font color="#940000">&bull;</font>');
document.write('		The Temple of Heaven');
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
beijing_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>3</font></td><td background="gradient-horiz.gif">');
document.write('	Beijing</td><td align=left><font color="#940000">&bull;</font>');
document.write('		Mutianyu Great Wall including cable car and/or toboggan sled down<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Lunch outdoors near the wall in a quality local fish farm restaurant including the opportunity to catch and eat trout.  Standard lunch dishes also available.</font><br><font color="#940000">&bull;</font> ');
document.write('		 Walk the Olympic Green / Venues (outside view)<br><font color="#940000">&bull;</font> ');
document.write('		 Tea Ceremony<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Peking Duck Dinner</font><br><font color="#940000">&bull;</font> ');
document.write('		Chaoyang Acrobat Show (RMB 180 seats)</td><td>');
document.write('			B-L-D</td><td align=left width=250>');
beijing_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>4</font></td><td background="gradient-horiz.gif">');
document.write('	Beijing &rarr; '+next_city+'</td><td align=left><font color="#940000">&bull;</font>');
document.write('		The Summer Palace<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Picnic lunch of sandwiches, fruit and drinks in the Summer Palace</font><br>');
if (depart_by == "air")
	{
		document.write('		<font color="#239400">&bull;</font>');
		document.write('		Flight from Beijing to '+next_city+'<br><font color="#239400">&bull;</font>');
		document.write('		Met at the airport by your '+next_city+' guide and driver, transfer to your hotel.');
	}
else if (depart_by == "train")
	{
		document.write('		<font color="#940000">&bull;</font>');
		document.write('		Local shopping at the Tianyi wholesale market.<br><font color="#940000">&bull;</font>');
		document.write('		Walk Qianmen Street<br><font color="#ffbf36" face="cursive">&bull;');
		document.write('		Optional dinner in Qianmen before boarding evening train (not included).</font><br><font color="#239400">&bull;</font>');
		document.write('		Transfer to the train station for the soft sleeper express to '+next_city);
	}
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
}



function beijing_end (start, last_city, arrive_by, next_city, depart_by, day)
{
if (start == "1")
	{
		document.write('Day <font size=+2 color="#ffbf36"><br>1</font></td><td background="gradient-horiz.gif">');
		document.write('Beijing arrival</td><td align=left><font color="#239400">&bull;</font>');
		document.write('		Beijing airport pickup, check into your Beijing hotel</td><td>');
	}
else if (arrive_by == "air")
	{
		if (last_city == "xian") xian_hotels();
		if (last_city == "shanghai") shanghai_hotels();
		document.write('				</td></tr><tr><td bgcolor="#280008">');
		document.write('Day <font size=+2 color="#ffbf36"><br>'+day+'</font></td><td background="gradient-horiz.gif">');
		document.write('	Xi\'an</td><td align=left><font color="#940000">&bull;</font>');
	}
else if (arrive_by == "train")
	{
		document.write('	Night train to Beijing, soft sleeper berths in 4 berth compartments.');
		document.write('				</td></tr><tr><td bgcolor="#280008">');
		document.write('Day <font size=+2 color="#ffbf36"><br>'+day+'</font></td><td background="gradient-horiz.gif">');
		document.write('	Xi\'an</td><td align=left><font color="#239400">&bull;</font>');
		document.write('		Met at the train station by your Beijing guide and driver<br><font color="#940000">&bull;</font>');
	}
document.write('			- </td><td align=left width=300>');
beijing_hotels();
document.write('					</td></tr><tr><td bgcolor="#280008">');
document.write('');
document.write('Day <font size=+2 color="#ffbf36"><br>2</font></td><td background="gradient-horiz.gif">');
document.write('	Beijing</td><td align=left><font color="#940000">&bull;</font>');
document.write('		Tiananmen Square, the Forbidden City & its Treasure Halls<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Lunch - Chinese dumplings or standard style</font><br><font color="#940000">&bull;</font> ');
document.write('		Hutong Tour including cycle rickshaw ride, visit to traditional courtyard family home for tea and go up the Drum Tower.<br><font color="#940000">&bull;</font>');
document.write('		The Temple of Heaven');
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
beijing_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>3</font></td><td background="gradient-horiz.gif">');
document.write('	Beijing</td><td align=left><font color="#940000">&bull;</font>');
document.write('		Mutianyu Great Wall including cable car and/or toboggan sled down<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Lunch outdoors near the wall in a quality local fish farm restaurant including the opportunity to catch and eat trout.  Standard lunch dishes also available.</font><br><font color="#940000">&bull;</font> ');
document.write('		 Walk the Olympic Green / Venues (outside view)<br><font color="#940000">&bull;</font> ');
document.write('		 Tea Ceremony<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Peking Duck Dinner</font><br><font color="#940000">&bull;</font> ');
document.write('		Chaoyang Acrobat Show (RMB 180 seats)</td><td>');
document.write('			B-L-D</td><td align=left width=250>');
beijing_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>4</font></td><td background="gradient-horiz.gif">');
document.write('	Beijing &rarr; '+next_city+'</td><td align=left><font color="#940000">&bull;</font>');
document.write('		The Summer Palace<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Picnic lunch of sandwiches, fruit and drinks in the Summer Palace</font><br><font color="#239400">&bull;</font>');
if (depart_by == "air")
	{
		document.write('		Flight from Beijing to '+next_city+'<br><font color="#239400">&bull;</font>');
		document.write('		Met at the airport by your '+next_city+' guide and driver, transfer to your hotel.');
	}
else if (depart_by == "train")
	{
		document.write('		Local shopping at the Tianyi wholesale market.');
		document.write('		Dinner before boarding evening train (not included).');
		document.write('		Transfer to the train station for the soft sleeper express to '+next_city);
	}
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
}


function xian_code (last_city, arrive_by, next_city, depart_by, day)
{
if (arrive_by == "air")
	{
		xian_hotels();
		document.write('				</td></tr><tr><td bgcolor="#280008">');
		document.write('Day <font size=+2 color="#ffbf36"><br>'+day+'</font></td><td background="gradient-horiz.gif">');
		document.write(' Xi\'an</td><td align=left><font color="#940000">&bull;</font>');
	}
else if (arrive_by == "train")
	{
		document.write('	Night train to Xi\'an, soft sleeper berths in 4 berth compartments.');
		document.write('				</td></tr><tr><td bgcolor="#280008">');
		document.write('Day <font size=+2 color="#ffbf36"><br>'+day+'</font></td><td background="gradient-horiz.gif">');
		document.write('	Xi\'an</td><td align=left><font color="#239400">&bull;</font>');
		document.write('		Met at the train station by your Xi\'an guide and driver<br><font color="#940000">&bull;</font>');
	}
document.write('		The Terracotta Warriors<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Chinese Style Lunch</font><br><font color="#940000">&bull;</font>');
document.write('		Huaqing Hot Springs<br><font color="#940000">&bull;</font> ');
document.write('		Muslim Street - stroll the shops and find your own dinner');
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
xian_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>'+(parseInt(day)+1)+'</font></td><td background="gradient-horiz.gif">');
document.write('	Xi\'an &rarr; '+next_city+'</td><td align=left><font color="#940000">&bull;</font>');
document.write('		Morning bike ride on the Old City Wall<br><font color="#940000">&bull;</font> ');
document.write('		Big Wild Goose Pagoda<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Chinese Style Lunch</font><br><font color="#940000">&bull;</font>');
document.write('		Shaanxi Museum<br><font color="#239400">&bull;</font>');
if (depart_by == "air")
	{
		document.write('		Flight from Xi\'an to '+next_city+'<br><font color="#239400">&bull;</font>');
		document.write('		Met at the airport by your '+next_city+' guide and driver, transfer to your hotel.');
	}
else if (depart_by == "train")
	{
		document.write('		Transfer to the train station for the sleeper train to '+next_city);
	}
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
}




function guilin_code (last_city, arrive_by, next_city, depart_by, day)
{
if (arrive_by == "air")
	{
		guilin_hotels();
		document.write('				</td></tr><tr><td bgcolor="#280008">');
		document.write('Day <font size=+2 color="#ffbf36"><br>'+day+'</font></td><td background="gradient-horiz.gif">');
		document.write('	Guilin</td><td align=left><font color="#940000">&bull;</font>');
	}
else if (arrive_by == "train")
	{
		document.write('	Night train to Guilin, soft sleeper berths in 4 berth compartments.');
		document.write('				</td></tr><tr><td bgcolor="#280008">');
		document.write('Day <font size=+2 color="#ffbf36"><br>'+day+'</font></td><td background="gradient-horiz.gif">');
		document.write('	Guilin</td><td align=left><font color="#239400">&bull;</font>');
		document.write('		Met at the train station by your Guilin guide and driver<br><font color="#940000">&bull;</font>');
	}
document.write('		Elephant Trunk Hill<br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Chinese Style Lunch</font><br><font color="#940000">&bull;</font>');
document.write('		Reed Flute Cave		');
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
guilin_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>'+(parseInt(day)+1)+'</font></td><td background="gradient-horiz.gif">');
document.write('	Guilin &rarr; Yangshuo</td><td align=left><font color="#940000">&bull;</font>');
document.write('		4 hour Li River cruise to Yangshuo with lunch on board<br><font color="#239400">&bull;</font> ');
document.write('		Check into Yangshuo hotel<br><font color="#940000">&bull;</font> ');
document.write('		Free time to explore West Street</font>');
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
yangshuo_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>'+(parseInt(day)+2)+'</font></td><td background="gradient-horiz.gif">');
document.write('	Yangshuo</td><td align=left><font color="#940000">&bull;</font>');
document.write('		Huangyao Old Town tour - 100km from Yangshuo, Huangyao old town has 30 temples, cobblestone streets and well preserved traditional architecture.');
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
yangshuo_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>'+(parseInt(day)+3)+'</font></td><td background="gradient-horiz.gif">');
document.write('	Yangshuo  &rarr; '+next_city+' </td><td align=left><font color="#940000">&bull;</font>');
document.write('		Bamboo rafting in Yulong River<br><font color="#940000">&bull;</font>');
document.write('		Moon Hill<br><font color="#239400">&bull;</font>');
if (depart_by == "air")
	{
		document.write('		Transfer to the airport, fly to '+next_city+'<br><font color="#239400">&bull;</font>');
		document.write('		Met at the airport by your '+next_city+' guide and driver, transfer to your hotel.');
	}
else if (depart_by == "train")
	{
		document.write('		Transfer to the train station for the sleeper train to '+next_city);
	}
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
}


function shanghai_end_air (day)
{
shanghai_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>'+day+'</font></td><td background="gradient-horiz.gif">');
document.write('	Shanghai</td><td align=left><font color="#940000">&bull;</font>');
document.write('		The Bund <br><font color="#940000">&bull;</font>');
document.write('		Shanghai Old Street <br><font color="#940000">&bull;</font> ');
document.write('		Yuyuan Garden <br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Chinese Style Lunch </font><br><font color="#940000">&bull;</font>');
document.write('		People\'s Square <br><font color="#940000">&bull;</font>');
document.write('		Shanghai City Planning Exhibition Center<br><font color="#940000">&bull;</font>');
document.write('		Shanghai Museum <br><font color="#940000">&bull;</font>');
document.write('		Nanjing Road pedestrian district stroll');
document.write('		</td><td>');
document.write('			B-L</td><td align=left width=250>');
shanghai_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>'+(parseInt(day)+1)+'</font></td><td background="gradient-horiz.gif">');
document.write('	Shanghai</td><td align=left><font color="#940000">&bull;</font>');
document.write('		Jade Budda Temple <br><font color="#ffbf36" face="cursive">&bull; ');
document.write('		Chinese Style Lunch </font><br><font color="#940000">&bull;</font>');
document.write('		Lujiazui <br><font color="#940000">&bull;</font>');
document.write('		Oriental Pearl Television Tower <br><font color="#940000">&bull;</font>');
document.write('		HuangPu River Cruise<br></td><td>');
document.write('			B-L</td><td align=left width=250>');
shanghai_hotels();
document.write('				</td></tr><tr><td bgcolor="#280008">');
document.write('Day <font size=+2 color="#ffbf36"><br>'+(parseInt(day)+2)+'</font></td><td background="gradient-horiz.gif">');
document.write('	<br>Shanghai departure<br><br></td><td align=left><font color="#940000">&bull;</font>');
document.write('		Free time<br><font color="#239400">&bull;</font>');
document.write('		Transfer from your hotel to the airport according to your schedule.</td><td>');
document.write('			B</td></tr><tr><td>');
}






