var dev_fxs_total=2;
var dev_fxo_total=0

/*
	Copyright Robert Nyman, http://www.robertnyman.com
	Free to use if this text is included
*/
function getElementsByAttribute(oElm, strTagName, strAttributeName, strAttributeValue)
{
	var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	var oAttributeValue = (typeof strAttributeValue != "undefined")? new RegExp("(^|\\s)" + strAttributeValue + "(\\s|$)") : null;
	var oCurrent;
	var oAttribute;
	for(var i=0; i<arrElements.length; i++) {
		oCurrent = arrElements[i];
		oAttribute = oCurrent.getAttribute(strAttributeName);
		if(typeof oAttribute == "string" && oAttribute.length > 0) {
			if(typeof strAttributeValue == "undefined" || (oAttributeValue && oAttributeValue.test(oAttribute))){
				arrReturnElements.push(oCurrent);
			}
		}
	}
	return arrReturnElements;
}
if(typeof Array.prototype.push != "function"){
	Array.prototype.push = ArrayPush;
	function ArrayPush(value){
		this[this.length] = value;
	}
}
// sample:
//getElementsByAttribute(document.body, "*", "id"); 
//getElementsByAttribute(document.getElementById("the-form"), "input", "type", "text");

function fxsfxo_init(fxs, fxo)
{
	var elist, i, n;
	
	dev_fxs_total=fxs;
	dev_fxo_total=fxo;

	elist = getElementsByAttribute(document.body, "*", "line");
	for (i=0; i<elist.length; i++) {
		var n=elist[i].getAttribute("line");
		if (parseInt(n)>=fxs+fxo) elist[i].className = "data_invisible";
	}
	elist = getElementsByAttribute(document.body, "*", "fxs");
	for (i=0; i<elist.length; i++) {
		n=elist[i].getAttribute("fxs");
		if (parseInt(n)>=fxs) elist[i].className = "data_invisible";
	}
	elist = getElementsByAttribute(document.body, "*", "fxo");
	for (i=0; i<elist.length; i++) {
		n=elist[i].getAttribute("fxo");
		if (parseInt(n)>=fxo) elist[i].className = "data_invisible";
	}
}

