// Standard functions copied from Dreamweaver
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

// ExpressBuilder Functions
function EBAdmin_str_valid(str,charset){
	var result = true;
	for (var i=0;i<str.length;i++)
		if (charset.indexOf(str.substr(i,1))<0){ result = false; break; }
	return result;
}
function EBAdmin_color_button_click(fldnm){
	var arr = showModalDialog("ebadmin_selcolor.asp","","font-family:Verdana;font-size:12;dialogWidth:28em;dialogHeight:32em;");
	var x;
	if (arr != null){ if ((x=MM_findObj(fldnm))!=null){ x.value=arr; } }
}
function EBAdmin_small_button_over(eButton){
	eButton.style.backgroundColor = "#D4D0C8";
	eButton.style.borderColor = "#EEEEEE #999999 #999999 #EEEEEE";
}
function EBAdmin_small_button_out(eButton){
	eButton.style.backgroundColor = "#FFFFFF";
	eButton.style.borderColor = "#FFFFFF";
}
function EBAdmin_small_button_down(eButton){
	eButton.style.backgroundColor = "#BCB6A9";
	eButton.style.borderColor = "#999999 #EEEEEE #EEEEEE #999999";
}
function EBAdmin_small_button_up(eButton){
	eButton.style.backgroundColor = "#FFFFFF";
	eButton.style.borderColor = "#EEEEEE #999999 #999999 #EEEEEE";
	eButton = null;
}
function EBAdmin_set_rowcolor(theRow, thePointerColor){
    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') return false;
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var theCells = theRow.getElementsByTagName('td');
    }else if (typeof(theRow.cells) != 'undefined') {
        var theCells = theRow.cells;
    }else {
        return false;
    }
    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {
        theCells[c].style.backgroundColor = thePointerColor;
    }
    return true;
}

