var accepted_domains=new Array("");
var domaincheck=document.location.href; //retrieve the current URL of user browser
var accepted_ok=false; //set acess to false by default

if (domaincheck.indexOf("http")!=-1){ //if this is a http request
  for (r=0;r<accepted_domains.length;r++){
    if (domaincheck.indexOf(accepted_domains[r])!=-1){ //if a match is found
      accepted_ok=true //set access to true, and break out of loop
      break
    }
  }
}
else
accepted_ok=true

if (!accepted_ok){
  alert("You\'re not allowed to directly link to this .js file on our server!")
  history.back(-1)
}

var nav_menu = new buildArray("",
"http://www.tour360.com/learn_more.php",
"http://www.tour360.com/search.php",
"http://www.tour360.com/order.htm",
"http://www.tour360.com/service_area.htm",
"http://www.tour360.com/faqs.htm",
"http://www.tour360.com/policies.htm",
"http://www.tour360.com/index.htm");

function go_page(which, win) {
  n = which.selectedIndex;
  if (n != 0) {
    var url = eval("nav_menu" + "["+n+"]")
    if (win) {
      openWindow(url);
    } else {
      location.href = url;
    }
  }
}

function openWindow(url){
  popupWin = window.open(url, "targetWin", "menubar,toolbar,scrollbars,width=640,height=480");
}

function buildArray() {
  var a = buildArray.arguments;
  for (i=0; i<a.length; i++) {
    this[i] = a[i];
  }
  this.length = a.length;
}

function jumpScroll() {
   	window.scroll(0,20000); // horizontal and vertical scroll targets
}
