function Start(page) { OpenWin = this.open(page, "newWindow", "toolbar=no,menubar=no,location=yes,scrollbars=no,resizable=no"); } function js_alert(textstring){ alert(textstring); } function js_removefromblocklist(id,block) { var response = confirm("This user will remove from your block list. Are you sure?"); if (response) { var ref = "viewuser.php?mode=removeblock&id="+id+"&block="+block; location.replace(ref); } } function js_addintoblocklist(id, block) { var response = confirm("This user will add into your block list. Are you sure?"); if (response) { var ref = "viewuser.php?mode=addblock&id="+id+"&block="+block; location.replace(ref); } } function js_removeblocklist(id) { var response = confirm("This user will remove from your block list. Are you sure?"); if (response) { var ref = "readmessage.php?mode=removeblock&id="+id; location.replace(ref); } } function js_addblocklist(id) { var response = confirm("This user will add into your block list. Are you sure?"); if (response) { var ref = "readmessage.php?mode=block&id="+id; location.replace(ref); } } function js_event_del_confirm(id, mode, y, m, d) { var response = confirm("This action will delete the event,\n\nDo you really want to delete ?"); if (response) { var ref = "eventday.php?act=delevent&id="+id+"&mode="+mode+"&y="+y+"&m="+m+"&d="+d; location.replace(ref); } } function js_user_priv_confirm(id, old, newid) { var response = confirm("This action will change the user privilage!\n\nDo you really want to change the privilage of the user from '"+old+"' to '"+newid+"' ?"); if (response) { var ref = "manageuser.php?mode=priv&id="+id+"&txt="+newid; location.replace(ref); } } function js_privatemsg_sav_confirm(id, mode) { var response = confirm("This action will save the message into the SaveBox,\n\nDo you really want to save ?"); if (response) { var ref = "message.php?act=save&id="+id+"&mode="+mode; location.replace(ref); } } function js_privatemsg_del_confirm(id, mode) { var response = confirm("This action will delete the message,\n\nDo you really want to delete ?"); if (response) { var ref = "message.php?act=delete&id="+id+"&mode="+mode; location.replace(ref); } } function js_user_del_confirm(id, msg) { var response = confirm("This action will delete the user,\n\nDo you really want to delete ?"); if (response) { var ref = "manageuser.php?mode=delete&id="+id; location.replace(ref); } } function js_forum_del_confirm(forum_id, msg) { var response = confirm("This action will delete the forum,\nthat currently has "+msg+ "\n\n\nDo you really want to delete ?"); if (response) { var ref = "forum_index.php?mode=delete&id="+forum_id; location.replace(ref); } } function js_category_del_confirm(category_id, msg) { var response = confirm("This action will delete the category.\n\n\nDo you really want to delete ?"); if (response) { var ref = "forum_index.php?mode=categorydelete&id="+category_id; location.replace(ref); } } function js_article_del_confirm(id, t, rootid, roottable, loginid, msg) { var response = confirm("This action will delete an article that you clicked.\n\n\nAre you sure?"); if (response) { var ref = "article.php?mode=delete&aid="+id+"&at="+t+"&id="+rootid+"&t="+roottable+"&login_id" +loginid+"&p=1&n=1"; location.replace(ref); } } function js_chk_sharedsender(source, notification) { alert ('hello'); if (notification.value != 2) { source.checked = false; alert ("Poster's email address can only be used if Notification is 'Every Posting a.s.a.p.'"); } } function js_set_field(target, value) { // this function is used for deletion of the login, // if it is confirm to be deleted then the target will fill with the value (login_id) // in which will be used for the deletion of the login var msg = "Warning: Delete this record will also remove the relationship with other's table"; var response = confirm (msg + "\n\nDo you want to delete it?"); if (response == true) { target.value = value; } } function dateConstraintCheck (day, month, year) { // set this up for month and year fields. M = month.options[month.selectedIndex].value; Y = year.options[year.selectedIndex].value; if ((M > 12) || (M < 1) || (Y < 1583)) { // The Gregorian calendar can't help you here. return false; } if (((M - 1) % 7) % 2 == 0) { // Strange but true D = 31; } else if (M == 2) { if (((Y % 4) == 0) && (((Y % 100) != 0) || ((Y % 400) == 0))) { D = 29; } else { D = 28; } } else { D = 30; } // Now we figure out which days to add or delete from the day list. currentDay = day.options[day.selectedIndex].value; lastDay = day.options[day.length -1].value; // Do this first, rather than rudely delete the option out from under it. if (currentDay > D) { indexVal = D - 1; day.options[indexVal].selected = true; } if (lastDay < D) { // When adding days, i = the value of the day. initial = parseInt(lastDay) + 1; for(var i = initial; i <= D ; i++) { newOpt = new Option(); newOpt.text = i; newOpt.value = i; day.options[day.length] = newOpt; } } else if (lastDay > D) { // when deleting days, i = the index of the option. initial = lastDay - 1; for(var i=initial; i >= D ;i--) { day.options[i] = null; } } } function findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i