﻿//-----------------------------------------------------------------------------
function PrMOBoxOpen(box_id) {
	PrMOBoxSet(box_id, 'block');
}
function PrMOBoxClose(box_id) {
	PrMOBoxSet(box_id, 'none');
}
function PrMOBoxSet(box_id, state) {
	var sep = document.getElementById('prmobox_sep_' + box_id);
	if (sep)
		sep.style.display = state;
	var container = document.getElementById('prmobox_container_' + box_id);
	if (container)
		container.style.display = state;
}

//-----------------------------------------------------------------------------
function openYandexMap(address, label) {
	address = address.replace(/<[^>]+>/ig, '');
	label = label.replace(/<[^>]+>/ig, '');
	window.open(web_root  + "/YandexMap.aspx?address=" + escape(address) + "&label=" + escape(label), "", "height=650,width=950,scrollbars=no,status=no,location=no,directories=no,resizable=no");
}

//-----------------------------------------------------------------------------
function GetFrame(frame_name) {
	for (var i = 0; i < window.frames.length; ++i)
		if (window.frames[i].name == frame_name)
			return window.frames[i];
	return null;
}
