if (self.parent.frames.length != 0)
	self.parent.location.replace(document.location.href);

function em(box, server, zone)
{
	var at = String.fromCharCode(64);
	return '<a href="'+'mai'+'lto'+':'+box+at+server+'.'+zone+'">'+box+at+server+'.'+zone+'<'+'/a>';
}

function popup_map(window_url)
{
	var width = 620, height = 620;
	var left = Math.round((screen.width-width)/2),
		top = Math.round((screen.height-height)/2)-30
	var window_param =	'ontop=yes,status=yes,menubar=no,toolbar=no,directories=no,resizable=yes,scrollbars=yes,location=no,'+
						'width='+width+',height='+height+','+
						'left='+left+',top='+top;
	var window_name = 'win_'+Math.floor(Math.random()*1000);
	var win = window.open(window_url, window_name, window_param);
	win.focus();
	return false;
}

function show_photo(image_url, title)
{
	var html = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">' +
						 '<html><head><title>'+title+'</title>' +
						 '<style type="text/css"><!--' +
						 'table.photo_center{padding:0; margin:0.5em; font-size:85%}' +
						 '-->' +
						 '</style></head>'+
	           '<body style="margin:0; padding:0; background:url(\'/i/loading.gif\') #ffffff center center no-repeat">' +
						 '<table class="photo_center" align="center"><tr><td>' +
             '<img src="' + image_url + '" alt="'+image_url+'" '+
             ' name="photo" onload="window.moveTo(Math.round((screen.availWidth-document.photo.width)/2), Math.round((screen.availHeight-document.photo.height)/2));window.resizeTo(document.photo.width+60, document.photo.height+60)">' +
             '</td></tr></table></body></html>';
		
	var width = 480, height = 620;
	var top = Math.round((screen.availHeight-height)/2),
		left = Math.round((screen.availWidth-width)/2);
	var popup_window = window.open('', 'win_photo', 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=1');
	popup_window.document.open();
	popup_window.document.write(html);
	popup_window.document.close();
	popup_window.focus();
	return false;
}

function order_window(window_url)
{
	var	width = 600,	
		height = 550;
	var	left = Math.round((screen.width-width)/2),
		top = Math.round((screen.height-height)/2)-30;
	var window_param =	'ontop=yes,status=yes,menubar=no,toolbar=no,'+
						'directories=no,resizable=yes,scrollbars=yes,location=no,'+
						'width='+width+',height='+height+','+
						'left='+left+',top='+top;
	var window_name = 'order_flowers';
	var win = window.open(window_url, window_name, window_param);
	return false;
}
