/*   ********************************          */
function get_MonyhYear(m,y){
var myMonth=new Array("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
return myMonth[m]+"-"+y;

}

/*   ********************************          */
function SelectSrc(InputName){
  for (var i = 0; i < document.getElementById(InputName).options.length; i++) {
    if (document.getElementById(InputName).options[i].selected){
	  return document.getElementById(InputName).options[i].value;
    }
  }
  
}


function SelectSrcText(InputName){
  for (var i = 0; i < document.getElementById(InputName).options.length; i++) {
    if (document.getElementById(InputName).options[i].selected){
	  return document.getElementById(InputName).options[i].text;
    }
  }
  
}

function SelectSrcId(InputName){
  for (var i = 0; i < document.getElementById(InputName).options.length; i++) {
    if (document.getElementById(InputName).options[i].selected){
	  return document.getElementById(InputName).options[i].id;
    }
  }
  
}

/************************************/
function slc_Chk_Add(chk_InputName,add_InputName){
var chk_count =0;
var my_chkInput = document.getElementById(chk_InputName);
var my_addInput = document.getElementById(add_InputName);
  for (var i = 0; i < my_chkInput.options.length; i++) {
    if (my_chkInput.options[i].selected){
	  	my_addInput.options[my_addInput.options.length] =  new Option(my_chkInput.options[i].text,my_chkInput.options[i].value);
	  
    }
  }
  
}

/******************************************************/

function slc_Chk_Remove(chk_InputName){
var my_chkInput = document.getElementById(chk_InputName);
  for (var i = 0; i < my_chkInput.options.length; i++) {
    if (my_chkInput.options[i].selected){
	  my_chkInput.remove(i);
    }
  }
  
}

/*   ********************************          */

function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}
/*   ********************************          */


/********************Set New Select Index***********************/
function select_change_index(InputName,Value_Chk){
  for (var i = 0; i < document.getElementById(InputName).options.length; i++) {
    if (document.getElementById(InputName).options[i].value==Value_Chk){
		document.getElementById(InputName).selectedIndex =i;
	}
  }

}


