function enc(user,domain,ext,sometext,fcolor) {
	fontcolor = '<span>';
	if (fcolor == "switch") {
		fontcolor ='<span class="whiteblack">';
	}else if (fcolor != ''){
    	fontcolor = '<span style="color:' + fcolor + '">';
  	}
	var first = 'ma';
	var second = 'il';
	var third = 'to:';
	var text = user;
	text += '&#64;';
	text += domain;
	text += '.';
	text += ext;
        var end = fontcolor + text + '</span></a>';
	document.write('<a class="emaillink" href="');
	document.write(first+second+third);
	document.write(user);
	document.write('&#64;');
	document.write(domain);
	document.write('.');
	document.write(ext);
	document.write('?Subject=');
	document.write(sometext);
	document.write('">');
	document.write(end);
}

function valform(form){
  if (form.catselected.selectedIndex < 0)
  {
    alert("Please select one of the options.");
    form.catselected.focus();
    return (false);
  }

  if (form.catselected.selectedIndex == 0)
  {
    alert("The first option is not a valid selection.  Please choose one of the other options.");
    form.catselected.focus();
    return (false);
  }  
  
	form.action = form.catselected.value;
	form.catselected.value="";
        
	return true;
}


function val2form(form){
  if (form.cntnt01hierarchyid.selectedIndex < 0)
  {
    alert("Please select one of the options.");
    form.cntnt01hierarchyid.focus();
    return (false);
  }

  if (form.cntnt01hierarchyid.selectedIndex == 0)
  {
    alert("The first option is not a valid selection.  Please choose one of the other options.");
    form.cntnt01hierarchyid.focus();
    return (false);
  }
	window.location = "/index.php?mact=Products,cntnt01,default,0&cntnt01parent=6&cntnt01returnid=115&cntnt01hierarchyid=" + form.cntnt01hierarchyid.value;
        return (false);      
}
