function loadSubtree(parentId, div, url)
{
	imgsrc = "img" + parentId;
	openimg = document.getElementById(imgsrc);
	if (openimg.src.indexOf('plus') != -1)
	{
		openimg.src = "/Public/images/admin/minus.png";
		new Ajax.Updater(div, url, {asynchronous:true, evalScripts:true, parameters:'parentId=' + parentId});
	}
	else
	{
		div = document.getElementById(div);
		div.innerHTML = "";
		openimg.src = "/Public/images/admin/plus.png";
	}
	return false;
}

function observa(portalcategory)
{
	if (portalcategory)
	{
		sel = document.getElementById("portalCategoryId");
		/*alert("a- "+val[val.selectedIndex].value);*/
		val = sel[sel.selectedIndex].value
		new Ajax.Updater('divPortals', '/portal/getportalsbyportalcategory.aspx', {asynchronous:true, evalScripts:true, parameters:'id='+val});
	}
	else
	{
		sel = document.getElementById("portalId");
		val = sel[sel.selectedIndex].value
		url = location.href;
		new Ajax.Updater('divMain', '/portal/setportal.aspx', {asynchronous:true, evalScripts:true, parameters:'id='+val+'&currenturl='+url});
	}
}
