function doSubmit() { alert("ok"); window.location.href='social_strip_code.php'; } function postPage(url, params) { var xmlhttp = getXMLHTTP(); xmlhttp.open("POST", url, false); //Send the proper header information along with the request xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Content-length", params.length); xmlhttp.setRequestHeader("Connection", "close"); /* xmlhttp.onreadystatechange = function() {//Call a function when the state changes. if(xmlhttp.readyState == 4 && xmlhttp.status == 200) { alert(xmlhttp.responseText); } } */ xmlhttp.send(params); if (xmlhttp.status == 200) { return xmlhttp.responseText; } else { return '0'; } } function getXMLHTTP() { var xmlhttp=false; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest!='undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } return xmlhttp; } function explode (delimiter, string, limit) { // http://kevin.vanzonneveld.net // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: kenneth // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: d3x // + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // * example 1: explode(' ', 'Kevin van Zonneveld'); // * returns 1: {0: 'Kevin', 1: 'van', 2: 'Zonneveld'} // * example 2: explode('=', 'a=bc=d', 2); // * returns 2: ['a', 'bc=d'] var emptyArray = { 0: '' }; // third argument is not required if ( arguments.length < 2 || typeof arguments[0] == 'undefined' || typeof arguments[1] == 'undefined' ) { return null; } if ( delimiter === '' || delimiter === false || delimiter === null ) { return false; } if ( typeof delimiter == 'function' || typeof delimiter == 'object' || typeof string == 'function' || typeof string == 'object' ) { return emptyArray; } if ( delimiter === true ) { delimiter = '1'; } if (!limit) { return string.toString().split(delimiter.toString()); } else { // support for limit argument var splitted = string.toString().split(delimiter.toString()); var partA = splitted.splice(0, limit - 1); var partB = splitted.join(delimiter.toString()); partA.push(partB); return partA; } } function fetchPage(url) { var xmlhttp = getXMLHTTP(); xmlhttp.open("GET", url, false); xmlhttp.send(null); if (xmlhttp.status == 200) { return xmlhttp.responseText; } else { return '0'; } } function urlencode(str) { str = (str+'').toString(); return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28'). replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+'); } function strlen (string) { // http://kevin.vanzonneveld.net // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + improved by: Sakimori // + input by: Kirk Strobeck // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Onno Marsman // + revised by: Brett Zamir (http://brett-zamir.me) // % note 1: May look like overkill, but in order to be truly faithful to handling all Unicode // % note 1: characters and to this function in PHP which does not count the number of bytes // % note 1: but counts the number of characters, something like this is really necessary. // * example 1: strlen('Kevin van Zonneveld'); // * returns 1: 19 // * example 2: strlen('A\ud87e\udc04Z'); // * returns 2: 3 var str = string+''; var i = 0, chr = '', lgth = 0; var getWholeChar = function (str, i) { var code = str.charCodeAt(i); var next = '', prev = ''; if (0xD800 <= code && code <= 0xDBFF) { // High surrogate (could change last hex to 0xDB7F to treat high private surrogates as single characters) if (str.length <= (i+1)) { throw 'High surrogate without following low surrogate'; } next = str.charCodeAt(i+1); if (0xDC00 > next || next > 0xDFFF) { throw 'High surrogate without following low surrogate'; } return str.charAt(i)+str.charAt(i+1); } else if (0xDC00 <= code && code <= 0xDFFF) { // Low surrogate if (i === 0) { throw 'Low surrogate without preceding high surrogate'; } prev = str.charCodeAt(i-1); if (0xD800 > prev || prev > 0xDBFF) { //(could change last hex to 0xDB7F to treat high private surrogates as single characters) throw 'Low surrogate without preceding high surrogate'; } return false; // We can pass over low surrogates now as the second component in a pair which we have already processed } return str.charAt(i); }; for (i=0, lgth=0; i < str.length; i++) { if ((chr = getWholeChar(str, i)) === false) { continue; } // Adapt this line at the top of any loop, passing in the whole string and the current iteration and returning a variable to represent the individual character; purpose is to treat the first part of a surrogate pair as the whole character and then ignore the second part lgth++; } return lgth; } function substr (str, start, len) { str += ''; var end = str.length; if (start < 0) { start += end; } end = typeof len === 'undefined' ? end : (len < 0 ? len + end : len + start); // PHP returns false if start does not fall within the string. // PHP returns false if the calculated end comes before the calculated start. // PHP returns an empty string if start and end are the same. // Otherwise, PHP returns the portion of the string from start to end. return start >= str.length || start < 0 || start > end ? !1 : str.slice(start, end); } function doBar2(id) { var arr = new Array; var inputs = document.getElementsByTagName('input'); var str = ""; for (var i=0;i
'; return html; } function uncheckAll() { var inputs = document.getElementsByTagName('input'); for (var i=0;i 0) { var textk = ""; for (var i=0;i"; } $('#dialog').dialog('open'); document.getElementById('dialog').innerHTML = textk; return false; } else { myForm.submit(); return true; } }