function confirmDelete(msg, url){ if(confirm(msg)) location.replace(url); else return false; }//function confirmDelete(){ function countChars(container, display, maxsize){ display.value = container.value.length; if(container.value.length > maxsize){ alert("O limite de "+maxsize+" caracteres foi alcançado"); } }//function countChars(container, display){ function updateLinks(){ var obj = document.getElementById("links"); var tmp = ''; if(arr_links.length>0) tmp = arr_links[0]; for(i=1; i< arr_links.length; i++){ tmp += ';'+arr_links[i]; } obj.value = tmp; } function removeLink(rem_link){ rows = document.getElementById("linkstable").rows; for(i=0; iRemover "+ str +""; var table = document.getElementById("linkstable"); var oTR = table.tBodies[0].appendChild(document.createElement("tr")); oTR.id = link; var oTD = oTR.appendChild(document.createElement("td")); oTD.innerHTML = newHtml; updateLinks(); } function getLink(){ var type = document.getElementById("linkType").value; if(type == 1) window.open('/contents/image.php?newsletter=1&orderfield=image_date&order=desc', 'popup_newsletter','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=yes, scrollbars=yes, width=800, height=600'); else if(type == 2) window.open('/contents/animage.php?newsletter=1&orderfield=animage_date&order=desc', 'popup_newsletter','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=yes, scrollbars=yes, width=800, height=600'); else if(type == 3) window.open('/contents/polytone.php?newsletter=1&orderfield=polytone_date&order=desc', 'popup_newsletter','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=yes, scrollbars=yes, width=800, height=600'); else if(type == 10) window.open('/contents/truetone.php?newsletter=1&orderfield=truetone_date&order=desc', 'popup_newsletter','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=yes, scrollbars=yes, width=800, height=600'); else if(type == 9) window.open('/contents/game.php?newsletter=1&orderfield=game_date&order=desc', 'popup_newsletter','toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=yes, scrollbars=yes, width=800, height=600'); } function changeCountry(formName, code, pos){ document.getElementById("country").value = code; document.getElementById("pos").value = pos; theForm = eval('document.getElementById("'+formName+'")'); theForm.submit(); } function disableForm(theform) { if (document.all || document.getElementById) { for (i = 0; i < theform.length; i++) { var tempobj = theform.elements[i]; if (tempobj.type.toLowerCase() == "submit" || tempobj.type.toLowerCase() == "reset") tempobj.disabled = true; } } }