/*************************Header*****************************/
//number of functions=12
//1) 	deleteComma			(thiss)
//2) 	deleteChar			(thiss,chars)
//3)	deleteStr			(thiss,str)
//4) 	Trim				(str)
//5) 	createArray			(lst,typ)
//6)	stripCharsInBag		(s, bag)
/************************************************************/
function deleteComma(thiss){
	for(i=0;i<thiss.length;i++){
		//this loop is used to delete all character to replace (comma in this case) in this string
		thiss=thiss.replace(",", "");
	}
	return thiss;
}
function deleteChar(thiss,chars){
	for(i=0;i<thiss.length;i++){
		//this loop is used to delete all character to replace (comma in this case) in this string
		thiss=thiss.replace(chars, "");
 	}
	return thiss;
}
function deleteStr(thiss,str){
	for(i=0;i<thiss.length;i++){
		//this loop is used to delete all character to replace (comma in this case) in this string
		thiss=thiss.replace(str, "");
 	}
	return thiss;
}
function Trim(str){
	var txt=''
	//if(!str.indexOf(" ")==0) txt=str[0];
	j=-1;
 	for(i=0;i<str.length;i++){
		//this loop is used to delete all character to replace (comma in this case) in this string
		///alert(str.charAt(i));
		if(str.charAt(i)!=" ") {
			j++;
			txt+=str.charAt(i);
		}
		
 	}
	//alert("|"+txt+"|");
	return txt;
}
function createArray(lst,typ) {
	var vecV	= new Array();
	j			= -1; 
	var ln		= eval("document.forms[0]."+lst+".length");
	for(i=0;i<ln;i++) {   
		j++;
		vecV[j]	= eval("document.forms[0]."+lst+".options["+i+"]."+typ);
	}
	return(vecV);
}
function stripCharsInBag(s, bag){   
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

