// JavaScript Document
function RemoveRow (i) {
	var str=document.allactions.multy.value;
	var ch=document.getElementById("selrow"+i).value;
	var tmp=new Array();
	var pattern=ch+",";
	tmp=str.split(pattern);
	document.allactions.multy.value=tmp[0]+tmp[1];
}
function AddRow (i) {
	var str=document.allactions.multy.value;
	var ch=document.getElementById("selrow"+i).value;
	var patt;
	patt=ch+",";
	if (str!="") {
		document.allactions.multy.value=str+ch+",";
	} else {
		document.allactions.multy.value=patt;
	}
}
function DoMulty() {
	if (document.allactions.action.selectedIndex!=0) {
		var str=document.allactions.multy.value;
		var fpos=str.lastIndexOf(',');
		str=str.substring(0,fpos);
		document.allactions.multy.value=str;
		if (document.allactions.multy.value!="") document.allactions.submit();
	}
}
function SelectAllInPage() {
	var checkboxname;
	var idi;
	var ocontrol=document.getElementsByTagName('input');
	for (i=0;i<ocontrol.length;i++){ 
		if (ocontrol[i].type=="checkbox") {		
			checkboxname=ocontrol[i].name;
			idi=ocontrol[i].value;
			ocontrol[i].checked=true;
			document.getElementById("row"+idi).className="TableSelectRow";
			AddRow(idi);
		}
 	}
}
function selectRow(row,n){
		document.getElementById(row).className="TableSelectRow";
		AddRow(n);
}

function deselectRow(row,n,oldclass){
		document.getElementById(row).className=oldclass;
		RemoveRow(n);
}
