function showAddress (addrName) {
	var footMenu = document.getElementById('footer-menu');
	var addresses = document.getElementById('adresses');
	var link = document.getElementById(addrName);
	var address = document.getElementById('address-' + addrName);

	if (address && addresses && link && footMenu) {
		var nodes = footMenu.getElementsByTagName('li');
		for (var i=0; i<nodes.length; i++) {
			nodes[i].className = 'notactive';
		}
		var nodes = addresses.getElementsByTagName('div');
		for (var i=0; i<nodes.length; i++) {
			nodes[i].style.display = 'none';
		}
		link.className = 'active';
		address.style.display = '';
	}
}

function launcher(myUrl) {
myTarget = 'viewprofile';
myArgs ='width=500,height=500,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=1,toolbar=0,hotkeys=0,screenx=0,screeny=0,left=0,top=0,dependent=yes';
window.open( myUrl, myTarget, myArgs );
}


function popup (url, w, h, x, y) {
	w = w || 0.43;
	if (w && w < 1) {
		w = Math.ceil(window.screen.width * w);
	}
	h = h || 0.63;
	if (h && h < 1) {
		h = Math.ceil(window.screen.height * h);
	}
	
	x = x || Math.ceil(window.screen.width - 100 - w);
	y = y || 400;
	var features = [
		'width=' + w,
		'height=' + h,
		'top=' + y,
		'left=' + x,
		'resizable=1',
		'scrollbars=1',
		'toolbar=0',
		'location=0',
		'status=1'
	];
	
	features = features.join(',');
	var win = window.open(url, null, features);
}
