debugOn=false;
	
if(debugOn){
	alert("main.js");
}

function jmpHistory(thisAmount){
	window.history.go(thisAmount);
}

function moveOpt(obj_select, str_direction){
	num_errorCode = 0;
	num_currentIndex=obj_select.selectedIndex
	switch(str_direction.toLowerCase()){
		case "up":
			num_targetIndex=num_currentIndex-1;
			break;
		case "down":
			num_targetIndex=num_currentIndex+1;
			break;
		default:
			break;
	}
	if(num_targetIndex<0 || num_targetIndex>obj_select.options.length-1){
		num_errorCode = 2;
	}
	if(num_currentIndex==-1){
		num_errorCode = 1;
	}
	if(num_errorCode==0){
		str_oldVal = obj_select.options[num_targetIndex].value;
		str_oldTxt = obj_select.options[num_targetIndex].text;
		obj_select.options[num_targetIndex].value = obj_select.options[num_currentIndex].value;
		obj_select.options[num_targetIndex].text = obj_select.options[num_currentIndex].text;
		obj_select.options[num_currentIndex].value = str_oldVal;
		obj_select.options[num_currentIndex].text = str_oldTxt;
		obj_select.selectedIndex = num_targetIndex;
	}
	return num_errorCode;
}
	
function selectAllOpts(obj_select){
	for(i=0; i<obj_select.options.length; i++){
		obj_select.options[i].selected = true;
	}
}

function appendOption(str_selName,str_optValue)
{
  var elOptNew = document.createElement('option');
  elOptNew.text = str_optValue;
  elOptNew.value = str_optValue;
  var elSel = document.getElementById(str_selName);
  try {
    elSel.add(elOptNew, null); // standards compliant; doesn't work in IE
  }
  catch(ex) {
    elSel.add(elOptNew); // IE only
  }
  elSel.selectedIndex=elSel.options.length-1;
}

function removeSelOption(str_selName)
{
  var elSel = document.getElementById(str_selName);
  var i;
  for (i = elSel.length - 1; i>=0; i--) {
    if (elSel.options[i].selected) {
      elSel.remove(i);
    }
  }
}

//openBrWindow
// example call : openBrWindow('www.tsn.ca','WindowName','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=400,height=400')

function openBrWindow(URLLocation,WindowName,Features) {
  window.open(URLLocation,WindowName,Features);
}

function dspSideSubMenu(num_subMenu,num_curLnkIndx){
	arr_subMenu=ez_Menu[num_subMenu];
	for(i=0; i<arr_subMenu.length; i++){
		str_tmpMenuItm='';
		
		if(arr_subMenu[i].charAt(0)=='!'){
			str_tmpMenuItm='<tr><td colspan=2><b>'+escape(arr_subMenu[i].substring(1,arr_subMenu[i].length))+'</b></td></tr>';
		}
		else{
			arr_itmParts=arr_subMenu[i].split('^');
			str_lnkStrt='';
			str_lnkEnd='';
			//if(i!=num_curLnkIndx-1){
				str_lnkStrt='<tr><td><img src=\'./003_interface/bullet.gif\'></td><td><a href="'+arr_itmParts[1]+'">';
				str_lnkEnd='</a></td></tr>';
			//}
			str_tmpMenuItm=str_lnkStrt+escape(arr_itmParts[0].replace('- ',''))+str_lnkEnd;
		}
		document.write(unescape('<table border=0>' + str_tmpMenuItm +'</table>'))
	}
}