function disableGoBack(){
	var redirect = false;
	var url = window.location.href + "?done";
	
	if(arguments.length > 0){
		var strMatch = new RegExp(arguments[0], "gi");
		if( (strMatch.exec(window.location.href) != null) && (!window.location.href.match(/done$/)) ){
			redirect = true;
			url = window.location.href + "&done";
		}
	}
	else{
		if(window.location.href.match(/.aspx$/)){
			redirect = true;
		}
	}
	
	if(redirect){
		if(document.all){
			window.location.href = url;
		}
		else{
			setTimeout("window.location.href = '" + url + "'", 1);
		}
	}
}
function windowopen(url,w,h)
{
  popupW = w;
  popupH = h;
  popupImage = url;
  
  var href = window.location.href;
  var root = "http://";
  
  if(url.match(/https/))
		root = "https://";
	
  //alert("href: " + href);
  
  if(href.match(/localhost/))
		root += "localhost/newFE/";
	else if(href.match(/dev/))
		root += "dev.flightexplorer.org/";
	else
		root += "www.flightexplorer.com/";
		
	var popupPage = root + "popup.aspx";
  window.open(popupPage,"popup","width="+w+",height="+h+",scrollbars=no,resizable=yes",true);
}
function newWindow(url)
{
	window.open(url,"popup","width=500,height=600,scrollbars=yes,resizable=yes",true);
}
function findDiv(id){
	if(document.all)
		return document.all[id];
	else
		return document.getElementById(id);
}
