raw
mp-wp_genesis           1 function GetElementsWithClassName(elementName, className) {
mp-wp_genesis 2 var allElements = document.getElementsByTagName(elementName);
mp-wp_genesis 3 var elemColl = new Array();
mp-wp_genesis 4 for (i = 0; i < allElements.length; i++) {
mp-wp_genesis 5 if (allElements[i].className == className) {
mp-wp_genesis 6 elemColl[elemColl.length] = allElements[i];
mp-wp_genesis 7 }
mp-wp_genesis 8 }
mp-wp_genesis 9 return elemColl;
mp-wp_genesis 10 }
mp-wp_genesis 11
mp-wp_genesis 12 function meChecked() {
mp-wp_genesis 13 var undefined;
mp-wp_genesis 14 var eMe = document.getElementById('me');
mp-wp_genesis 15 if (eMe == undefined) return false;
mp-wp_genesis 16 else return eMe.checked;
mp-wp_genesis 17 }
mp-wp_genesis 18
mp-wp_genesis 19 function upit() {
mp-wp_genesis 20 var isMe = meChecked(); //document.getElementById('me').checked;
mp-wp_genesis 21 var inputColl = GetElementsWithClassName('input', 'valinp');
mp-wp_genesis 22 var results = document.getElementById('link_rel');
mp-wp_genesis 23 var linkText, linkUrl, inputs = '';
mp-wp_genesis 24 for (i = 0; i < inputColl.length; i++) {
mp-wp_genesis 25 inputColl[i].disabled = isMe;
mp-wp_genesis 26 inputColl[i].parentNode.className = isMe ? 'disabled' : '';
mp-wp_genesis 27 if (!isMe && inputColl[i].checked && inputColl[i].value != '') {
mp-wp_genesis 28 inputs += inputColl[i].value + ' ';
mp-wp_genesis 29 }
mp-wp_genesis 30 }
mp-wp_genesis 31 inputs = inputs.substr(0,inputs.length - 1);
mp-wp_genesis 32 if (isMe) inputs='me';
mp-wp_genesis 33 results.value = inputs;
mp-wp_genesis 34 }
mp-wp_genesis 35
mp-wp_genesis 36 function blurry() {
mp-wp_genesis 37 if (!document.getElementById) return;
mp-wp_genesis 38
mp-wp_genesis 39 var aInputs = document.getElementsByTagName('input');
mp-wp_genesis 40
mp-wp_genesis 41 for (var i = 0; i < aInputs.length; i++) {
mp-wp_genesis 42 aInputs[i].onclick = aInputs[i].onkeyup = upit;
mp-wp_genesis 43 }
mp-wp_genesis 44 }
mp-wp_genesis 45
mp-wp_genesis 46 addLoadEvent(blurry);