function MM_findObj(n, d) { //v4.01 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 max) { var swop = min min = max max = swop } return min + Math.floor(Math.random() * (max - min + 1)) } function MM_openBrWindowCtr(theURL,winName,features,height,width,returnWin) { var inx = winName.indexOf("~"); if (inx != -1) { winName = winName.substring(0,inx); var strRand = randomRange(1,24000); winName = winName + strRand; } screenYa = window.screen.availHeight; screenXa = window.screen.availWidth; leftprop = (screenXa - width) / 2; topprop = (screenYa - height) / 2; features = features + ",left=" + leftprop; features = features + ",top=" + topprop; features = features + ",height=" + height; features = features + ",width=" + width; theWindow = window.open(theURL,winName,features); if (returnWin == "returnWin") { return theWindow } } function MM_openBrWindow(theURL,winName,features,returnWin) { var findLeft = features.indexOf("left"); var widthInx = features.indexOf("width"); var heightInx = features.indexOf("height"); if (findLeft == -1 && widthInx != 0 && heightInx != 0) { height = features.substring(heightInx+7,heightInx+10); width = features.substring(widthInx+6,widthInx+9); features = features.substring(0,widthInx-1); theWindow = MM_openBrWindowCtr(theURL,winName,features,height,width,returnWin); if (returnWin == "returnWin") { return theWindow } } else { var inx = winName.indexOf("~"); if (inx != 0) { winName = winName.substring(0,inx); var strRand = randomRange(1,24000); winName = winName + strRand; } theWindow = window.open(theURL,winName,features); if (returnWin == "returnWin") { return theWindow } } } function trim(st) { var len = st.length var begin = 0, end = len - 1; while (st.charAt(begin) == " " && begin < len) { begin++; } while (st.charAt(end) == " " && begin < end) { end--; } return st.substring(begin, end+1); } function formatPhone (field) { field.value = trim(field.value); var ov = field.value; var v = ""; var x = -1; // is this phone number 'escaped' by a leading plus? if (0 < ov.length && '+' != ov.charAt(0)) { // format it var n = 0; // count number of digits if ('1' == ov.charAt(0)) { // skip it ov = ov.substring(1, ov.length); } for (i = 0; i < ov.length; i++) { var ch = ov.charAt(i); // build up formatted number if (ch >= '0' && ch <= '9') { if (n == 0) v += "("; else if (n == 3) v += ") "; else if (n == 6) v += "-"; v += ch; n++; } // check for extension type section; are spaces, dots, dashes and parentheses the only valid non-digits in a phone number? if (! (ch >= '0' && ch <= '9') && n != 10 && ch != ' ' && ch != '-' && ch != '.' && ch != '(' && ch != ')') { x = i; break; } } // add the extension if (x >= 0) v += " " + ov.substring(x, ov.length); // if we recognize the number, then format it if (n == 10 && v.length <= 40) field.value = v; } return true; } function toggleMenuItemColor(menuitem,ftcolor,bgcolor) { menuitem.style.backgroundColor=bgcolor; menuitem.style.color=ftcolor; } function enlargeImage(imageID,fullWidth,fullHeight,smallWidth,smallHeight) { var image=MM_findObj(imageID); if (image.width == smallWidth) { image.width=fullWidth; image.height=fullHeight; } else { image.width=smallWidth; image.height=smallHeight; } } function hiliteContainer(container) { // container.style.backgroundColor = '#FFCCCC'; container.style.borderColor = 'red'; } function unhiliteContainer(container) { // container.style.backgroundColor = 'transparent'; container.style.borderColor = 'silver'; } function hiliteObject(container) { // container.style.backgroundColor = '#FFFFCC'; container.style.borderColor = 'blue'; } function unhiliteObject(container) { // container.style.backgroundColor = 'transparent'; container.style.borderColor = 'silver'; }