{
/*
ClientMethod closeCurrentNestedWindow(
	pblnIgnoreShow,
	pblnHideNextNestedPage) [ Language = javascript ]
{
*/
	/*
	Versions: 	2012-09-18 Updated (Carver JAC) OMG400011590
				2013-01-31 Updated (Carver JAC) Chrome [CH24-06]
				2014-01-16 Updated JCD OMG400014238 Hide nested pages when navigating
 			 	2014-04-22 Updated JAC OMG400014238 Comment
			 	2014-09-09 JAC 20129.1 [PBI]

	*/
	var currentLevel= parseInt(zenPage.nLevel);

	if (currentLevel>0){
		var pgOld= zenPage.getComponentById('pgArea_'+currentLevel);
		var pgCurrent= zenPage.getComponentById('pgArea_'+(currentLevel-1));

		// close window
		if (currentLevel==1) {
			zenPage.RemoveParameter('isNested');
			//OMG400010435
			var pageURL = zenPage.getComponentById('menutree').value;
			zenPage.markFavorite(pageURL);
		}
		zenPage.nLevel= currentLevel-1;

		var frameid = zenPage.getComponentById('pgArea_'+(currentLevel-1)).index;
		var pg = document.getElementById('iframe_'+frameid).contentWindow.zenPage;

		var divOld =pgOld.getEnclosingDiv();
		divOld.style.width='0px';
		divOld.parentNode.style.display= "none";

		//if we don't want to hide the page, set its resolution
		/*if(!pblnHideNextNestedPage){
			zenPage.setPageResolution(pgCurrent);
		}*/
		zenPage.setPageResolution(pgCurrent);

		// change title

		var navigation = this.getComponentById('breadcrumb');
	    navigation.deleteLevel();

	    // Finally we load the emptyPage in the old frame
		pgOld.setProperty('src','');


		if (!pblnIgnoreShow){
	    	if (zenPage.getCliBrowser()=="MSIE"){
		    	if(pg._firstIndex){pg.getComponent(pg._firstIndex).focus();}
	    	}
			zenPage.launchOnShowHandler(currentLevel);
		}

        if (string.contains("://")) { // }

        }
        if (string.contains(':/')) { // }

        }

	}
	else{
		zenPage.showMessagePopup('ERROR','lblMinNestedWindowMsg');
	}
}
