Monday, December 27, 2010

Creating a Disk Image of Your iLife '11 DVD

Let me begin with a disclaimer. I do not endorse or approve of software piracy. However, I do believe that the legal owner of a software title should be entitled and able to make an archival copy of the original software media for safe-keeping.

After being inconvenienced and financially disadvantaged more than once after misplacing or damaging my original application installation disks, I have made it standard practice to create a copy of any software title that I purchase; especially the expensive ones. These copies are stored in a fire-proof location, separate from the original disks, just in case they are needed at a later date for a fresh installation.

Roxio's Toast has been my go-to application for creating back-up copies. It has never failed to provide an accurate copy of an original application CD or DVD. That is, until now.

I recently acquired the latest version of iLife from Apple. The updates to iPhoto, iMovie, and GarageBand installed without issue and brought many new features that make using our Apple computers even more enjoyable. The problem I encountered was when I tried to create my back-up copy of the iLife '11 DVD. Toast gave a valiant effort, and spun the DVD for quite some time, but it eventually returned error codes and messages that suggested the disk was copy-protected. The same result was obtained whether I tried to duplicate the DVD, or create a disk image. Bummer.

The obvious fall-back was to use the capable, but sometimes intimidating, Mac OS X Disk Utility. The Disk Utility app offers several powerful features for managing your Mac's disk drives; an indispensable utility application! It's also entirely capable of making your computer completely unusable if you are not careful. Hence, the "intimidating" description.

After opening Disk Utility with the iLife '11 DVD in the optical drive, I selected the DVD from the list of mounted disks in the column to the left. Then from the Disk Utility menu, I selected File->New->Disk Image from "iLife '11 Install DVD." Again, error codes and messages that suggested the disk was copy-protected. How could I get around this "feature" from Apple?

Back to the Disk Utility menu, but this time I selected File->New->Disk Image from Folder, and selected the iLife '11 Install DVD as if it were a folder. I chose an image name that's meaningful; usually the default DVD title. I also use the "Read-Only" Image Format to prevent accidental changes to the copy. A compressed format is also read-only, but it takes more time to create and to open the final image. After hitting the Save button, I was happy to watch Disk Utility successfully create a copy of the iLife '11 Install DVD.

With a good disk image having been created, I was able to burn the file to a DVD for safe-keeping. Only time will tell if Apple will allow iLife '12 (or other software titles) to be copied in this way, but for now I am happy. I've got my archived copy of iLife '11 safely put away.

Monday, December 20, 2010

IOGear GCS632U KVM Switch Hotkey Mode

I've really enjoyed the use of my IOGear MiniView Micro USB Plus 2-Port KVM Switch for a couple of years now. I'm not certain why IOGear felt the need to give the device such an elaborate name. We'll blame their marketing folks for that.

While I'm passing out blame, there's an important usability problem to pin on IOGear's technical writers. Let me explain.

The IOGear Model GCS632U KVM switch is a really great device for sharing a single keyboard, video device, and mouse between two computers. The switch is conveniently operating system independent; I use mine to share a keyboard and mouse between a Microsoft Windows 7 and a Ubuntu 11.04 machine. It operates on built-in code, so there is no special software required on the host computers. Best of all, there are a few user-configurable settings to customize the user experience. The features are accessible via a special key sequence that will place the user in "Hotkey Mode". You can read more about the settings in the IOGear device's User Guide [PDF].

One of the configurable features is to change the default port switching key from Scroll Lock, Scroll Lock to Ctrl, Ctrl; the change that I wanted to complete. The User Guide provides specific instructions to make this change by first placing the device in Hotkey Mode. To do this, the user must "(1) Press and hold Num Lock key for two seconds; (2) Press and hold Minus key [ – ] for one second; and (3) Release Minus key [ – ] and within one second also release Num Lock key."

With such precise timing specified in the manual, one might suspect that this was a really, really critical point. In fact, I spent way too much time trying to get the exact timing down just so I could simply change the default port switch key. Boy was I mistaken, and the technical writers sure made it much more difficult than it needed to be.

For those of you who have been trying unsuccessfully to enter Hotkey Mode on the IOGear KVM switch by following the manufacturer's instructions, here's the trick. You only need to press and hold the Num Lock key for about one second (e.g. "one thousand one"), then casually press the Minus key and immediately release both keys at the same time. You should see the keyboard's Caps Lock and Scroll Lock status lights blink alternately signifying that you are in Hotkey Mode. Then you can configure the KVM switch as desired.

I'm embarrassed to admit how long it took for me to get this key sequence down right. Hopefully by sharing the information here with you, I will have saved you some time and trouble.

Sunday, December 12, 2010

Some Things Never Change

If you've read some of my posts in the past, you know that I prefer to avoid discussions on topics of religion or politics. There are plenty enough other blogs which cover these topics, that I don't see a need to join the fray of controversy. However, I must disclose that this post presents one person's observations of a society that is divided on political matters. An observation that was made about people in the United States by an author almost 80 years ago. With that disclosure out of the way, here's the story.

My wife and I enjoy visiting the Eastern Caribbean, and our travels have resulted in a genuine interest in the history of the islands and their inhabitants. That is what led me to recently gift my wife with a vintage book written by Desmond Holdridge. The story is a non-fiction, first-person account of Desmond and his wife, Elizabeth Hamlin Holdridge ("Bet"), who as newlyweds made their first home on the island of Saint John in the United States Virgin Islands ("USVI").

The book is titled Escape to the Tropics, copywrite 1937; published by Harcourt, Brace and Company (New York) and printed by the Quinn & Boden Company (New Jersey). For the first seven chapters, Holdridge does a splendid job of explaining how he and Bet interacted with the people of the USVI. It's a very entertaining account of island life in the early 1930s. Then the story takes an odd twist as Holdridge travels to British Guiana in search of Paul Redfern, a pioneer aviator who is believed to have crashed his plane in the South American jungle while attempting a long-distance flight from the United States to Brazil in 1927. Overall, it's a good vintage read, but this is not intended to be a book review, so let me get to the point of my blog post.

In the first chapter, Holdridge explains why he and Bet decided to "escape to the tropics." The Depression had drastically changed their lives in the United States, and they were looking for a new start. Holdridge writes of his friends' opinions regarding the administration, the Federal Government, and politics in-general. I found his observations to be rather profound, especially when considering the current state of our society's growing political division. It made me realize that some things never change.

It's best to let Holdridge's own words demonstrate my fascination with his perspective. The following text is taken from select paragraphs of the first chapter, beginning on page 10 of the book.

"All about us and all around the earth, near the forty-fifth parallel of latitude, the two most obvious ways of managing the vast, stupid, pathetic masses of mankind were feinting for advantage as antagonism deepened to a death struggle whose outcome will be peonage for most of us, no matter who wins. Karl Marx against Frederick William I; Stalin against Hitler; the State against the Man; the machine against the hand; the mind against the soul; our rich friends hysterically looking under the bed for Roosevelt and our poor ones ready to exchange their freedom for a cheap automobile and a comfortable place to defecate.

We both thought that these places where myriads of people lived together in a life not seen before -- stigmatizing as Fascists all those who said some of the things were good, and damning for Communists all those who said some of the old things were bad -- were perilous places, because an ugly and unnecessary sacrifice to human stupidity was impending."

"It was a rather trying period. Many times I sat down at my typewriter and, instead of getting on with the business of producing something, anything, on it, I would worry about the dividing line that was appearing in all the things and people I knew. A very good friend with whom I was on terms of long standing intimacy was also quite wealthy and it seemed that every time I visited him he was in a bigger froth over what he called 'this damn Communistic trend.' One evening he lashed himself into a great fury and, holding an imaginary bridle in one hand and an imaginary blade of some sort in the other, he roared, 'Ride the bastards down, that's what! Ride among 'em, slashing right and left.'"

"Another equally good friend was poor and, together, we watched the progress of the Austrian civil war, a thoroughly dirty business, to my mind. But this friend was passionately in favor of the left wingers. 'I hope they kill every one of the bastards!' he said, referring to the yokels supporting the right wing.

Since then they have both become more so. The rich one helps run, as an amusement, a newspaper full of absurd propaganda about the sanctity of the Republican party; the other is a lesser priest of the New Deal. Neither one will love me for mentioning this matter, but had I listened seriously to the rich one, I should have been so revolted as to become a Communist, and listening to the poor one would have inevitably made me a Fascist. As it was, they made me want to get out of it, for both kinds of men will, sooner or later, be at each other's throats. Nor did I like the contours of the worlds they wished to construct, and I thought too well of both to take sides."

"I made an honest effort to understand their perspective worlds, which is more than most of the people who damn their viewpoints do."

Upon reading this part of the book, I found myself very closely aligned with the thoughts of the author. His observations of his friends almost 80 years ago, were very much like my observations of my own friends today. Yes, it is true. Some things never change.

Wednesday, November 3, 2010

Engineer's (Humorous) Conversion Table

1. Ratio of an igloo's circumference to its diameter = Eskimo Pi
2. 2000 pounds of Chinese soup = Won ton
3. 1 millionth of a mouthwash = 1 microscope
4. Time between slipping on a peel and smacking the pavement = 1 bananosecond
5. Weight an evangelist carries with God = 1 billigram
6. Time it takes to sail 220 yards at 1 nautical mile per hour = Knotfurlong
7. 16.5 feet in the Twilight Zone = 1 Rod Serling
8. Half of a large intestine = 1 semicolon
9. 1,000,000 aches = 1 megahurtz
10. Basic unit of laryngitis = 1 hoarsepower
11. Shortest distance between two jokes = A straight line
12. 453.6 graham crackers = 1 pound cake
13. 1 million-million microphones = 1 megaphone
14. 2 million bicycles = 2 megacycles
15. 365.25 days = 1 unicycle
16. 2000 mockingbirds = 2 kilomockingbirds
17. 52 cards = 1 decacards
18. 1 kilogram of falling figs = 1 FigNewton
19. 1000 milliliters of wet socks = 1 literhosen
20. 1 millionth of a fish = 1 microfiche
21. 1 trillion pins = 1 terrapin
22. 10 rations = 1 decoration
23. 100 rations = 1 C-ration
24. 2 monograms = 1 diagram
25. 4 nickels = 2 paradigms
26. 2.4 statute miles of intravenous surgical tubing at Yale University Hospital = 1 IV League

Friday, September 24, 2010

Facebook: The Bane of Society or Just the Next Thing?

Earlier this week, a friend of mine with a young teenage daughter sent me a link to this article... "Facebook is Spreading Like the Plague". The premise of the author's message (and I paraphrase here) is that Facebook is evil and will be the ruin of mankind. You can read the article and make your own assessment of the author's message, but I believe that my succinct summary is pretty accurate.

My friend does not currently use Facebook, and this article made him hesitant about allowing his daughter to use the service. He was also concerned about how prevalent social media services were being used at his workplace. As you might suspect, I have a different point of view.

How many times do you think this article, or some version similar to it, has been written in the past? I’m guessing that the same argument has been made by concerned parents for:

SMS / Text Messaging
MP3s and portable music players (e.g. iPods)
GameBoy
DVDs
Internet Forums
Mobile Phones
Instant Messaging (IRC/IRQ)
AOL
Email
CDs
Handheld Video Games
CompuServe
Prodigy
Video Tapes
Philip's Cassette Tapes
BBSs
Usenet / Newsgroups
Citizens Band Radio
8 Track Tapes
Color Television
45 rpm Records
Black and White Television
Amateur “Ham” Radio
33 rpm records
Telephones
Radio
78 rpm records / Victrola
Newspapers
.
.
Books
.
.
The Wheel
.
.
Fire

Okay, maybe I’m am being a bit of a smart alec, but I think that you get my point. There is always some new technology, some device or service, that is going to sap the life and intelligence out of our children and ruin our society and culture as we know it. These arguments are also often made in regards to the use of these same types of technologies in the workplace.

I believe that whether you are referencing your children or employees, it all comes back to an appropriate level of supervision and a reasonable amount of control. Facebook only consumes every waking moment of some children’s and adult’s time because it is allowed to. If a parent or supervisor is concerned about how much time their child or employee spends online, they only need to establish some house rules regarding the hours that it is permissible. It is no different for Facebook than what it may have been for any of the other items in my list above.

As a proponent of new technology and a self-proclaimed early adopter, I probably lean towards giving my kids more leeway on these matters. Our family's rules are generally based upon the children’s performance at school and with the successful completion of their household chores. If they can maintain exceptional grades, get their chores done, and still get adequate sleep and exercise, we generally don’t care about their time on Facebook (or Xbox, or texting, or…).

My wife and I originally established Facebook accounts to monitor our own children. That was the deal; the kids could sign-up for Facebook as long as they friended us. There has been only a couple of instances where we suggested that they delete a comment or photo. It has actually been a good life lesson and social experience for them. Interestingly, once we were on Facebook, my wife and I both discovered many old friends, some who were monitoring their own children. It has been fun to reconnect and we have also found that the service is a very good way to communicate with extended family; much better than our previous attempts at mass emails, family websites, or periodic newsletters.

If employees in the workplace are spending too much time using these services, then it is quite possible that they don’t have enough work to do or they simply lack the self-discipline to control their own behavior. I would classify that as a supervision problem; not a problem with the technology.

It can be difficult determining if these technologies are beneficial or detrimental in the work place, especially when they are first introduced. It’s not too hard to argue that a little music from Pandora in the background may help some people be more productive. The use of Twitter / Yammer could help people share information and improve productivity. Time maintaining a LinkedIn profile may help business development efforts.

There are no hard and fast rules. With notebook computers and mobile email devices, many believe that employees work far more hours per day than what was expected in the past, so allowing someone to watch a couple of YouTube videos while they eat their lunch, or maintain their Farmville crops before starting their long commute home may actually help the company keep the employees happy and working hard(er).

The best part of social media for me is learning how to leverage it for use in my day-to-day work. I can provide examples of projects and business development opportunities that were only possible because of my connections on Facebook and LinkedIn. I believe that anyone who is not leveraging those sites today is really falling behind. And I mean “leveraging” by joining groups, making new contacts and engaging in discussions, not simply creating a profile and then never going back to the site again.

So is Facebook the bane of society? Nah! It's just the next thing. Just wait. It won't take long for parents to identify something else that is sapping the intelligence out of their children and they will all forget about how awful Facebook is.

Monday, September 20, 2010

Natural Gas Conversion Table / Energy Equivalents

It seems as though I am often searching for this information. Maybe if I post it here I will be able to find it more easily in the future. Hope that you find this information useful as well.

Natural Gas Conversion Table*

1 cubic foot ("CF")                      = 1,000 Btu
1 CCF   = 100 CF        = 1 Therm        = 100,000 Btu 
1 MCF   = 10 CCF        = 1 Dekatherm    = 1 MMBtu
1 MMCF  = 1 million CF  = 10,000 Dth     = 10,000 MMBtu
1 BCF   = 1 billion CF  = 1 million Dth  = 1 million MMBtu
1 TCF   = 1 trillion CF = 1,000 BCF

* Based upon an approximate natural gas heating value of 1,000 Btu per cubic foot.


Natural Gas Energy Equivalents

                     1 MMBtu           Pounds of CO2
Fuel                Equivalent           per MMBtu


Natural Gas           1 MCF                 115
Coal                 83 Pounds              227
Garbage (Typical)   222 Pounds              200
Gasoline              8 Gallons             156
Oil                   7 Gallons             161
Wood                286 Pounds              195

Sunday, August 22, 2010

Do It Yourself: Serpentine Belt Tensioner Tool

My daughter's Honda Element needed some routine maintenance; replacement of the serpentine belt that connects the engine's crankshaft to the power steering pump, water pump, alternator and air conditioning compressor. This is a relatively easy job for any shade tree mechanic who prides themselves on completing a Saturday afternoon do-it-yourself project.

If you are about to tackle this task on a Honda Element, you may want to review the great instructions at the Honda Element Owners Club Forum. This site includes the belt routing diagram and handy pointers on how to best get to the belt as there is not much room for you to work around the side of the engine where the serpentine belt is located.

I am a fairly competent DIY mechanic and have a reasonable collection of tools to get the typical maintenance or repair job done. What I don't own is a special tool to loosen the serpentine belt's tensioner pulley. The tensioner automatically applies pressure to the belt to keep it tight while the engine is operating. Some vehicles have a spring-loaded version, while others apply tension with a hydraulic device. All of them require a significant amount of leverage by the mechanic to loosen the tension enough to allow the old belt to be removed and the new belt to be installed.

The tensioner will typically have a standard hex-head fastener for use with the tensioner tool. This is not an actual fastener, so you will not be tightening or loosening a bolt. In the case of my Honda Element, it is a 14 mm, six-point head. There's sufficient room to apply an end-wrench to the fastener head, but the relatively short 14 mm end-wrench does not provide enough length to loosen the tensioner.

Mechanics use a tool made specifically for this purpose. You can find several different styles of tensioner tools available for purchase, like this model from MAC Tools.

Most DIY mechanics do not have a specialty tool like this, often times because they are considered relatively expensive (e.g. $30 - $50) for a job that might only be performed once or twice in a vehicle's lifetime. The cost was high enough to inspire me to seek alternatives and think creatively.

Some vehicles may have enough room so that you may simply use a socket with a short length of pipe slipped over the wrench to extend the lever enough to loosen the tensioner. In my case, the Element had limited space and required a tensioner tool that was off-set to reach around various components in the engine compartment.

It may have been possible to use two wrenches in a cheater configuration like that shown in the photo below.

Although this method may work, I hesitate to treat my tools in such a way. End wrenches are not made to be used in this configuration, and the risk of breaking them or possibly permanently ruining them is just not worth the trouble. The length of the lever is also not that much better than the single end wrench alone, making this ad-hoc tool less than ideal for loosening the tensioner. I knew that there had to be a better option.

Looking at the scrap metal under my workbench, I came upon the following idea. To create a long lever for the 14 mm end wrench that allowed it to be placed in the off-set configuration required by my Honda Element. The metal is nothing special, just some bar stock from an old garage door opener. You may have something similar lying around your shop as well.

This first photo shows the components before assembly. The hardware is standard thread 1/4 inch, by the length required. 

The short strap sandwiches the open-end of the wrench to the longer lever. Once assembled, the bolts should be snug, but there is no reason to over-tighten.








In this photo you can see how the off-set is achieved.













The final photo shows the assembled tool. It worked exactly as needed without risk of damaging the belt tensioner or my tools. The best part is that the total cost for me was $0.00.


The type of serpentine belt tensioner tool that you need for your vehicle may be slightly different, but I hope that these photos help to inspire your own creativity so that you may also avoid the expense of purchasing an expensive specialty tool that you may never need to use again. Good luck with all of your shade tree repairs!

Saturday, July 24, 2010

How I've Lost Weight and Improved My Health and Well Being. My Obligatory Weight-Loss Story.

The Internet has so many web sites and forums dedicated to the subject of dieting you would think that we are all obligated to talk about our weight-loss experience at some point in our life. And from my observation, for as many web sites there are that discuss dieting, there are opinions and theories on how to achieve your weight-loss goals. Since I don't want to feel like I've been left out (Ha!), here is my story.

I did not necessarily have a serious weight problem, it was just one of those things that happened over the course of several years. Busy work days, business travel meals, rushed for time to eat right, and certainly no time to exercise. 10, 20, 30 pounds later I began to notice that my waistline was getting larger than what I would have liked. My doctor would chide me during my physical exams, and encourage me to lose a few pounds. "I will... yep, I will." was my reply. I would feel guilty for a few days and think about it for a while longer than that, and then I would eventually get busy with life and put those thoughts aside.

This past spring I had a little wake-up call. During a routine exam, my doctor detected a potential heart problem which led to an angiography to make an assessment of my cardiovascular system. Fortunately, I was able to leave the hospital without requiring surgery or any special procedures. However, the message was loud and clear; I needed to get into better physical condition.

I have never had much faith in weight-loss supplements, colon cleansing tonics, or celebrity diet strategies. My knowledge and understanding of weight-loss is based on common sense and great information from reliable sources like Johns Hopkins Medicine. I know that weight-loss is dependent upon reducing my daily caloric intake and increasing my activity through regular exercise. A few years ago my doctor suggested that I purchase a pedometer to monitor my exercise effort. She explained to me that I should strive to walk 10,000 steps each day. I thought, that would have to be pretty easy, after all, I walked a lot each day around the office and my home. So I put a pedometer on my belt and checked the results at the end of the first day. Hmmm. 2,300 steps. Well obviously the pedometer must not have been configured correctly! After reading the instructions and adjusting the device for the length of my stride I was ready for day two. Hmmm. 2,500 steps. I could see that hitting 10,000 steps each day was going to be a lot more difficult than what I originally thought.

A good pedometer can be very helpful when trying to meet walking, jogging and running distance objectives. It was desirable for me to have a device that easily maintained some kind of historical record so that I could see my progress over time. The best pedometer that I found with this feature is the Fitbit. You simply slip the small Fitbit device into your pocket or clip it on your belt, and whenever you pass within 15 feet of the Fitbit's base station that is connected to your computer it will automatically download your data. Then you can view a very detailed record of your daily steps on the Fitbit web site. I highly recommend it!

Using the Fitbit has made monitoring my progress almost fun, and it has certainly made me much more aware of my exercise effort. Bolstered with this daily record of my progress, I have worked hard to walk more and more each week. The result was a loss of about ten pounds over the course of a few months. I was making progress!

Monitoring my caloric intake was another matter altogether. I've been a pretty healthy eater for several years and I have always thought that I did a good job of watching what I was eating and how much I was eating each day. However, my wife taught me a valuable lesson. While she was dieting to get into better physical condition herself, she began a process of calculating the points value of the food she ate using a method similar to that used by Weight Watchers

The system uses a formula to determine how many points you are allowed to have each day. Then you watch what you eat to make certain that you are consuming foods with point values that sum to be no more than that level. It's nothing magic. No pills required. No crazy fads. Just eating healthy food in the right amounts.

This process requires that you keep a written record of each and every meal; each and every snack; absolutely everything that you consume each day. Having to maintain this written record of what I ate each day proved to be my weight-loss epiphany! I had only thought that I was watching what I ate before, but once I started having to write everything down I quickly began to see my faults and failures. Extra helpings at meals, high calorie sauces and desserts, and too many carbohydrates were quickly revealed when I reviewed my food selections at the end of each day.

The magic here for me was the physical act of recording what I ate. That process alone actually required more discipline than watching what I ate. Come to find out, eating healthy was rather easy and did not require any extra expense. I only had to choose my meals more carefully, being conscience and aware of the food that I was going to consume. No more "Are you gonna finish that?" at the dinner table! 

My wife was a big help at identifying tasty, but low-point options for my meals and snacks. Combined with the increase in my daily activity, I began to quickly see real progress in my weight loss. After just a few months, I had lost more than 20 pounds of additional weight. That was a total of over 30 pounds lost in less than six months! My wife's blog, Points In My Life, has a number of helpful ideas on using this system of counting points. Besides providing a number of great recipes and inspirational stories, her web site also includes an easy to use calculator to determine the points you are allowed each day, and another calculator to determine how many points a food item contains.

I'm confident that if you increase the amount of exercise you get each day by doing something as simple as walking a bit more, and if you eat meals that consist of healthy foods that are within your points target, you will be able to successfully lose weight. Be certain to monitor you actual daily activity, and start recording all of your food choices. That was the trick for me. If I was able to do this, you can do it too.

Saturday, July 17, 2010

Creating a Time-Lapse Video of Screen Captures

I recently came across a really interesting web site that provided a graphical representation of real-time electricity prices in the wholesale market (something relevant to my day job). The image updated every five minutes, which gave you an interesting real-time perspective. However, there was no option to view past data for a historical perspective. That was disappointing to me because as cool as it was to see the data in real-time, it had a much more significant meaning when compared to recent history.

That inspired me to find a way to capture the screen image every so often and assemble a collection of the images together to view as a video. That couldn't be hard to do, could it?

Well, it really wasn't that hard! Here's how I accomplished the task.

The web site that I wanted to capture the image from uses the Adobe Scalable Vector Graphics ("SVG") viewer. This plugin requires the use of Microsoft Windows and Internet Explorer (Yes, I know it will run on older version of OS X, but we're talking circa 2001 folks; I've updated my operating system since then!) Requiring Adobe SVG was very disappointing since I run mostly Apple Mac OS X machines in my home office. However, I use VMWare Fusion to run Windows 7 Ultimate on the Mac Pro and I also keep an old Sony Vaio desktop around to run Windows 7 Home Professional for these purposes.


For several years, I have used a very powerful and easy-to-use Microsoft Windows screen capture application called MWSnap. Windows 7 does include a built-in screen capture utility, but it is extremely simple and lacks many of the functions that can be found in the basic MWSnap application. The most significant function is the file naming capability. MWSnap allows the use of variables for date and time allowing you to automatically time-stamp the image file. The application also allows you to automatically save the image that you capture. The very best thing about the MWSnap application? It's freeware with donations accepted. Wow! With these features, we were halfway there.

Now we needed a way to automate the screen capture process. Enter the wonderful Windows freeware utility, AutoHotkey. This handy application allows the user to create a script of keyboard and mouse commands along with a powerful set of logic controls to automate almost any process on a Microsoft Windows computer. Although the application has an extremely robust set of features, we only required a relatively simple set of keyboard commands. Through trial and error, we found the biggest trick was to include several pauses to provide Windows or the subject web site sufficient time to respond to the AutoHotkey commands; a simple, but important point for you to remember.

AutoHotkey allows you to create a command script in a text file. Then when you select that script from File Explorer, the application will begin the execution of your custom AutoHotkey commands. For our purposes, we needed to perform a few different tasks. The Adobe SVG plug-in on our subject web site was set to automatically refresh the graphic image every five minutes. However, we found that this process appeared to stop on its own after an hour or two. We decided the best thing was to force a browser screen refresh; launch MWSnap; send the keyboard commands to MWSnap to select and capture the browser screen image (automatically saving the image file with a date and time stamp); and then close MWSnap and patiently wait five minutes to begin the process over again. We included a loop to execute this set of commands for a certain number of hours.

The AutoHotkey script file that we used was very similar to this:

; Pause 5 seconds before starting.
; This will give you time to close the File Explorer window and
; place your mouse pointer in the window that you want captured.
    Sleep, 5000
; Loop ( 36 hours = 432 interations )
    Loop, 432
    {
; Refresh the browser window
    Send, {F5}
; Pause 10 seconds ( 1 second = 1,000 )
    Sleep, 10000
; Page down to view the desired image
    Send, {PGDN}
; Pause 5 seconds ( 1 second = 1,000 )
    Sleep, 5000
; Open the MWSnap application
    Send, {LWIN}
    Send, mwsnap {ENTER}
; Pause 5 seconds ( 1 second = 1,000 )
    Sleep, 5000
; Select image in browser window
    Send, {ALT}
    Send, c
    Send, w
; Pause 5 seconds ( 1 second = 1,000 )
    Sleep, 5000
; Capture image and autosave according to MWSnap settings
    Send, {ENTER}
; Pause 5 seconds ( 1 second = 1,000 )
    Sleep, 5000
; Close the MWSnap application
    Send, {ALT}
    Send, f
    Send, x
; Pause ( 5 minutes = 300,000, but subtratct the time spent pausing in the script )
    Sleep, 270000
    }

You may find the AutoHotkey script commands very intuitive. If not, a quick read of the well-written documentation in the help file will quickly get you on your way to writing your own command scripts.

After testing the script a few times, it was simply a matter of navigating to the subject web site, firing-off the AutoHotkey script and letting MWSnap capture the images as planned. In the case of my script, 36 hours later I had all of the images that I wanted.

At this point I copied the image files to my Mac Pro to be imported into iPhoto, and then into iMovie where the images were easily assembled into a MPEG-4 video with informative title slides and smooth transitions. I assume that Microsoft Windows Live MovieMaker has similar capabilities, but it is an application that I have not used for many years. If MovieMaker doesn't meet your needs, there are a number of third-party applications that allow you to create a slideshow from a collection of images. Google Picasa is one that I have used in the past. However, it is limited on capabilities for titles, transitions and slideshow speed control.

The finished product from my efforts is presented below. The process was simple enough (and rather fun) that I have a number of new ideas for other time-lapse, screen capture projects. I hope that this short tutorial provides you with some helpful information so that you can create your own time-lapse video. Good luck with your project!

Wednesday, July 14, 2010

Ford Escape Hybrid Brake Failure - Revisited

In a previous blog post, we discussed our unfortunate and frustrating experience with the brake failure on our 2005 Ford Escape Hybrid ("FEH"). More specifically, the failure of the regenerative braking system due to a defective master cylinder and hydraulic control unit ("HCU"). Since posting that information, we have heard from many other Ford Escape and Mercury Mariner Hybrid owners who have experienced the same problem. Most all of them described the harrowing experience of having the electro-hydraulic brakes resort to failsafe mode; some resulting in accidents or near-misses.

I am happy to report that after replacing the defective master cylinder and HCU at a cost of more than $7,000, the regenerative brakes on my FEH have worked without incident for more than six months. No more warning lamps, alarms, or death-defying stops using the hand-controlled emergency parking brake. 

As fully described in my related post, Ford was unresponsive to this matter. In fact, the service managers at three different dealerships either refused to acknowledge this was an issue with the FEH, or failed to bring the problem to my attention, even though Ford had recognized that this was a problem only a few months after I purchased the vehicle. We had previously encouraged anyone else having this problem to file a complaint with the Office of Defects Investigation ("ODI") at the National Highway Traffic Safety Administration ("NHTSA"). If you have not already done so, you can file a safety complaint at this web site... http://www-odi.nhtsa.dot.gov/ivoq/ or by calling the NHTSA Safety Hotline, Monday through Friday from 8:00 a.m. to 8:00 p.m. at (888) 327-4236, TTY: (800) 424-9153.

A number of complaints have already been filed. I have reproduced some of those below to help give you an idea of how similar the problems are amongst those who have experienced this brake failure.

ODI Case Number: 10181021
Component: SERVICE BRAKES, HYDRAULIC:ANTILOCK:ABS WARNING LIGHT
Details: COMPLETE BRAKE FAILURE. FIRST TIME IT OCCURRED WAS ON THE INTERSTATE - 65 MILES AN HOUR AND THE BRAKE LIGHT AND THE ABS LIGHT CAME ON AND THERE WAS A BEEP. THERE WERE THEN NO BRAKES AT ALL. LUCKILY, I WAS ABLE TO GET TO THE SIDE OF THE ROAD AND COAST TO A STOP. TURNED OFF THE TRUCK AND STARTED IT AGAIN AND IT HAD BRAKES. ON THIS LAST INCIDENT, THE SAME THING IN THE SAME ORDER HAPPENED. THANKFULLY, MY WIFE WAS ABLE TO GET THE VEHICLE TO COAST TO A STOP WITHOUT HITTING ANYONE OR ANYTHING. THIS PROBLEM IS VERY DANGEROUS. IT IS INTERMITTENT THUS MAKING IT HARD TO DIAGNOSE. *JB
Occurrences: 2Injuries: 0
Fail Date: 01/27/2007Deaths: 0
Date added to datbase: 1/29/2007 

ODI Case Number: 10204195
Component: SERVICE BRAKES, HYDRAULIC
Details: THE BRAKES HAVE COMPLETELY STOPPED WORKING (EXCEPT FOR THE EMERGENCY BRAKE) 3 TIMES IN ONE MONTH, 4 TIMES IN TWO YEARS. *TR
Occurrences: 4Injuries: 0
Fail Date: 08/26/2007Deaths: 0
Date added to datbase: 9/26/2007 

ODI Case Number: 10221386
Component: SERVICE BRAKES, HYDRAULIC:SWITCHES:BRAKE LIGHT
Details: SERVICE BRAKE SYS MESSAGE ON 2005 FORD ESCAPE HYBRID ALONG WITH BRAKE WARNING LIGHT. *TR
Occurrences: 1Injuries: 0
Fail Date: 03/15/2008Deaths: 0
Date added to datbase: 3/16/2008 

ODI Case Number: 10234772
Component: SERVICE BRAKES, HYDRAULIC
Details: HAVE HAD THE "SERVICE BRAKE SYSTEM" MESSAGE AND THE DASH "BRAKE" INDICATOR LIGHT GO ON RANDOMLY WITHOUT BRAKING FOR A COUPLE OF MONTHS (BEGAN IN MAY 2008) IT HAS BEEN TO THE DEALER TWICE (IN JUNE 2008) AND IS NOW DOING IT AGAIN. THE DEALER REPLACED AN ELECTRICAL HARNESS THIS FIRST TIME AND CLEANED CONTACTS ACCORDING TO A FORD SERVICE ALERT THE SECOND. I ALSO HAD A SIMILAR PROBLEM IN THE FALL OF 2007. THE "SERVICE BRAKE SYSTEM MESSAGE" APPEARED AND THE DASH "BRAKE" INDICATOR LIGHT CAME ON OVER A THREE WEEK PERIOD FOLLOWED BY THE 4X4 SYSTEM AND ABS SYSTEM MAKING NOISE, JERKING THE CAR SEVERAL TIMES AND THEN SHUTTING DOWN WHILE I WAS DRIVING (NOVEMBER 2007). THIS WAS FIXED BY THE DEALER BUT NOW THE CARS INDICATOR LIGHTS ARE TURNING ON AGAIN AND THE PROBLEM DOES NOT SEEM TO ABLE TO FIXED. I AM WORRIED THE BRAKE SYSTEM WILL FAIL AGAIN. *TR
Occurrences: 1Injuries: 0
Fail Date: 07/18/2008Deaths: 0
Date added to datbase: 7/18/2008 

ODI Case Number: 10276404
Component: SERVICE BRAKES, HYDRAULIC
Details: BRAKE SYSTEM FAILURE ON 2005 FORD ESCAPE HYBRID: HIGHWAY DRIVING, NO BRAKING DURING FAILURE - ABS LIGHT COMES ON WITH "SERVICE BRAKE SYSTEM" MESSAGE ON CONSOLE. TOOK TO DEALER WHERE THEY "DIAGNOSED" MASTER CYLINDER FAILURE. REPLACED MASTER CYLINDER. 06 JULY 09 BRAKE SYSTEM FAILURE ON 2005 FORD ESCAPE HYBRID: NORMAL CITY DRIVING UNDER 35MPH ABS LIGHT COMES ON WITH "SERVICE BRAKE SYSTEM" MESSAGE ON CONSOLE. *TR
Occurrences: 1Injuries: 0
Fail Date: 06/26/2009Deaths: 0
Date added to datbase: 7/11/2009 

ODI Case Number: 10306490
Component: SERVICE BRAKES, ELECTRIC
Details: MY 2005 FORD ESCAPE HYBRID HAVE 140,000 MILES ON IT FOR THE PAST 3 WEEKS THE ABS LIGHT AND THE RED TRIANGLE STOP THE CAR SAFELY COME ON WHEN I START THE CAT. I PULL OVER SHUT THE CAR OFF RESTART AND ALL IS WELL UNTIL THE NEXT TIME. *TR
Occurrences: 1Injuries: 0
Fail Date: 01/25/2010Deaths: 0
Date added to datbase: 2/5/2010 

ODI Case Number: 10308285
Component: SERVICE BRAKES, HYDRAULIC
Details: FORD HYBRID ESCAPE BRAKE LIGHT KEEPS COMING ON. I HAVE TO TURN IT OFF AND THEN BACK ON TO GET THE LIGHT OUT. DEALER SAYS ITS A GROUND FAULT AND FORD HAS A NEW WIRING HARNESS, BUT I AM REQUIRED TO PAY FOR IT, ITS AN 05 WITH LESS THAN 8,000 MILES ON IT, YET I AM TO PAY AND FIX FORDS PROBLEM, AND WE ARE TALKING BRAKES HERE, THAT FORD KNOWS ABOUT AND HAS ALREADY IDENTIFIED AND HAS A FIX FOR. IT NEEDS A RECALL. THE ELECTRIC STEERING HAS ALREADY FAILED ONCE AND HAD TO HAVE A NEW COMPUTER FOR THIS. FORD IS HIDING PROBLEMS WITH THE CAR. *TR
Occurrences: 1Injuries: 0
Fail Date: 02/01/2010Deaths: 0
Date added to datbase: 2/10/2010 

ODI Case Number: 10314433
Component: SERVICE BRAKES, HYDRAULIC
Details: WE HAVE EXPERIENCED AN UNUSUAL PROBLEM WITH THE BRAKING SYSTEM IN OUT 2005 FORD ESCAPE HYBRID. THERE HAVE BEEN MAY EPISODES OF THE YELLOW ABS AND THE RED BRAKE WARNING LAMP LIGHTING UP AND THE ALARM SOUNDING OVER THE PAST YEAR. THIS WOULD HAPPEN FOR A COUPLE OF DAYS AND THEN AFTER SHUTTING-OFF THE VEHICLE AND RESTARTING, THE BRAKES RETURNED TO NORMAL OPERATION. WE SPOKE WITH THE SERVICE DEPARTMENT AT OUR DEALERSHIP ABOUT THIS AND BECAUSE THE WARNING LIGHT WASNT ON AT THE TIME, THEY SAID THERE WAS NOTHING THEY COULD DO TO DETECT THE PROBLEM. THE LAST TIME THIS HAPPENED THE BRAKES REVERTED TO FAIL SAFE MODE REQUIRING A "PEDAL TO THE FLOOR" EFFORT TO SLOW THE VEHICLE TO A SAFE STOP LUCKILY WHILE PULLING INTO OUR DRIVEWAY . AFTER THIS WE HAD THE CAR TOWED TO THE DEALER AND WERE TOLD WE NEEDED A NEW "HCU" UNIT AND MASTER CYLINDER WITH A TOTAL REPAIR COST OF $4K+. I DECIDED TO DO SOME RESEARCH AND DISCOVERED MANY CASES OF THE EXACT SAME THING HAPPENING WITH THE SAME YEAR AND MODEL ESCAPE. WE ARE GOING TO WAIT A FEW DAYS TO THINK BEFORE MOVING FORWARD WITH THE REPAIR. *TR
Occurrences: 1Injuries: 0
Fail Date: 02/24/2010Deaths: 0
Date added to datbase: 2/25/2010 

ODI Case Number: 10324854
Component: SERVICE BRAKES, ELECTRIC
Details: 2005 FORD ESCAPE HYBRID CAR HAS 65,000 MILES ON IT WITH NO HISTORY OF BRAKE TROUBLE. COMING DOWNILL THE ABS/BRAKE LIGHTS CAME ON ALONG WITH AN ALARM AND IMMEDIATE LOSS OF THE BRAKES. HAD TO USE MECHANICAL EMERGENCY BRAKES TO STOP. CALLED DEALERSHIP NEXT MORNING TO TOW IT IN, THEN READ ON LINE TO TRY RESTARTING THE CAR THE NEXT DAY AND THE PROBLEM MIGHT BE GONE. CAR STARTED, NO BRAKE ISSUES APPARENT (NO LIGHTS, BRAKES FUNCTIONAL) SO DROVE IT TO DEALERSHIP FOR REVIEW/REPAIR. TOOK COPIES OF ONLINE RESEARCH SHOWING THIS IS AN ISSUE WITH THE CAR. DEALERSHIP CLAIMED IT WAS THE REAR AIR CONDITIONER (HOLE IN THE EVAPORATOR CORE) - THEY HAD REPAIRED THE AC 4 MONTHS PREVIOUSLY, WHICH ONLY LASTED FOR 6 WEEKS. PLANNED TO HAVE THEM REPAIR IT AT THE 65,000 MILE SERVICE ANYWAY. PAID $1033. DROVE CAR HOME THAT NIGHT AND THE ABS/BRAKE LIGHTS WENT ON, ALARM SOUNDED BUT THIS TIME NOT A TOTAL LOSS OF BRAKES. INSTEAD WHENEVER PRESSURE IS APPLIED TO THE BRAKE PEDAL, THERE IS A LOUD THUMPING NOISE FROM THE FRONT BRAKES AND SHUDDERING THROUGHOUT THE CAR. PLAN IS TO RETURN TO DEALERSHIP AFTER THE WEEKEND AND BRING LATEST RESEARCH SHOWING FAULTY HCU UNITS HAVE BEEN FOUND TO BE AN UNDERLYING CAUSE, WHICH FORD IS DENYING. *TR
Occurrences: 1Injuries: 0
Fail Date: 03/31/2010Deaths: 0
Date added to datbase: 4/10/2010 

It would appear as though all of these cases are related to the problem as described in Ford's Technical Service Bulletin TSB 0585 (issued August 5, 2005), which states:

ABS AND BRAKE WARNING LAMP ON WITH DTC C1526 - DTC C1524 MAY ALSO BE PRESENT VEHICLES BUILT PRIOR TO 2/11/2005

ISSUE: Some 2005 Escape Hybrid vehicles built prior to 2/11/2005, may exhibit the yellow ABS and the red brake warning lamps illuminating after the engine is started, and an increase in brake pedal effort. Diagnostic trouble code (DTC) C1526 (Brake Pedal Travel Sensor) will be present in the ABS module, C1524 (Brake Pedal Travel Sensor Calibration Incomplete) may also be present.

ACTION: Install a revised master cylinder. Refer to Workshop Manual Section 206-06.

PART NUMBER PART NAME: 5M6Z-2140-B Master Cylinder

My experience, and that of others, has been that the resolution also includes the replacement of the defective HCU. At this point, the repair of the poorly designed brake system is the sole responsibility of the vehicle owner. I believe that the only way Ford will address this important safety matter is if the NHTSA will take notice. If you have had a problem with the regenerative braking system on your Ford Escape or Mecury Mariner Hybrid, please consider notifying the NHTSA. By contacting the NHTSA, you may help bring this important safety matter to the attention of other owners of these vehicles.

Saturday, July 10, 2010

Improve Your Air Conditioner Efficiency. Clean that Evaporator Coil!

It's been a pretty hot summer here in the Mid-Atlantic. Temperatures have been in the high 90ºs for several days, and the humidity has often been unbearable. During this kind of uncomfortable weather, we are reminded how the contractor who built our house must have saved a few bucks by skimping on the size of the heat pump / air conditioner. The system is adequate for nine or ten months of the year, but in extreme heat or cold, it simply cannot keep up.

We've always been good about maintaining our HVAC system's components to get the most efficiency possible and to help save on our household energy costs. At a minimum, we keep the outdoor condensor unit clear of debris and give it a good water rinse several times each year. We also change the filter in the air handler on a regular basis, at least every three months if not more often during heavy heating and cooling periods.

It was during the most recent filter change that I had the idea to inspect the evaporator coil. You do know what an evaporator coil is, right? [grin] Okay. If you are not familiar with how a heat pump / air conditioner works, here is a really (really) short primer.

A heat pump / air conditioner works on the basic principle of heat transfer. The device moves heat from one place to another; either from outside the house to inside (for heating) or from inside the house to outside (for cooling). This process is done by using refrigerant as the heat transfer medium, a compressor to move the refrigerant, and two sets of coils; one outside the home, the other inside. Although the components all make it look rather complicated, the concept and technology is really pretty simple.

I've already mentioned the outdoor condensor unit. Many people already understand the importance of keeping this device clear of debris and clean. It certainly helps that the unit is relatively large,  obvious, and many times kind of noisy. That serves as a good reminder to give it some attention.

The evaporator coil is just as important to the function of the heat pump / air conditioner. However, since it resides snugly inside the air handler hidden away in your house, it is rather inconspicuous and often ignored. In theory, if you use a good air filter and change it on a regular basis, the evaporator coil should remain clean and tidy. At least that is the theory that I always worked under.

I was prompted to look at the evaporator coil after I had noticed that the air conditioner had become less efficient over time. Even after changing the filter, the air flow from the vents throughout the house was not as cool or as strong as I expected it to be. I knew that there was a problem and suspected that the compressor was failing or that the refrigerant was low. After disconnecting the electrical power to the compressor and the air handler, I removed the access panel to the evaporator coil. The first thing that I noticed was how very cold the evaporator coil was. The compressor and refrigerant level was obviously okay. Then I noticed how the filter really didn't fit that well. It was the correctly-sized filter for this air handler, but the design allows what I consider too much space around the filter's perimeter. Then, when I looked at the evaporator coil, I realized that the space around the filter was quite likely the source of my air conditioner's loss of efficiency.

To be fair, I have seen worse. In another house where I lived, the previous owners had removed the filter completely and operated the heat pump / air conditioner without one. The result was an evaporator coil that was almost entirely plugged. However, I was surprised at the amount of dust and debris collected on this evaporator coil since we had been so good about maintaining the filter.

I knew that I could carefully remove the obvious dirt with a vacuum and brush, but it would be difficult to adequately clean the critical area between the fins of the coil without some assistance. The space is very confined and too difficult to tackle with a water bath or spray, so I decided to use a solvent that was made for the job.

The local home improvement stores were well-stocked with cleaning solutions for the outdoor condensor unit, but none of them seemed to have anything that was made for the evaporator coil located inside the house. I was very concerned about what I used to clean the evaporator coil. I had very legitimate concerns with the solvent's safety. Be certain what you use is non-flammable, non-conductive, and non-toxic. This is critical to your safety while performing the cleaning, and for the safety of the building inhabitants (both humans and pets) after you place the system back into operation. The risk of possible explosion, fire or toxic effects is real and must be carefully considered.

A day of research helped me to discover the Virginia Brand, Blast-A-Coil coil cleaner, distributed by Parker Hannifin Corporation and available for purchase on line from several industrial supply retailers, including Grainger. This solvent was perfect for the job. The coil cleaner comes in an 18 ounce aerosol can. It is made to clean grease, dirt, lint and other debris from the coil surface, and it does not require rinsing after application. More importantly, it is USDA accepted for use in federally inspected meat and poultry plants; it's safe to use indoors and around humans.

The Blast-A-Coil solvent is primarily trichloroethylene. This is a strong and effective cleaning agent, with an interesting history of being used as a medical anesthetic. Prolonged and repeated exposure to trichloroethylene can have serious health consequences, but it is considered safe to use in well-ventilated areas for short periods of time.

I purchased two cans of the cleaner, and recommend that quantity for a typical residential application. Before using the cleaner, I used a vacuum and stiff brush to carefully remove as much of the debris from the evaporator coil as possible. Then after placing a portable fan to blow fresh air in the direction of the air handler and donning safety glasses, I liberally applied the solvent cleaner. The contents discharged quickly from the can in a strong spray / stream, so it should be aimed and applied very carefully.

After allowing the residual solvent to completely evaporate, I inspected the newly cleaned coil. I was pleasantly surprised to observe that it was noticeably much cleaner! I reassembled the air handler, installed a new filter, and reconnected the electrical power to the compressor and air handler. Now it was time to test the air conditioner to see if my efforts made a difference.

Without an anemometer or air flow meter, I cannot provide an exact metric for the improvement. However, I can vouch that the temperature and volume of air coming from the vents throughout the house has greatly improved. And even though the heat pump / air conditioner is not as large as I would like, the unit we have installed is now much more efficient at heating and cooling the house helping us to be more comfortable and saving energy at the same time.

When diagnosing the operation of your heat pump / air conditioner, don't forget all of the components; especially those that stay tucked away inside the air handler in your house. Maybe your evaporator coil needs to be cleaned like ours did. Cleaning it of dirt and debris will make a real difference!

Thursday, June 17, 2010

Javascript Math Functions and Calculator Fun

It's been a few years since I have had to perform any real engineering work. As a senior member of a management consulting firm, my days seem to be focused on business development and project management. However, my wife recently requested some assistance to help develop a special feature for her blog site that got my coding juices flowing again.

My wife has an interest in health, wellness and fitness, and follows the point-counting process for tracking meals. She has used a spreadsheet version of a 'points calculator' and an on line PHP version that we found on a dedicated website, but she wanted a calculator that would be easily accessible to her website visitors. That was my clue to get involved.

With my engineering education and work experience, the majority of my programming experience has been in FORTRAN and machine code. Although I have also had the opportunity to dabble in a number of other languages over the past 30 years. Wanting to make the points calculator an easy plug-in for any blog hosting service that she would ever use, I knew that I would have to code something that could be called from HTML, or just go straight to Javascript and keep the code right within the web page.

I believe that Javascript offers many advantages for a number of typical website functions. There have been security concerns, especially with computers using the Microsoft Windows operating system, but those issues can normally be managed by keeping the operating system up-to-date and using current virus and malware protection; a practice that most computer users follow. Javascript security issues typically do not concern OS X or Linux users. Therefore, Javascript seemed to be the answer to my language question.

The points formula is often cited to follow this convention: Points = Calories / 50 + Fat Grams / 12 - Fiber Grams / 5, where Fiber Grams cannot be greater than 4. Simple enough calculation. The Javascript Math functions were only required to accommodate the Fiber Gram restriction and to round the final answer to one decimal position. Now the only trick was to pass the data between HTML and the Javascript routine.

I decided that the easiest way to accomplish the task was to use the HTML Form Tag, passing the input to a Javascript routine for processing. I was concerned about user input error, so I spent some extra time to code validation routines to make certain that the numeric fields are not blank or filled with non-numeric characters. An incorrect entry will open a dialog box with a warning message and highlight the entry field in error.

I was not familiar with performing more advanced math operations in Javascript. Fortunately, there are many fine sources found online to help educate me. One of my favorite resources for HTML, CSS and Javascript assistance is w3schools.com. Here I found a good introduction to the Javascript Math Object.

Without boring you with a narrative of the coding trial and error, the final version of the calculator, complete with the HTML for the Form, is presented below. The working version can be found at pointsinmylife.com. Forgive me for the use of Tables in the Form, but I found them to be the most effective method to get consistent presentation format results across different browsers.

<script type="text/javascript">
function Calculate(calories, fat, fiber, form)
{
if (form.calories.value == "" || isNaN(form.calories.value)) {
alert( "Please enter a valid number for Calories." );
form.calories.focus();
return false ;
}
if (form.fat.value == "" || isNaN(form.fat.value)) {
alert( "Please enter a valid number for Fat Grams." );
form.fat.focus();
return false ;
}
if (form.fiber.value == "" || isNaN(form.fiber.value)) {
alert( "Please enter a valid number for Fiber Grams." );
form.fiber.focus();
return false ;
}
var A = parseFloat(calories);
var B = parseFloat(fat);
var C = parseFloat(fiber);
form.points.value = Math.round (((A / 50) + (B / 12) - (Math.min(C,4) / 5)) * 10) / 10;
}
function ClearForm(form)
{
form.calories.value = "";
form.fat.value = "";
form.fiber.value = "";
form.points.value = "";
}
</script>
<form method="post">
<table>
<tr colspan="2">
<td width="80%">
Enter Calories:
</td>
<td width="20%" align="right">
<input type="TEXT" name="calories" size="3" />
</td>
</tr>
<tr colspan="2">
<td width="80%">
Enter Fat Grams:
</td>
<td width="20%" align="right">
<input type="TEXT" name="fat" size="3" />
</td>
</tr>
<tr colspan="2">
<td width="80%">
Enter Fiber Grams:
</td>
<td width="20%" align="right">
<input type="TEXT" name="fiber" size="3" />
</td>
</tr>
<tr colspan="2">
<td width="80%">
Calculated Points:
</td>
<td width="20%" align="right">
<input type="TEXT" name="points" size="3" readonly style="border: none; font-weight: bold; color: #990000; background: #99bb55;" />
</td>
</tr>
<tr colspan="2">
<td width="80%">
<input type="button" value="Clear Fields" name="ClearButton" onclick="ClearForm(this.form)" />
</td>
<td width="20%" align="right">
<input type="button" value="Calculate" name="CalculateButton" onclick="return Calculate(this.form.calories.value, this.form.fat.value, this.form.fiber.value, this.form);" />
</td>
</tr>
</table>
</form>
<br />