var sColor="";
var SelectedList="";
var bMultiple=false;
function SetRow(oObj,sType,Multiple){
	top.Wait("on","please wait for selection");
	bMultiple=Multiple;
	if(sType==null){
		sType=document.createEventObject();
		sType.type="onclick";}
	if(oObj.tagName=="TR"){var oParent = oObj;}
	else if(oObj.tagName=="TD"){var oParent=oObj.parentElement;}
	else{var oParent=oObj.parentElement.parentElement;}
	var oTable=oParent.parentElement;
	SelectedList="";
	if(sType.type!="dblclick"){
		if(oParent.className=="checked"){
			oParent.className="";
			for(var x =0; x<oParent.children.length;x++){
				var oChild=oParent.children(x);
				oChild.style.fontWeight = "";
				oChild.style.color = sColor;
				oChild.style.backgroundColor = "";}
		}else{
			oParent.className = "checked";
			for (var x=0;x<oParent.children.length;x++){
				var oChild=oParent.children(x);
				sColor=oChild.style.color;
				oChild.style.fontWeight = "bold";
				oChild.style.color="#00002C";
				oChild.style.backgroundColor="#F7E6B5";}
			if(!Multiple){
				var vii=oTable.rows.length;
				for(var v=0;v<vii;v++){
					var oRow=oTable.children(v);
					if(oRow.className=="checked"&&oRow.id!=oParent.id){
						oRow.className="";
						for(var x=0;x<oRow.children.length;x++){
							var oChild=oRow.children(x);
							oChild.style.fontWeight="";
							oChild.style.color="#00002C"
							oChild.style.backgroundColor="";}}}}}
	}else{
		oParent.className="checked";
		for(var x=0;x<oParent.children.length;x++){
			var oChild=oParent.children(x);
			sColor=oChild.style.color;
			oChild.style.fontWeight = "bold";
			oChild.style.color="#00002C"
			oChild.style.backgroundColor="#F7E6B5";}
	}
	var x=oTable.rows.length;
	for(var y=0;y<x;y++){
		var oRow=oTable.children(y);
		if(oRow.className=="checked"){
			var sId=oRow.id;
			var RecordId=sId.split('_');
			if(SelectedList==""){SelectedList=RecordId[2];}
			else{SelectedList+=";"+RecordId[2];}}}
	top.Wait("off");
}
function SelectRow(oTable){
	var x=oTable.rows.length;
	for(var y=0;y<x;y++){
		if(oTable.children(0).tagName=="TBODY"){var oRow=oTable.children(0).children(y);}
		else{var oRow=oTable.children(y);}
		var sId=oRow.id;
		var RecordId=sId.split('_');
		if(RecordId[2]==SelectedList){
			SetRow(oRow,null,bMultiple);
			break;}}
}