var formController = (function(){ var op; function showF(obj) { if (document.getElementsByName('domain_check_form')[0] && document.getElementsByName('pop-up-domain-check')[0]) { copyChecked(document.getElementsByName('domain_check_form')[0], document.getElementsByName('pop-up-domain-check')[0]); } o = document.getElementById(obj); yScroll = (window.scrollY) ? window.scrollY : (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); (yScroll > 0) ? (o.style.top = yScroll + 30 + 'px') : (o.style.top = 50 + 'px'); o.style.display="block"; op = (o.style.opacity)?parseFloat(o.style.opacity):(parseInt(o.style.filter)/100); if(op < 1) { op += 0.1; o.style.opacity = op; o.style.filter='alpha(opacity=' + op*100 + ')'; setTimeout(function() {showF(obj)},20); } document.getElementById('popup-domain-name').value=document.getElementById('testField').value; var cNum=( document.getElementById('contract_num') || document.getElementsByName('subject_contract_num')[0] || 0 ); if (cNum) document.getElementById('pop_up_contract_num').value=cNum.value; } function hideF(obj) { o = document.getElementById(obj); op = (o.style.opacity)?parseFloat(o.style.opacity):(parseInt(o.style.filter)/100); if(op > 0) { op -= 0.1; o.style.opacity = op; o.style.filter='alpha(opacity=' + op*100 + ')'; setTimeout(function() {hideF(obj)},20); } else { o.style.display = 'none'; } return false; } function copyChecked(fromElem, toElem) { var fromChecks = fromElem.getElementsByTagName('input'); var toChecks = toElem.getElementsByTagName('input'); // if (fromElem.getElementsByTagName('select')[0]) {toElem.getElementsByTagName('select')[0].index = fromElem.getElementsByTagName('select')[0].selectedIndex;} for (var i=0; i