/* 	function: doSearch
	submits search form. */
function submitform() {
  document.search.submit();
}

function launchMap(url) {
	(!url) ? page='/CenterMap.aspx' : page = url;
	width = 768;
	height = 512;
	
	windowTop = screen.availHeight/2-height/2;
	windowLeft = screen.availWidth/2-width/2;
	map = window.open(page,'center_map','height='+height+',width='+width+',top='+windowTop+',left='+windowLeft+',status=0,scrollbars=0,location=0');
	map.focus();
	
}

function launchGuide(url) {
	(!url) ? page='/Restaurants.aspx' : page = url;
    width = 870//screen.availWidth;
    height = 612//screen.availHeight;
    windowTop = (screen.height) ? (screen.height-height)/2 : 0;
    windowLeft = (screen.width) ? (screen.width-width)/2 : 0;;
    
    map = window.open(page,'Restaurants','height='+height+',width='+width+',top='+windowTop+',left='+windowLeft+',status=0,scrollbars=1,location=0');
    map.focus();
    window.location = window.location;
}

function launchLeasing(page) {
	width = 900;
	height = 570;
	
	windowTop = screen.availHeight/2-height/2;
	windowLeft = screen.availWidth/2-width/2;
	map = window.open(page,'center_map','height='+height+',width='+width+',top='+windowTop+',left='+windowLeft+',status=0,scrollbars=0,location=0');
	map.focus();
	window.location = window.location;
}

function jumpBack(url) {
	parentWindow = null;//window.opener;
	if (parentWindow) {
		parentWindow.location = url;
		parentWindow.focus();
	} else {
		parentWindow = window.open(url,'_blank');
	}
}

function launchAllCenters(dir) {
    width = 650;
    height = 600;
    pageToOpen = dir + "/map.aspx";
    windowTop = screen.availHeight / 2 - height / 2;
    windowLeft = screen.availWidth / 2 - width / 2;
    map = window.open(pageToOpen, 'all_centers', 'height=' + height + ',width=' + width + ',top=' + windowTop + ',left=' + windowLeft + ',status=0,scrollbars=1,location=0,resize=1');
    map.focus();
    window.location = window.location;
}


