// -----------------------------------------------------------------------
// This file is part of aroundme
// 
// Copyright (C) 2003, 2005 Barnraiser
// http://www.barnraiser.org/
// info@barnraiser.org
// 
// This program is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option) any
// later version.
// 
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with program; see the file COPYING. If not, write to the Free
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
// -----------------------------------------------------------------------

//puts browser window at top (out of frames) - stops bug with registering from inside hotmail frame.

if (self != top){
   if (document.images) top.location.replace(document.location.href);
   else top.location.href = document.location.href;
}




var myWindow;

function launchPopupWindow(page, name, customise, alignrightwidth) {
	if(myWindow && !myWindow.closed) {
			myWindow.close();
	}
	
	var winMargin = 10;
	
	if (alignrightwidth) {
		customise = customise + ',left='+((parseInt(screen.availWidth)-alignrightwidth)-winMargin);
		customise = customise + ',top='+winMargin;
	}

	myWindow = window.open(page,name,customise);
	myWindow.focus();
}




function objShowHide(id, state) {
	if (document.getElementById) {
		document.getElementById(id).style.display = state;
	}
	else {
		if (document.layers) {
			document.id.visibility = state;
		}
		else { // IE 4
			document.all.id.style.display = state;
		}
	}
}