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_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_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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function addFav(){
  var link = 'http://www.Yellowtrip.com'
  var title = 'Yellowtrip.com'
  if(document.all)
    window.external.AddFavorite(link,title)
}

function do_OpenNewWindow(){
	window.open("http://www.hotelexchange.com");
}

function emailFriend(){
	window.open("EmailToFriend.asp","wndEmail","width=475,height=200,left=200,top=200")
}

function Do_Write_Header(p_strOtherParam,p_BolShowRsvLink){
	//param p_strOtherParam = all param become 1
	//param[0] = cursor location
	//param[1] = folder path  --> DEFAULT = "../"

	var v_strImgFolder = ""
	var v_strFolder = ""
	var v_arrOtherParam
	var v_strCurLoc
	
	v_arrOtherParam = p_strOtherParam.split("¿")
	v_strCurLoc = v_arrOtherParam[0] 
	
	if (p_BolShowRsvLink) {
		v_strFolder = "../"
		if (v_arrOtherParam.length > 1) v_strFolder = v_arrOtherParam[1]
		//write_Upper(p_BolShowRsvLink,v_strFolder)
	}
	
	if (v_arrOtherParam.length > 1) {
		v_strFolder = v_arrOtherParam[1]
	}
	
	v_strImgFolder = v_strFolder + "images/"
	document.write("	<link href='"+v_strFolder+"images/yellowtrip.css' rel='stylesheet' type='text/css'>");					
	document.write('<table width="785" border="0" align="center" cellpadding="0" cellspacing="0">' +
			  '<tr>' +
				'<td colspan="2"><table width="73%" border="0" align="right" cellpadding="0" cellspacing="0">' +
				'  <tr>' +
				'	<td bgcolor="#FDC82A"><img src="'+v_strFolder+'images/spacer.gif" width="1" height="4"></td>' +
				'  </tr>' +
				'  <tr>' +
				'	<td><div align="left">');
		document.write('<IMG SRC="'+v_strFolder+'images/yellow_03.gif" WIDTH=1 HEIGHT=20 ALT="">');		
		if(v_strCurLoc != "home"){
			document.write('<a href="'+v_strFolder+'index.html" class="atas">Home</a>');
		}else{
			document.write('<span class="untop">Home</span>');			
		}
		document.write('<IMG SRC="'+v_strFolder+'images/yellow_03.gif" WIDTH=1 HEIGHT=20 ALT="">');
		if(v_strCurLoc != "country"){
			document.write('<a href="'+v_strFolder+'country.html" class="atas"> Country Fact </a>');
		}else{
			document.write('<span class="untop">Country Fact</span>');		
		}
		document.write('<IMG SRC="'+v_strFolder+'images/yellow_03.gif" WIDTH=1 HEIGHT=20 ALT="">');
		if(v_strCurLoc != "visa"){
			document.write('<a href="'+v_strFolder+'visa.html" class="atas">Visa Info</a>');
		}else{
			document.write('<span class="untop">Visa Info</span>');
		}
		document.write('<IMG SRC="'+v_strFolder+'images/yellow_03.gif" WIDTH=1 HEIGHT=20 ALT="">');		
		if(v_strCurLoc != "money"){
			document.write('<a href="'+v_strFolder+'money.html" class="atas">Local Currency</a>');
		}else{
			document.write('<span class="untop">Local Currency</span>');
		}
		document.write('<IMG SRC="'+v_strFolder+'images/yellow_03.gif" WIDTH=1 HEIGHT=20 ALT="">');				
		if(v_strCurLoc != "map"){
			document.write('<a href="'+v_strFolder+'map.html" class="atas">Map Guide</a>');
		}else{
			document.write('<span class="untop">Map Guide</span>');
		}
		document.write('<IMG SRC="'+v_strFolder+'images/yellow_03.gif" WIDTH=1 HEIGHT=20 ALT="">');						
		if(v_strCurLoc != "tips"){
			document.write('<a href="'+v_strFolder+'tips.html" class="atas">Travel Tips</a>'); 
		}else{
			document.write('<span class="untop">Travel Tips</span>');
		}
		document.write('<IMG SRC="'+v_strFolder+'images/yellow_03.gif" WIDTH=1 HEIGHT=20 ALT="">');								
		if(v_strCurLoc != "news"){
			document.write('<a href="'+v_strFolder+'http://www.travelandnews.com" class="atas" target="blank">Travel News</a>'); 				
		}else{
			document.write('<span class="untop">Travel News</span>');
		}										
	document.write('</div></td>' +
				'  </tr>' +
				'</table></td>' +
			  '</tr>' +
			  '<tr>' +
				'<td width="295" valign="top"><div align="right"><IMG SRC="'+v_strFolder+'images/yelo.jpg" WIDTH=294 HEIGHT=130 ALT=""></div></td>' +
				'<td width="490" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">' +
				 ' <tr>' +
				'	<td width="3%" height="77"><img src="'+v_strFolder+'images/spacer.gif" width="1" height="44"></td>' +
				'	<td width="44%">&nbsp;</td>' +
				"	<td width=\"15%\" rowspan=\"2\" valign=\"bottom\"><IMG SRC=\""+v_strFolder+"images/a.gif\" ALT=\"\" WIDTH=93 HEIGHT=38 border=\"0\"></td>" +
				"	<td width=\"15%\" rowspan=\"2\" valign=\"bottom\"><a href=\"http://www.yellowtrip.com/index.html\" class=\"linksmall\"><IMG SRC=\""+v_strFolder+"images/b.gif\" WIDTH=71 HEIGHT=38 border=\"0\" usemap=\"#Map2\"></a></td>" +
				"	<td width=\"10%\" rowspan=\"2\" valign=\"bottom\"><div align=\"center\"><a href=\"http://www.yellowtrip.com/air.html\" class=\"linksmall\"><IMG SRC=\""+v_strFolder+"images/c.gif\" ALT=\"\" WIDTH=50 HEIGHT=38 border=\"0\"></a></div></td>" +
				"	<td width=\"13%\" rowspan=\"2\" valign=\"bottom\"><a href=\"http://www.yellowtrip.com/car.html\" class=\"linksmall\"><IMG SRC=\""+v_strFolder+"images/d.gif\" ALT=\"\" WIDTH=63 HEIGHT=38 border=\"0\"></a></td>" +
				'  </tr>' +
				'  <tr>' +
				'	<td bgcolor="#FCC829">&nbsp;</td>' +
				'	<td bgcolor="#FCC829">&nbsp;</td>' +
				'	</tr>' +
				' <tr bgcolor="#FCC829">' +
				'	<td height="26">&nbsp;</td>' +
				'	<td><img src="'+v_strFolder+'images/spacer.gif" width="1" height="28"></td>' +
				"	<td valign=\"top\"></td>" +
				"	<td valign=\"top\"><div align=\"center\"><a href=\"http://www.yellowtrip.com/index.html\" class=\"linksmall\">Hotels </a></div></td>" +
				"	<td valign=\"top\"><div align=\"center\"><a href=\"http://www.yellowtrip.com/air.html\"class=\"linksmall\">Air Ticket</a></div></td>"+
				"	<td valign=\"top\"><div align=\"center\"><a href=\"http://www.yellowtrip.com/car.html\" class=\"linksmall\">Car Rental</a></div></td>" +
				 ' </tr>' +
				 ' <tr bgcolor="#131509">' +
				'	<td colspan="6"><img src=""+v_strFolder+"images/spacer.gif" width="1" height="1"></td>' +
				'	</tr>' +
				'  <tr bgcolor="#FCFF00">' +
				'	<td colspan="6"><img src=""+v_strFolder+"images/spacer.gif" width="1" height="5"></td>' +
				'	</tr>' +
				'</table>    </td>' +
			  '</tr>' +
			'</table>');
}
function Do_Write_Footer(p_strActivePage,p_bolShowLogo,p_bolCurrFolder){
	var v_strHTML = "";
	var v_strFolder;

	if (p_bolCurrFolder) {v_strFolder = "../";}
	else {v_strFolder = "";}		        		        
/*		        		        
		v_strHTML = v_strHTML + "<tr>";
			v_strHTML = v_strHTML + "   <td><img src=\"../images/spacer.gif\" width=\"5\" height=\"10\"></td>";
	v_strHTML = v_strHTML + "</tr>";
*/			
	v_strHTML = v_strHTML + "<tr> ";
	v_strHTML = v_strHTML + "   <td>";
	
	v_strHTML = v_strHTML + "</font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">" 
	v_strHTML = v_strHTML + "<div align=\"center\"><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"
	if (p_strActivePage == "Add to Favorite") {v_strHTML = v_strHTML + "Add to Favorite"} 
	else {v_strHTML = v_strHTML + "<a href='javascript:addFav()' class='bottom'>Add to Favorite</a>"}	
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"
	if (p_strActivePage == "Make Your Homepage") {	v_strHTML = v_strHTML + "Make Your Homepage"} 
	else {v_strHTML = v_strHTML + "<a href='#' onClick=this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.Yellowtrip.com'); class='bottom'>Make Your Homepage</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"			
	if (p_strActivePage == "About Us") {	v_strHTML = v_strHTML + "About Us"} 
	else {v_strHTML = v_strHTML + "<a href='"+ v_strFolder +"aboutus.html' class='bottom'>About Us</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"			
	if (p_strActivePage == "Disclaimers") {	v_strHTML = v_strHTML + "Disclaimers"} 
	else {v_strHTML = v_strHTML + "<a href='"+ v_strFolder +"disclaimers.html' class='bottom'>Disclaimers</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"
	if (p_strActivePage == "Contact Us") { v_strHTML = v_strHTML + "Contact Us"} 
	else {v_strHTML = v_strHTML + "<a href='mailto:Yellowtrip-info@Yellowtrip.com' class='bottom'>Contact Us</a>"}	
	v_strHTML = v_strHTML + "<div align=\"center\"><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"
	
	v_strHTML = v_strHTML + "<div align=\"center\"><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"
	if (p_strActivePage == "Home") {	v_strHTML = v_strHTML + "Home"} 
	else {v_strHTML = v_strHTML + "<a href=\""+ "index.html\">Home</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"			
	if (p_strActivePage == "Country") {	v_strHTML = v_strHTML + "Country"} 
	else {v_strHTML = v_strHTML + "<a href=\""+ "country.html\">Country</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"			
	if (p_strActivePage == "Visa") { v_strHTML = v_strHTML + "Visa"} 
	else {v_strHTML = v_strHTML + "<a href=\""+ "visa.html\">Visa</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"			
	if (p_strActivePage == "Local Currency") { v_strHTML = v_strHTML + "Local Currency"} 
	else {v_strHTML = v_strHTML + "<a href=\""+ "money.html\">Local Currency</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"	
	if (p_strActivePage == "Map Guide") { v_strHTML = v_strHTML + "Map Guide"} 
	else {v_strHTML = v_strHTML + "<a href=\""+ "map.html\">Map Guide</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"					
	if (p_strActivePage == "Travel Tips") { v_strHTML = v_strHTML + "Travel Tips"} 
	else {v_strHTML = v_strHTML + "<a href=\""+ "tips.html\">Travel Tips</a>"}
	v_strHTML = v_strHTML + " | </font><font color=\"#999999\" size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"					
	if (p_strActivePage == "Travel News") { v_strHTML = v_strHTML + "Travel News"} 
	else {v_strHTML = v_strHTML + "<a href=\""+ "news.html\">Travel News</a>"}
	v_strHTML = v_strHTML + "<div align=\"center\"><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">"

	v_strHTML = v_strHTML + "Yellowtrip.com is not responsible for content on external Web sites. <br>"
	v_strHTML = v_strHTML + "2004 Yellowtrip. All rights reserved. <br>"			
			
	v_strHTML = v_strHTML + "<br>";			
	v_strHTML = v_strHTML + "</td>";
	v_strHTML = v_strHTML + "</tr>";
			
		
	
	v_strHTML = v_strHTML + "<br>";			
	v_strHTML = v_strHTML + "</td>";
	v_strHTML = v_strHTML + "</tr>";
/*			
	v_strHTML = v_strHTML + "<tr> ";
	v_strHTML = v_strHTML + "   <td><img src=\"../images/spacer.gif\" width=\"5\" height=\"10\"></td>";
	v_strHTML = v_strHTML + "</tr>";
*/	                            
			document.write(v_strHTML);
}