function validateForm(pref) { title = pref.title; if (title.value == "") { alert("Не си попълнил заглавието на твоята история!"); title.focus(); return false; } body = pref.body; if (body.value == "") { alert("Не си попълнил твоята история!"); body.focus(); return false; } return true; } function validateForm1(pref) { body = pref.body; if (body.value == "") { alert("Не си попълнил твоя коментар!"); body.focus(); return false; } return true; } function popUpWindow(url, width, height) { window.open(url, 'pop', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=' + width + ',height=' + height + "'"); } function myKeyDownHandler(){ if (!readCookie("help1")) { document.getElementById('help').style.display = "block"; } } function createCookie(name,value,millisec) { if (millisec) { var date = new Date(); date.setTime(date.getTime()+(millisec)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function yes() { createCookie("help1","true",(1000*24*60*60*1000)); document.getElementById('help').style.display = "none"; } function no() { createCookie("help1","false",(10*60*1000)); document.getElementById('help').style.display = "none"; } function doVote(rating, ID, commentID, catID, url) { window.location.href = url + 'do-vote.php?rating=' + rating + '&ID=' + ID + '&commentID=' + commentID + '&catID=' + catID + '&act=1'; }