function anOther(sel,idx){	theSelect = document.forms['dbMail'][sel];	if (theSelect.options[idx].text.indexOf('Other') > -1){		theParent = theSelect.offsetParent;		theSelect.style.display = 'none';		theParent.innerHTML += '<input type="text" name="tmp" value="" class="formEntry hot" onblur="doneOther(this)" />';		document.forms['dbMail']['tmp'].focus();	}}function doneOther(tmp){	sel = tmp.offsetParent.getElementsByTagName('select')[0];	sel.style.display = "block";	if(tmp.value !== "") insertOption(sel,tmp.value);	tmp.offsetParent.removeChild(tmp);}function insertOption(sel,txt){	var theSel = sel;//document.forms['dbMail'][sel];	var optNew = document.createElement('option');	optNew.text = optNew.value = txt;	idx = 0;	for(i=theSel.options.length-1;i>0;i--){		if(theSel.options[i].text.indexOf('Other') > -1) idx = i;	}	if(idx > 0){		theSel.add(optNew,theSel.options[idx]);		theSel.options[idx].selected = true;	}}function oldanOther(pull,sel,idx){	if (idx > 1){		desc = document.dbMail[sel].options[idx].value;		if ((pull == "m") && (idx == 7)){			desc = prompt('Please describe yourself:',desc);		}else if ((pull == "w") && (idx == 4)){			desc = prompt('What is the nature of the request?',desc);		}else if ((pull == "h") && (idx == 4)){			desc = prompt('How did you learn about\nDavid Browne Metal Design?',desc);		}		if (desc == null) desc = document.dbMail[sel].options[idx].value;		document.dbMail[sel].options[idx].value = desc;		document.dbMail[sel].options[idx].text = desc;		if (desc == ""){			document.dbMail[sel].options[idx].text = "Other";			document.dbMail[sel].options[idx].value = "";			document.dbMail[sel].options[0].selected = true;		}	}}function hideAddress(){	var em = "%69%6E%66%6F%40%62%72%6F%77%6E%65%6D%65%74%61%6C%2E%63%6F%6D";	em = unescape(em);	return em;}function testMail(val) {	reEML = /^[_A-Za-z0-9-]+[._A-Za-z0-9-]*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*(\.[A-Za-z]{2,5})$/	OK = reEML.test(val);	if (OK != true) {//		alert("Please make sure your email address is in the format yourname@company.com.");		return false;	} else {		return true;	}}function chkMyForm(f,e,n) {	nm = f[n];	em = f[e];	nmOK = (nm.value!=='')?true:false;	emFilled = (em.value!=='')?true:false;	nm.style.backgroundColor = (nmOK)?"#fff":"#ffe584";	em.style.backgroundColor = (emFilled)?"#fff":"#ffe584";	if(!nmOK || !emFilled){		alert('Please enter the required fields');		return false;	}else{		if(emFilled && testMail(em.value)){			return true;		}else{			em.style.backgroundColor = "#ffe584";			alert("Please make sure your email address is in the format yourname@company.com.");			return false;		}	}}function detour(){	pnUm = ['1st','2nd','3rd','4th'];	phr = 'steel, bronze, copper, iron';	phrAry = phr.split(', ');	whichword = phrAry[randNums[2]].toLowerCase();	uStr = prompt('For security, please enter the '+ pnUm[randNums[2]] +' word from the following:\n' + phr,'');	if(uStr.toLowerCase() == whichword){		document.dbMail.method = "post";		document.dbMail.action = "http://www.brown"+"emetal.com/cgi-bin/Fo"+"rmMail.pl";		document.dbMail.submit();	}else{		if(confirm('Sorry. That wasn\'t the '+ pnUm[randNums[2]] +' word.\nClick OK to try again.')) detour();	}}