function checkRecord(chk,line){
var flagCheck = true;

var elchk = eval(chk)
var elline = eval(line)
if (typeof(elchk.length)=="undefined"){
	if (elchk.checked){
		elline.className = "RecordOnSelect"
		}
	else
		{
		elline.className = "RecordOnNormal"		
		flagCheck = false;
		}
	}
else
	{
	for (var i=0 ;i<elchk.length;i++){
		if (elchk[i].checked){
			elline[i].className = "RecordOnSelect"
			}
		else
			{
			elline[i].className = "RecordOnNormal"
			flagCheck = false;
			}
		//alert(elline[i].className)	
		}
	
	}

if (flagCheck)
	document.all.chkSelAll.checked=true;
else
	document.all.chkSelAll.checked=false;
}


function checkAll(chkAll,chk,line){

var elchk = eval(chk)
var elchkAll = eval(chkAll)
var elline = eval(line)

if (typeof(elchk)!="undefined"){
	if (elchkAll.checked){
		if (typeof(elchk.length)=="undefined"){
			elchk.checked=true
			elline.className = "RecordOnSelect"
			}
		else
			{
			for (var i=0 ;i<elchk.length;i++){
				elchk[i].checked=true
				elline[i].className = "RecordOnSelect"
				}
			}
		}
	else
		{
		if (typeof(elchk.length)=="undefined"){
			elchk.checked=false
			elline.className = "RecordOnNormal"
			}
		else
			{
			for (var i=0 ;i<elchk.length;i++){
				elchk[i].checked=false
				elline[i].className = "RecordOnNormal"
				}
			}
		}
	}
}

function SelAll(chkAll,chk){
		var elchkAll = eval(chkAll)
		var elchk = eval(chk)
		if (typeof(elchk)!="undefined"){
			if (elchkAll.checked){
				if (typeof(elchk.length)=="undefined"){
					elchk.checked=true
					}
				else
					{
					for (var i=0 ;i<elchk.length;i++){
						elchk[i].checked=true
						}
					}
				}
			else
				{
				if (typeof(elchk.length)=="undefined"){
					elchk.checked=false
					}
				else
					{
					for (var i=0 ;i<elchk.length;i++){
						elchk[i].checked=false
						}
					}
				}
		}
	}  
