// Date : 23 September, 2008

// Open's stakeholder window and send value to window.location
function OpenWindowMec(obj){
	var curRow = obj.parentNode.parentNode;
	var tbl = curRow.parentNode.parentNode;
	var rIndex = curRow.sectionRowIndex;

   var winPop = window.open("include/m_add_ecm.php?cr="+rIndex,"winPop", "scrollbars = 1, resizable = 1, width = 700, height = 600,  left=20, top=0");
	winPop.focus();
}

// Insert's selected Member's record to Working Commiter  
function passChildToParentMec(obj){
	
	var curRow = obj.parentNode.parentNode;
	var tbl = curRow.parentNode.parentNode;
	var rIndex = curRow.sectionRowIndex;
	
	var id = tbl.rows[rIndex].cells[0].innerText;
	var name = tbl.rows[rIndex].cells[2].innerText;

	// Get's the cell of parent window
	var parentTable = opener.document.getElementById("tblEc");
	parentTable.rows[currentRow].cells[1].firstChild.value = id;
	parentTable.rows[currentRow].cells[2].firstChild.value = name;
	self.close();
}
