<!--
function myUnshift(item) {
	for (var i =this.length; i>0; i--){
		this[i] = this[i-1];
	}
	this[0]=item;
}
function myShift(){
	if(this.length >0) {
		var element = this[0];
		for (var i =1; i<this.length; i++){
		this[i-1] = this[i];
		}
		this.length = this.length -1;
		return element;
	} 
}
function myPush() {
	var numtopush = this.push.arguments.length;
	var arglist = this.push.arguments;
	if (numtopush >0) {
		for (var i=0; i < numtopush; i++) {
			this.length++;
			this[this.length-1] = arguments[i];
		}
	}
}
function myConcat(myArray) {
	for(var i=0; i<myArray.length; i++) {
		this.push(myArray[i])
	}
}
function mySplice(index_of_split){

	var rest = [];
	var j = 0;
	for (i = index_of_split+1; i< this.length; i++) {
		rest[j] = this[i];
		this[i] = "";
		j++;
	}
	this.length = index_of_split + 1;
	return rest;
}

function MakeArray(n){
	this.length = n
	for (var i = 1; i <= n; i++) { this[i] = 0;}
	return this
}
	Array.prototype.unshift = myUnshift;
	Array.prototype.shift = myShift;
	Array.prototype.push = myPush;
	Array.prototype.splice = mySplice;
	Array.prototype.concat = myConcat;

function sort_array (num, nom){
  var ord_num=[];
  var ord_nom=[];
  for(var i=0; i<nom.length; i++){
    if(ord_num.length=="0"){
      ord_num[0]=num[i];
      ord_nom[0]=nom[i];
    }else{
	var inserted = "0";
      for(var j=0; j<ord_num.length; j++){
          if(ord_nom[j]>nom[i]){
	    if(inserted == 0) {
		    if(j == 0){
			ord_num.unshift(num[i]);
			ord_nom.unshift(nom[i]);
	 	   }else{
           	     ord_num=insert_value(j,ord_num,num[i]);
           	     ord_nom=insert_value(j,ord_nom,nom[i]);
	   	 }
	    }
	   inserted = "1";
          }
      }
      if(inserted =="0") {
        ord_num.push(num[i]);
        ord_nom.push(nom[i]);
      }
    }
  }
  return ord_num;
}
function insert_value(index,myArray,element){
  var rest=myArray.splice(index-1);
  myArray.push(element);
  myArray.concat(rest);
  return myArray;
}
//-->