// JavaScript Document function checkEmail(inputvalue){ var pattern=/^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+\.([a-zA-Z])+([a-zA-Z])+/; if(pattern.test(inputvalue)){ return true; }else{ return false; } } function trim(tmp) { var temp; temp = tmp; //tmp = " this is test "; pat = /^\s+/; temp = temp.replace(pat, ""); pat = /\s+$/; temp = temp.replace(pat, ""); //alert(":" + tmp + ":"); return temp; } function check_delete(frm,redirect_to) { var item_checked = 0; var ids = ""; for( x=0; x 31 && (charCode < 48 || charCode > 57 )) return false; return true; } function onlyNumberDecimal(evt) { var charCode = (evt.which) ? evt.which : event.keyCode if(evt.which) { if(charCode==144 || charCode==190 || charCode==46) return true; }else { if(charCode==46) return true; } if (charCode > 31 && (charCode < 48 || charCode > 57 )) return false; return true; } function getEditor(ids,mode) { switch(mode) { case "advanced": tinyMCE.init({ mode : "exact", elements : ids, theme : "advanced", plugins : "advimage,advlink,media,contextmenu", theme_advanced_buttons1_add_before : "newdocument,separator", theme_advanced_buttons1_add : "fontselect,fontsizeselect", theme_advanced_buttons2_add : "separator,forecolor,backcolor,liststyle", theme_advanced_buttons2_add_before: "cut,copy,paste,separator,", theme_advanced_buttons3_add_before : "", theme_advanced_buttons3_add : "media", theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", extended_valid_elements : "hr[class|width|size|noshade]", file_browser_callback : "ajaxfilemanager", paste_use_dialog : false, theme_advanced_resizing : true, theme_advanced_resize_horizontal : true, apply_source_formatting : true, force_br_newlines : true, force_p_newlines : false, relative_urls : false, content_css :"style.css", /*relative_urls : true*/ convert_urls : false //document_base_url : "" }); break; case "basic": tinyMCE.init({ mode : "exact", elements : ids, theme : "simple" }); break; } } function ajaxfilemanager(field_name, url, type, win) { var ajaxfilemanagerurl = "../../../../jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php"; switch (type) { case "image": break; case "media": break; case "flash": break; case "file": break; default: return false; } tinyMCE.activeEditor.windowManager.open({ url: "../../../../jscripts/tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php", width: 782, height: 440, inline : "yes", close_previous : "no" },{ window : win, input : field_name }); /* return false; var fileBrowserWindow = new Array(); fileBrowserWindow["file"] = ajaxfilemanagerurl; fileBrowserWindow["title"] = "Ajax File Manager"; fileBrowserWindow["width"] = "782"; fileBrowserWindow["height"] = "440"; fileBrowserWindow["close_previous"] = "no"; tinyMCE.openWindow(fileBrowserWindow, { window : win, input : field_name, resizable : "yes", inline : "yes", editor_id : tinyMCE.getWindowArg("editor_id") }); return false;*/ } function allDigits(str) { return inValidCharSet(str,"0123456789."); } function inValidCharSet(str,charset) { var result = true; // Note: doesn't use regular expressions to avoid early Mac browser bugs for (var i=0;i