function submitFunction(i) {
	var theForm=document.getElementById('sortForm');
	var sortBy='P'
	if (i==1) sortBy='D';
	if (i==2) sortBy='R';
	if (i==3) sortBy='P';
	if (i==4) sortBy='DP';
	if (i==5) sortBy='GS';
	if (i==6) sortBy='NCF';
	if (i==7) sortBy='TA';
	if (i==8) sortBy='LN';
	if (i==9) sortBy='ID';
	if (i==10) sortBy='HD';
	theForm.action=displayPageName + '?SB=' + sortBy;
	theForm.submit();
}

function alternate(mousefore,mouseback){ 
	var listID='';
	var cRow='';
	var listObj='';
	var descObj='';
	if(document.getElementsByTagName){  
		var table = document.getElementById('oDivTable');
		var rows = table.getElementsByTagName("tr");   
		for(i = 0; i < rows.length; i++){
			cRow=rows[i].id.substring(rows[i].id.indexOf('X')+1);
			rows[i].onmouseover=function() {
				listID=this.id.substring(1);
				listObj=document.getElementById('L' + listID);
				listObj.style.backgroundColor=mouseback;
				listObj.style.color=mousefore;
				if (includeDesc==true) {
					descObj=document.getElementById('D' + listID);
					descObj.style.backgroundColor=mouseback;
					descObj.style.color=mousefore;
				}
			};
			rows[i].onmouseout=function() {
				listID=this.id.substring(1);
				listObj=document.getElementById('L' + listID);
				listObj.style.backgroundColor='';
				listObj.style.color='';
				if (includeDesc==true) {
					descObj=document.getElementById('D' + listID);
					descObj.style.backgroundColor='';
					descObj.style.color='';
				}
			}
			rows[i].onclick=function() {
				listID=this.id.substring(1,this.id.indexOf('X'));
				if (detailsPageName=='/businesses/bli.asp') {
					window.open('/businesses/bli.asp?LID=' + listID,'_blank');
				}
				else {
					location.href=detailsPageName + '?LID=' + listID;
				}
			}
			if(cRow % 2 == 0){ 
				rows[i].className = "shaded"; 
			}
			else{ 
				rows[i].className = "notshaded"; 
			}       
		} 
	} 
}