function emailValidation(src) { var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$"; var regex = new RegExp(emailReg); return regex.test(src); } function set_focus(x) { if (document.getElementById(x)) document.getElementById(x).focus(); else { xx=document.getElementsByName(x); eval("xx."+x+".focus();"); } } function doc(x) { if (navigator.appName == "Microsoft Internet Explorer") return document.getElementById(x); else { if (document.layers) return eval("document." + x); else return document.getElementById(x); } } function docName(x) { if (navigator.appName == "Microsoft Internet Explorer") return eval("document.all."+x); else { if (document.layers) return eval("document." + x); else return eval("document.getElementsByName(x)."+x); } } function docNameIndexValue(x) { if (navigator.appName == "Microsoft Internet Explorer") return eval("document.all."+x+"[document.all."+x+".selectedIndex].value"); else { if (document.layers) return eval("document." + x + "[document.x.selectedIndex].value"); else return eval("document.getElementsByName(x)."+x+"[document.getElementsByName(x)."+x+".selectedIndex].value"); } } function inputCheck(x, length, mustBeFill, whatisthat, gender) //פונקציה הבודקת ערך של שדה טקסט מסויים, האם מלא, ונותנת הודעת שגיאה אם משהו חסר או גולש מעבר למותר //PARAMETERS: // X - שם אובייקט הטקסט // length - הגודל המקסימלי המותר - בדאטא בייס // mustBeFill - האם ערך זה חייב להיות מלא? (true,false) // whatisthat - טקסט - המתאר את השדה. צריך להתאים למשפט "יש למלא את"..."השם הפרטי" לדוגמא // gender - ?האם השם שנתת הוא נקבה או זכר, "השם הפרטי" מכיל 10 תווים או מכילה 10 תווים // Sample: ok=inputCheck("title",150,true,"הכותרת",false); { var ok=true; //if there is run-time error in the next line, check your field names (maybe duplicate - or not exists). if (mustBeFill && (docName(x).value.length == 0 || docName(x).value == 'null')) { alert("יש למלא את "+whatisthat); ok=false; docName(x).focus(); } if (gender) str2='מכיל'; else str2='מכילה'; if (x=='email' && mustBeFill & ok) { ok = emailValidation(docName(x).value); if (!ok) { alert('כתובת אי מייל לא חוקית!'); docName(x).focus(); } } if (ok && docName(x).value.length > length) { ok=false; str=whatisthat + " "+str2+" "; str+=eval(docName(x).value.length)-length; str+=" תווים יותר מן המותר"; alert(str); docName(x).focus();} return ok; } function englishInputCheck(x, length, mustBeFill, whatisthat) //פונקציה הבודקת ערך של שדה טקסט מסויים, האם מלא, ונותנת הודעת שגיאה אם משהו חסר או גולש מעבר למותר //PARAMETERS: // X - שם אובייקט הטקסט // length - הגודל המקסימלי המותר - בדאטא בייס // mustBeFill - האם ערך זה חייב להיות מלא? (true,false) // whatisthat - טקסט - המתאר את השדה. צריך להתאים למשפט "יש למלא את"..."השם הפרטי" לדוגמא // Sample: ok=inputCheck("title",150,true,"הכותרת",false); { var ok=true; //if there is run-time error in the next line, check your field names (maybe duplicate - or not exists). if (mustBeFill && (docName(x).value.length == 0 || docName(x).value == 'null')) { alert(whatisthat + " must be filled!"); ok=false; docName(x).focus(); } str2='contains'; if (x=='email' && mustBeFill & ok) { ok = emailValidation(docName(x).value); if (!ok) { alert('Email is not valid!'); docName(x).focus(); } } if (ok && docName(x).value.length > length) { ok=false; str=whatisthat + " "+str2+" "; str+=eval(docName(x).value.length)-length; str+=" characters more than available!"; alert(str); docName(x).focus();} return ok; } function height(x) { if (x.clientHeight == 0) return x.offsetHeight; else return x.clientHeight; } function scrollHeight(x) { return x.scrollHeight; } function width(x) { if (x.clientWidth == 0) return x.offsetWidth; else return x.clientWidth; } function styName(x) { if (navigator.appName == "Microsoft Internet Explorer") return eval("document.all."+x+".style"); else { if (document.layers) return eval("document." + x); else return eval("document.getElementsByName(x)."+x+".style"); } } function sty(x) { if (navigator.appName == "Microsoft Internet Explorer") { var sty = ".style"; } else { if (document.layers) return eval("document." + x ); else var sty = ".style"; } return eval("document.getElementById('"+x+"')" + sty); } function dir() { if (navigator.appName == "Microsoft Internet Explorer") return ""; else return "admin/"; } function redirect(x,usedir) { if (usedir) document.location=dir() + x; else document.location=x; } function dirx(name) { if (navigator.appName == "Microsoft Internet Explorer") return ""; else return name + "/"; } function upper_dir() { if (navigator.appName == "Microsoft Internet Explorer") return "../"; else return ""; } function ifrm_doc(iframe,id) { if (navigator.appName == "Microsoft Internet Explorer") return eval(iframe+".document.all." + id); else var ifrme = get_frame(iframe); return eval("ifrme.contentDocument.getElementById('" + id + "')"); } function ifrm_innerHTML(iframe) { if (navigator.appName == "Microsoft Internet Explorer") { return eval(iframe+".document.body.innerHTML"); } else { var ifrme = get_frame(iframe); return eval("ifrme.contentDocument.body.innerHTML"); } } function ifrm_docName(iframe,id) { if (navigator.appName == "Microsoft Internet Explorer") { return eval(iframe+".document.all." + id); } else { var ifrme = get_frame(iframe); return eval("ifrme.contentDocument.getElementsByName(id)."+id); } } function get_frame(iframe) { return doc(iframe); } function doc_opener(x) { if (navigator.appName == "Microsoft Internet Explorer") return opener.document.getElementById(x); else { if (document.layers) return eval("opener.document." + x); else return opener.document.getElementById(x); } } var theimg=null; function itsloaded() { if (theimg) doc(theimg).src = this.src; } function ToggleItem(id,img) { if (sty(id).display == "") sty(id).display = "none"; else sty(id).display = ""; if (img) { var oimg = new Image(); if (sty(id).display == "") { theimg=id+"img"; oimg.src = 'imgs/minus.gif'; oimg.onload = itsloaded doc(id+"img").src = oimg.src; } else { theimg=id+"img"; oimg.src = 'imgs/plus.gif'; oimg.onload = itsloaded doc(id+"img").src = oimg.src; } } } function generate_hebrew_editor(id,width,height,fontSize) { editor = new HTMLArea(id); // var config = new HTMLArea.Config(); // create a new configuration object // having all the default values var config = editor.config; config.width = width; config.height = height; config.imgURL = "htmlarea/"; if (navigator.appName == "Microsoft Internet Explorer") config.popupURL = "../htmlarea/popups/"; else config.popupURL = "../htmlarea/popups/"; config.statusBar = false; if (fontSize==undefined) fontSize = 'x-small'; config.pageStyle = 'body { text-align:right; direction:rtl; background-color: white; font-family: "arial"; font-size: '+fontSize+'; } ' config.toolbar = [ [ "fontname", "space", "fontsize", "space", "bold", "italic", "underline", "separator", "strikethrough", "subscript", "superscript", "separator", "copy", "cut", "paste", "space", "undo", "redo" ], [ "justifyright", "justifycenter", "justifyleft", "justifyfull", "separator", "insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator", "forecolor", "hilitecolor", "separator", "inserthorizontalrule", "createlink", "insertimage", "inserttable", "separator", "popupeditor"] ]; config.fontname = { "Arial": "arial, helvetica, sans-serif", "Courier New": "courier new, courier, mono", "David": "David", "Guttman Yad": "Guttman Yad", "Georgia": "Georgia, Times New Roman, Times, Serif", "Tahoma": "Tahoma, Arial, Helvetica, sans-serif", "Times New Roman": "times new roman, times, serif", "Verdana": "Verdana, Arial, Helvetica, sans-serif", "impact": "impact", "WingDings": "WingDings" }; // the following replaces the textarea with the given id with a new // HTMLArea object having the specified configuration //HTMLArea.replace('msg', config); editor.config = config; editor.generate(); } function generate_english_editor(id,width,height) { editor = new HTMLArea(id); // var config = new HTMLArea.Config(); // create a new configuration object // having all the default values var config = editor.config; config.width = width; config.height = height; config.imgURL = "htmlarea/"; if (navigator.appName == "Microsoft Internet Explorer") config.popupURL = "../htmlarea/popups/"; else config.popupURL = "htmlarea/popups/"; config.statusBar = false; config.pageStyle = 'body { text-align:left; direction:ltr; background-color: white; font-family: "arial"; font-size: x-small; } ' config.toolbar = [ [ "fontname", "space", "fontsize", "space", "bold", "italic", "underline", "separator", "strikethrough", "subscript", "superscript", "separator", "copy", "cut", "paste", "space", "undo", "redo" ], [ "justifyright", "justifycenter", "justifyleft", "justifyfull", "separator", "insertorderedlist", "insertunorderedlist", "outdent", "indent", "separator", "forecolor", "hilitecolor", "separator", "inserthorizontalrule", "createlink", "insertimage", "inserttable", "separator", "popupeditor"] ]; config.fontname = { "Arial": "arial, helvetica, sans-serif", "Courier New": "courier new, courier, mono", "David": "David", "Guttman Yad": "Guttman Yad", "Georgia": "Georgia, Times New Roman, Times, Serif", "Tahoma": "Tahoma, Arial, Helvetica, sans-serif", "Times New Roman": "times new roman, times, serif", "Verdana": "Verdana, Arial, Helvetica, sans-serif", "impact": "impact", "WingDings": "WingDings" }; // the following replaces the textarea with the given id with a new // HTMLArea object having the specified configuration //HTMLArea.replace('msg', config); editor.config = config; editor.generate(); } function generate_hebrew_editor_ver_203() { var config = new Object(); // create new config object config.imgURL = "htmlarea/images/"; config.width = "100%"; config.height = "200px"; config.bodyStyle = 'text-align:right; direction:rtl; background-color: white; font-family: "arial"; font-size: x-small;'; config.debug = 0; config.toolbar = [ ['fontname'], ['fontsize'], ['bold','italic','underline','separator'], ['strikethrough','subscript','superscript','separator'], ['justifyright','justifycenter','justifyleft','separator'], ['OrderedList','UnOrderedList','Outdent','Indent','separator'], ['forecolor','backcolor','separator'], //['custom1','custom2','custom3','separator'], ['HorizontalRule','Createlink','InsertImage','separator'], ['popupeditor'] ]; config.fontnames = { "Arial": "arial, helvetica, sans-serif", "Courier New": "courier new, courier, mono", "David": "David", "Guttman Yad": "Guttman Yad", "Georgia": "Georgia, Times New Roman, Times, Serif", "Tahoma": "Tahoma, Arial, Helvetica, sans-serif", "Times New Roman": "times new roman, times, serif", "Verdana": "Verdana, Arial, Helvetica, sans-serif", "impact": "impact", "WingDings": "WingDings" }; // Add additional editor config settings here... editor_generate('msg',config); } function set_location(x,dir,itime) { if (!itime) itime=1; var str; if (dir=='') str = "window.location='" + x + "'"; else str = "window.location='" + dirx(dir) + x + "'"; setTimeout(str,itime); } function set_location_now(x,dir) { var str; if (dir=='') str = "window.location='" + x + "'"; else str = "window.location='" + dirx(dir) + x + "'"; eval(str); } function person_details(id,dir) { if (navigator.appName != "Microsoft Internet Explorer") dir=''; newwin=window.open(dir+"person_details.asp?id="+id,"","height=400,width=400,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes"); newwin.moveTo(screen.width/2-200,screen.height/2-200); } function event_details(id,dir) { if (navigator.appName != "Microsoft Internet Explorer") dir=''; newwin=window.open(dir+"event_details.asp?id="+id,"","height=300,width=400,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes"); newwin.moveTo(screen.width/2-200,screen.height/2-200); } function tickerScroll() { var cO,cT; if (document.getElementById("RMMarquee")) { cO=document.getElementById("RMMarquee").childNodes[tickerC].offsetTop; cT=tickerB.scrollTop; if (cT>=cO) { if (tickerC==tickerL) tickerB.scrollTop=0; return; } if ((cT+3)>cO) tickerB.scrollTop=cO; else tickerB.scrollTop=tickerB.scrollTop+3; setTimeout(tickerScroll,100); } } function tickerManage() { tickerC++; if (tickerC>tickerL) {tickerC=0;} tickerScroll(); setTimeout(tickerManage,6000); } function RollMessage() { if (rmarray!=undefined) { if (doc("marEl") != null) { doc("marEl").removeNode(true) } var oMar = document.createElement("") i++; for (j=0;j<3;j++) { if (i==rmarray.length) i=0; oMar.innerText += rmarray[i] + "\n"; } doc('RMMarquee').insertAdjacentElement ('afterBegin' , oMar) } } // var oMar = document.createElement("") // oMar.innerText = 'abc'; // i++; // if (i==rmarray.length) i=0; // doc('RMMarquee').insertAdjacentElement ('afterBegin' , oMar) function add_or_remove_picture(local){ strdo = "str1 = document.main_form.picture_"+local+".value;"; eval(strdo); if (str1=="") {strdo = "document.main_form.button_picture_"+local+".value='הוסף תמונה';";} else {strdo = "document.main_form.button_picture_"+local+".value='מחק';";} eval(strdo); } function add_picture(local){ strdo = "str = document.main_form.button_picture_"+local+".value;"; eval(strdo); strdo = "str1 = document.main_form.picture_"+local+".value;"; eval(strdo); if (str=="הוסף תמונה"){ url="aspupload/upload_form.asp?field=picture_"+local+"&button=button_picture_"+local; window.open(url,'_NewWindow_','toolbar=0,location=0,status=1,menubar=0,scrollbars=0,resizable=0,width=500,height=200'); } else{ if (confirm("?האם אתה בטוח שברצונך למחוק את הקובץ")){ url="aspupload/delate.asp?field=picture_"+ local +"&file="+str1+"&button=button_picture_"+local; window.open(url,'_NewWindow_','toolbar=0,location=0,status=1,menubar=0,scrollbars=0,resizable=0,width=500,height=200'); } } } function open_send_new(id,tbl) { newwin=window.open('send_to_friend.asp?id='+id+ '&tbl='+tbl,null,'resizable=no,width=850,height=680,top=100,left=100,scrollbars=yes'); newwin.moveTo(screen.width/2-200,screen.height/2-90); }