function stopErrors(){ return true; } window.onerror = stopErrors; function popupconsole(fieldname, fieldtype, qstring, fp_formindex) { //if(fieldtype=='imagesthumbnail'){fieldtype='images'}; //make thumbnails use regular image picker document.forms['mainform'].fp_fieldnameforpopup.value=fieldname; document.forms['mainform'].fp_formindex.value=fp_formindex; var thewidth = 722 var theheight = 410 //center the window if ((screen.width - thewidth) <= 0){thewidth = screen.width - 100}; if ((screen.height - theheight) <= 0){theheight = screen.height - 150}; var left = ((screen.width - thewidth)/2); var top = ((screen.height - theheight)/2); if (left < 0){left=0}; if (top < 0){top=0}; var stylemode = "useadminstyles=true"; eval(' if ((typeof(' + fieldtype + 'popup) != \'undefined\') && (!' + fieldtype + 'popup.closed)) { ' + fieldtype + 'popup.focus(); } else { ' + fieldtype + 'popup = window.open(\'?resolutionfile=enginetemplatespath|preview.asp&' + stylemode + '&area_2=admin-ns_popup_' + fieldtype + '.dat' + qstring + '\',\'' + fieldtype + 'popup\',\'toolbar=no,status=no,scrollbars,resizable,width=' + thewidth + ',height=' + theheight + ',top=' + top + ',left=' + left + '\'); } if ((typeof(' + fieldtype + 'popup) != \'undefined\') && (!' + fieldtype + 'popup.closed)) {' + fieldtype + 'popup.focus()};'); } function closepopups(){ if (typeof(colorspopup) != 'undefined'){if(!colorspopup.closed){colorspopup.close();}} if (typeof(pagespopup) != 'undefined'){if(!pagespopup.closed){pagespopup.close();}} if (typeof(areaspopup) != 'undefined'){if(!areaspopup.closed){areaspopup.close();}} if (typeof(imagespopup) != 'undefined'){if(!imagespopup.closed){imagespopup.close();}} if (typeof(imagesthumbnailpopup) != 'undefined'){if(!imagesthumbnailpopup.closed){imagesthumbnailpopup.close();}} if (typeof(templatespopup) != 'undefined'){if(!templatespopup.closed){templatespopup.close();}} if (typeof(stylespopup) != 'undefined'){if(!stylespopup.closed){stylespopup.close();}} if (typeof(datepopup) != 'undefined'){if(!datepopup.closed){datepopup.close();}} if (typeof(urlpopup) != 'undefined'){if(!urlpopup.closed){urlpopup.close();}} if (typeof(themespopup) != 'undefined'){if(!themespopup.closed){themespopup.close();}} if (typeof(ftppopup) != 'undefined'){if(!ftppopup.closed){ftppopup.close();}} if (typeof(flashpopup) != 'undefined'){if(!flashpopup.closed){flashpopup.close();}} return; } function CreateWindow(url,name,thewidth,theheight){ //if the width or height is negative make the window that much smaller than the user's screen resolution if (thewidth <= 0){thewidth = (screen.width - (Math.abs(thewidth)*2))}; if (theheight <= 0){theheight = (screen.height - (Math.abs(theheight)*2))}; if ((screen.width - thewidth) <= 0){thewidth = screen.width - 300}; if ((screen.height - theheight) <= 0){theheight = screen.height - 300}; var left = ((screen.width - thewidth)/2); var top = ((screen.height - theheight)/2); if (left < 0){left=0}; if (top < 0){top=0}; var msgWindow=window.open(url,name,"toolbar=no,directories=no,status=no,scrollbars,resizable,menubar=no,left=" + left + ",top=" + top + ",width=" + thewidth + ",height=" + theheight); if (!msgWindow.closed){ msgWindow.focus(); } return; } function masschecker(formname, checkboxnametoaffect, mode){ var counter = document.forms[formname].elements.length; var cc = document.forms[formname].elements; for (var i=0;i 0){imageobject.style.height = newheight}; if (newwidth > 0){imageobject.style.width = newwidth}; } img.src = imageobject.src; } function highlight(t, highlightClass, treatAsPhrase, caseSensitive, searchTermIsRegex, el) { //from the EXCELLENT http://4umi.com/web/javascript/hilite.htm if (!t) { return; } if(!searchTermIsRegex) { t = t.replace(/([\\|^$()[\]{}.*+?])/g, '\\$1'); } if (/^\s*$/.test(t)) { return; } if(!treatAsPhrase) { t=t.split(/\s+/).join('|'); } var f = caseSensitive ? 'g':'gi'; var r = new RegExp(t, f); var h = document.createElement('span'); if (!highlightClass){ h.style.backgroundColor = '#ffff00'; //h.style.fontWeight = 'bold'; }else{ h.className = highlightClass; h.style.display = 'inline'; } //var s = [el||document.documentElement||document.body], i = 0, e, j, l, o, k; var s = [document.getElementById(el)||el||document.documentElement||document.body], i = 0, e, j, l, o, k; //alert(s); do { e = s[i]; if (e.nodeType == 3) { r.lastIndex = 0; l = r.exec(e.nodeValue); if (l != null) { k = l[0].length; if (r.lastIndex > k) { e.splitText(r.lastIndex-k); e = e.nextSibling; } if (e.nodeValue.length > k) { e.splitText(k); s[i++] = e.nextSibling; } o = h.cloneNode(true); o.appendChild(document.createTextNode(l[0])); e.parentNode.replaceChild(o, e); } } else { j = e.childNodes.length; while (j) s[i++] = e.childNodes.item(--j); } } while(i--); }