// Date : 23 September, 2008

// Open's stakeholder window and send value to window.location
function OpenWindowRef(obj){
	var curRow = obj.parentNode.parentNode;
	var tbl = curRow.parentNode.parentNode;
	var rIndex = curRow.sectionRowIndex;

   var winPop = window.open("include/m_add_referee.php?cr="+rIndex,"winPop", "scrollbars = 1, resizable = 1, width = 940, height = 720,  left=20, top=0");
	winPop.focus();
}

// Open's Print Window
function OpenWindowMp(id){
   var winPop = window.open("include/member_print.php?mid="+id,"winPop", "scrollbars = 1, menubar = 1, resizable = 1, width = 940, height = 720,  left=20, top=0");
	winPop.focus();
}

// Insert's selected Member's record Referee 
function passChildToParentRef(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("tblReferee");
	parentTable.rows[currentRow].cells[0].firstChild.value = id;
	parentTable.rows[currentRow].cells[1].firstChild.value = name;
	self.close();
}
