﻿
// hide (minimize) a portlet in a desktop of ViePortal
function _hide(id){
	_hideViePortalElement(id);
	_hideViePortalElement(id + "_M");
	_showViePortalElement(id + "_R");
}

// show (restore) a minimized portlet in a desktop of ViePortal
function _show(id){
	_hideViePortalElement(id + "_R");
	_showViePortalElement(id);
	_showViePortalElement(id + "_M");
}

// temporary close a portlet in a desktop of ViePortal
function _close(id){
	_hideViePortalElement(id);
}

// show an element on ViePortal desktop (inline on webpage)
function _showViePortalElement(id){
	var objElement = document.getElementById(id);
	if(!objElement)
		return;
	var objStyle = objElement.style;
	if(!objStyle)
		return;
	objStyle.display = "";
}

// hide an element on ViePortal desktop (inline on webpage)
function _hideViePortalElement(id){
	var objElement = document.getElementById(id);
	if(!objElement)
		return;
	var objStyle = objElement.style;
	if(!objStyle)
		return;
	objStyle.display = "none";
}






