var postmsg = null; function ccscript(){} function mygetHTTPObject() { var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } window.onload = function() { if (top.location != self.location) { top.location = self.location; } var submitbtn = document.getElementById('submitSuggestion'); if (submitbtn) submitbtn.onclick = postMessage; postmsg = mygetHTTPObject(); } function postMessage() { var notfound = '', missinfo = '', wronginfo = '', badspell = ''; var slow = '', bug = '', offensive = ''; if (document.getElementById('notfound').checked == true) { var notfound = escape(document.getElementById('notfound').value); } if (document.getElementById('missinfo').checked == true) { var missinfo = escape(document.getElementById('missinfo').value); } if (document.getElementById('wronginfo').checked == true) { var wronginfo = escape(document.getElementById('wronginfo').value); } if (document.getElementById('badspell').checked == true) { var badspell = escape(document.getElementById('badspell').value); } if (document.getElementById('slow').checked == true) { var slow = escape(document.getElementById('slow').value); } if (document.getElementById('bug').checked == true) { var bug = escape(document.getElementById('bug').value); } if (document.getElementById('offensive').checked == true) { var offensive = escape(document.getElementById('offensive').value); } var comments = escape(document.getElementById('comments').value); var notempty = notfound + missinfo + wronginfo + badspell + slow + bug + offensive + comments; if (notempty == '') { alert('Please write a message or choose an option.'); return; } document.getElementById('submitSuggestion').value = 'Sending...'; document.getElementById('submitSuggestion').disabled = true; var url = 'http://en.edu.iportal.com.mx/xmlpost.php?comments=' + comments + '&c1=' + notfound + '&c2=' + missinfo + '&c3=' + wronginfo + '&c4=' + badspell + '&c5=' + slow + '&c6=' + bug + '&c7=' + offensive; postmsg.open('GET', url, true); postmsg.onreadystatechange = myhandlePostMsg; postmsg.send(null); } function myhandlePostMsg() { if (postmsg.readyState == 4) { divhide = document.getElementById('suggestionPost'); divdisp = document.getElementById('suggestionOk'); divhide.style.display = 'none'; divdisp.style.display = 'block'; } } function OpenWin(url, width, height) { window.open(url, '', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width='+width+',height='+height); }