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--); } /* JJJ 20071109 */ var timerID; var timerRunning = false; var today = new Date(); var count = new Date(); var secPerDay = 0; var minPerDay = 0; var hourPerDay = 0; var secsLeft = 0; var secsRound = 0; var secsRemain = 0; var minLeft = 0; var minRound = 0; var dayRemain = 0; var minRemain = 0; var Expire = 0; var timeRemain = 0; var timeRemain2 = 0; var timeUp = "less than 1 min." // enter text to be displayed when countdown is finished var time = "0 days, 0 hours, 0 minutes, 0 seconds" //do not modify this text function stopclock (){ if(timerRunning) clearTimeout(timerID); timerRunning = false; } function startclock () { stopclock(); showtime(); } function showtime () { today = new Date(); //unmark either of the two following lines count = new Date("November 9, 2007 19:50"); // enter date to count down to (use the same format) //count = new Date(document.clock.indate.value); //let the user enter the date to count down to in the input box secsPerDay = 1000 ; minPerDay = 60 * 1000 ; hoursPerDay = 60 * 60 * 1000; PerDay = 24 * 60 * 60 * 1000; PerYear = 24 * 60 * 60 * 1000 * 365; Expire = (count.getTime() - today.getTime()) /*Seconds*/ secsLeft = (count.getTime() - today.getTime()) / minPerDay; secsRound = Math.round(secsLeft); secsRemain = secsLeft - secsRound; secsRemain = (secsRemain < 0) ? secsRemain = 60 - ((secsRound - secsLeft) * 60) : secsRemain = (secsLeft - secsRound) * 60; secsRemain = Math.round(secsRemain); /*Minutes*/ minLeft = ((count.getTime() - today.getTime()) / hoursPerDay); minRound = Math.round(minLeft); minRemain = minLeft - minRound; minRemain = (minRemain < 0) ? minRemain = 60 - ((minRound - minLeft) * 60) : minRemain = ((minLeft - minRound) * 60); minRemain = Math.round(minRemain - 0.495); /*Hours*/ hoursLeft = ((count.getTime() - today.getTime()) / PerDay); hoursRound = Math.round(hoursLeft); hoursRemain = hoursLeft - hoursRound; hoursRemain = (hoursRemain < 0) ? hoursRemain = 24 - ((hoursRound - hoursLeft) * 24) : hoursRemain = ((hoursLeft - hoursRound) * 24); hoursRemain = Math.round(hoursRemain - 0.5); /*Days*/ daysLeft = ((count.getTime() - today.getTime()) / PerYear); daysRound = Math.round(daysLeft); daysRemain = daysLeft - daysRound; daysRemain = (daysRemain < 0) ? daysRemain = 365 - ((daysRound - daysLeft) * 365) : daysRemain = ((daysLeft - daysRound) * 365); daysRemain = Math.round(daysRemain - 0.5); daysLeft = ((count.getTime() - today.getTime()) / PerDay); daysLeft = (daysLeft); daysRound = Math.round(daysLeft); daysRemain2 = daysRound; /*Years*/ yearsLeft = ((count.getTime() - today.getTime()) / PerYear); yearsLeft = (yearsLeft); yearsRound = Math.round(yearsLeft); yearsRemain = yearsRound; /*Fixes*/ if (yearsRemain == 1) yearsRemain = yearsRemain + " year, "; else yearsRemain = yearsRemain + " years, "; if (daysRemain == 1) daysRemain = daysRemain + " day, "; else daysRemain = daysRemain + " days, "; if (daysRemain2 == 1) daysRemain2 = daysRemain2 + " day, "; else daysRemain2 = daysRemain2 + " days, "; if (hoursRemain == 1) hoursRemain = hoursRemain + " hour, "; else hoursRemain = hoursRemain + " hours, "; if (minRemain == 1) minRemain = minRemain + " minute, "; else minRemain = minRemain + " minutes, "; if (secsRemain == 1) secsRemain = secsRemain + " second"; else secsRemain = secsRemain + " seconds"; /*Time*/ //timeRemain = yearsRemain + daysRemain + hoursRemain + minRemain + secsRemain;//shows the number of days, hours, secs, minutes until... timeRemain2 = ' ' + minRemain + secsRemain;//shows the number of years, days, hours, secs, minutes until... //timeRemain3 = daysRemain2//shows the days until... window.status = ""; //document.clock.face.value = timeRemain; document.clock.face2.value = timeRemain2; //document.clock.face3.value = timeRemain3; timerID = setTimeout("showtime()",1000); timerRunning = true; if (Expire <= 0){ document.clock.face.value = time; // choose either "time" or "timeUp" (without quotes) stopclock() } } /* JJJ 20071109 */