// Rollover navigation for Echinatours.com
// Date: May 30th, 2009
// By: Edward Chan (www.instastudios.com)

function popUp(tour) {
	var url = "http://www.echinatours.com/maps.php?tour="+tour;
	window.open(url, "Window1", "menubar=no,width=450,height=380,toolbar=no");	
}
function buttonOne()
{
	document.getElementById("linkBar").innerHTML = '';
	document.getElementById("butOne").src = "http://www.echinatours.com/images/homeover.gif";
}

function buttonOneOut() {
	document.getElementById("butOne").src = "http://www.echinatours.com/images/home.gif";
	
}

function buttonTwo()
{
	document.getElementById("linkBar").innerHTML = '<div style="margin-left: 230px;"><a href="http://www.echinatours.com/aboutus.php#1">文景假期</a>   |   <a href="http://www.echinatours.com/aboutus.php#2">為何選擇文景假期</a>   |   <a href="http://www.echinatours.com/aboutus.php#3">競爭力的價格</a> |  <a href="http://www.echinatours.com/aboutus.php#4">顧客感謝狀格</a> </div>';
	document.getElementById("butTwo").src = "http://www.echinatours.com/images/aboutusdown.gif";
}

function buttonTwoOut() {
	document.getElementById("butTwo").src = "http://www.echinatours.com/images/aboutus.gif";
	
}



function buttonThree()
{
	document.getElementById("linkBar").innerHTML = '<div style="margin-left: 407px;"><a href="http://www.echinatours.com/china/">大陸</a>  | <a href="http://www.echinatours.com/hongkong/">香港</a> | <a href="http://www.echinatours.com/taiwan/">臺灣</a> </div>';
	document.getElementById("butThree").src = "http://www.echinatours.com/images/chinaover.gif";
}

function buttonThreeOut() {
	document.getElementById("butThree").src = "http://www.echinatours.com/images/china.gif";
	
}

function buttonFour()
{
	document.getElementById("linkBar").innerHTML = '<div style="margin-left: 370px;">美国东部 | 美国西部 | 夏威夷 | 佛罗里达 | 加拿大东部 | 加拿大西部 | 美加东</div>';
	document.getElementById("butFour").src = "http://www.echinatours.com/images/americaover.gif";
}

function buttonFourOut() {
	document.getElementById("butFour").src = "http://www.echinatours.com/images/america.gif";
	
}

function buttonFive()
{
	document.getElementById("linkBar").innerHTML = '';
	document.getElementById("butFive").src = "http://www.echinatours.com/images/privateover.gif";
}

function buttonFiveOut() {
	document.getElementById("butFive").src = "http://www.echinatours.com/images/private.gif";
	
}

function buttonSix()
{
	document.getElementById("linkBar").innerHTML = '';
	document.getElementById("butSix").src = "http://www.echinatours.com/images/hotelbutover.gif";
}

function buttonSixOut() {
	document.getElementById("butSix").src = "http://www.echinatours.com/images/hotelbut.gif";
	
}

function buttonSeven()
{
	document.getElementById("linkBar").innerHTML = '';
	document.getElementById("butSeven").src = "http://www.echinatours.com/images/connactdown.gif";
}

function buttonSevenOut() {
	document.getElementById("butSeven").src = "http://www.echinatours.com/images/connact.gif";
	
}



var xmlhttp;

function showInfo(str, tour, day)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="http://www.intertrips.com/2010/getinfoci10.asp";
url=url+"?place="+str;
url=url+"&tour="+tour;
url=url+"&day="+day;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChangedA;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChangedA()
{
if (xmlhttp.readyState==4)
{
document.getElementById("tourmain").innerHTML=xmlhttp.responseText;
}


}
function stateChangedB()
{
if (xmlhttpS.readyState==4)
{
document.getElementById("priceArea").innerHTML=xmlhttpS.responseText;
}


}


function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

var xmlhttpS;

function showPrice(tour, str)
{
xmlhttpS=GetXmlHttpObject();
if (xmlhttpS==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
  
  if (str == "0") {
	str = document.priceTable.currS.value;  
  }
var url="http://www.echinatours.com/getprice.php";
url=url+"?cur="+str;
url=url+"&tour="+tour;
url=url+"&sid="+Math.random();
xmlhttpS.onreadystatechange=stateChangedB;
xmlhttpS.open("GET",url,true);
xmlhttpS.send(null);
}
