function isEmailValid(emailstring) { if (!emailstring.match(/^[a-z0-9+]{1}[a-z_0-9-\.]*@[a-z0-9]{1}[a-z0-9-]*(\.[a-z0-9]{1}[a-z0-9-]*)+$/gi)) { return false; } return true; } function jstrim(s) { return s.replace(/(^\s+)|(\s+$)/g, ""); } inWin = null; function openwindow(strona,width,height) { if (navigator.appName == "Microsoft Internet Explorer") { inWin = window.open(String(strona), 'inWin', "toolbar=no,menubar=no,scrollbars=no,resizable=yes,status=no,location=no,directories=no,fullscreen=no,titlebar=no,width=" + String(width) + ",height=" + String(height)); } else { inWin = window.open(String(strona), 'inWin', "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,innerWidth=" + String(width) + ",innerHeight=" + String(height)); } inWin.focus(); } function open_popup(_url,_width, _height) { if (_width<1) { _width = 300; } if (_height<1) { _height = 300; } window.open(_url,'popupwin','status=no,width='+(_width+20)+',height='+(_height+20)+',screenX=50,screenY=50,left=50,top=50,scrollbars=yes,resizable=yes'); } function wyslijZnajomemu(article, lang) { openwindow('http://www.confero.pl/sendToFriend1.php/'+lang+'/'+article,330,180); } function urlencode(s) { var hexDigit = '0123456789ABCDEF'; var ns = ''; var z = ''; s = String(s); for(i=0;i=97 && z<=122) || (z>=65 && z <= 90) || (z>=48 && z <= 57)) { ns += s.charAt(i); } else { ns += '%'+hexDigit.charAt((z&0xF0)>>>4)+hexDigit.charAt(z&0x0F); } } return ns; } /* Converts polish characters from UNICODE to ISO-8859-2 */ function UNICODEtoISO(code) { var uCode = [261,260,281,280,243,211,347,346,322,321,380,379,378,377,263,262,324,323]; var iCode = [177,161,234,202,243,211,182,166,179,163,191,175,188,172,230,198,241,209]; var i = iCode.length-1; while(i>=0) { if (uCode[i]==code) { return iCode[i]; } i--; } return code; } function openInWindow2(_url,_width, _height) { if (_width<1) { _width = 300; } if (_height<1) { _height = 300; } window.open(_url,'','status=no,width='+(_width+20)+',height='+(_height+20)+',screenX=50,screenY=50,left=50,top=50,resizable=1,scrollbars=auto'); }