function gotoUrl(x){window.location.href = x;return;};
function getElement(id){if(document.getElementById){var element=document.getElementById(id);return element;}else if(document.all){var element=document.all[id];return element;}};
function HackForIE(){document.body.style.height = document.documentElement.scrollHeight + 'px';};
function HackSlider(){var Pslide=getElement("slide");var Pright=getElement("right");if (Pslide.scrollHeight < Pright.scrollHeight){Pslide.style.height = Pright.scrollHeight+'px';} if (Pslide.scrollHeight > Pright.scrollHeight){Pright.style.height = Pslide.scrollHeight+'px';} return;};
function swapimg(id,url){id.src=url;}
function change(id){var MenuDiv = getElement('MenuDiv'+id);var MenuLink = getElement('MenuLink'+id);MenuDiv.style.background='url(http://gtctravel.net/images/background/menuback2.jpg) no-repeat bottom center';MenuDiv.style.color='red';MenuLink.style.color="red";}
function unchange(id){var MenuDiv = getElement('MenuDiv'+id);var MenuLink = getElement('MenuLink'+id);MenuDiv.style.background='url(http://gtctravel.net/images/background/menuback.jpg) no-repeat bottom center';MenuDiv.style.color='#fff';MenuLink.style.color="#fff";}
function changbkcol(id){id.style.background='#FCD081';};
function undobkcol(id){id.style.background='';};
function change2(id){id.style.background='url(http://gtctravel.net/images/background/menuback4.jpg) no-repeat bottom left';id.style.color='red';};
function unchange2(id){id.style.background='url(http://gtctravel.net/images/background/menuback3.jpg) no-repeat bottom left';id.style.color='#fff'};
function selectflag(id){var theFlag=getElement(id);theFlag.style.border="2px #FF9900 solid";}
function unselectflag(id){var theFlag=getElement(id);theFlag.style.border="2px #999999 solid";}
function keepsitealive(){var ajaxurl= 'http://gtctravel.net/include/keep.php'; http.open("GET", ajaxurl , true); http.onreadystatechange = handleHttpResponse; http.send(null); }
function timedCount(){c=c+1;t=setTimeout("timedCount()",1000);if (c>=60){ keepsitealive();c=1;}}
function handleHttpResponse() {if (http.readyState == 4) { var results = http.responseText; } } 
function getHTTPObject() {var xmlhttp; if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } 


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_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];}}
}


var http = getHTTPObject(); 

