function flip(rid)
{
	current=(document.getElementById(rid).style.display == 'none') ? 'block' : 'none';
	document.getElementById(rid).style.display = current;
}


function l_show(elementids) {
	elementids = elementids.split(",");
	for (var i=0; i < elementids.length; i++) {
		document.getElementById(elementids[i]).style.display = 'block';
	}
}

function l_hide(elementids) {
	elementids = elementids.split(",");
	for (var i=0; i < elementids.length; i++) {
		document.getElementById(elementids[i]).style.display = 'none';
	}
}



function l_popup(url, name, opts) {
	if (!opts)
	{
		var opts = 'width=516,height=400,resizable=yes,scrollbars=yes';
	}
	window.open(url, name, opts);
// 	win = window.open(url, name, 'width=<?= L_EDIT_POPUP_WIDTH ?>,height=<?= L_EDIT_POPUP_HEIGHT ?>');
// 	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}


function l_confirm(txt, url) {
	if (confirm(txt)) {
		window.location=url;
	}
}


function l_confirm_popup(txt, url, name) {
	if (confirm(txt)) {
		window.open(url, name, 'width=540,height=540,resizable=yes,scrollbars=yes');
	}
}


function l_newwindow(page) {
	var unrounded=Math.random()*10000;
	var rnd=Math.round(unrounded); 
	OpenWin = this.open(page, "asdfasdfasdfa"+rnd, "toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes");
}


function l_scrollintoview(obj) {
	objtoview = document.getElementById(obj);
	objtoview.scrollIntoView(true);
}
