<!-- hide script from old browsers
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

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<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
///////////////////////////////////////////////
	//quote array
	quoteList = new Array();
quoteList[0] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"To live with art such as this is humbling. Many thanks to you&hellip;\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Sloan</a>";
	quoteList[1] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"This item arrived today, in very good condition. Perfect packing and shipping!\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">E.H., Amsterdam</a>";
	quoteList[2] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"They look every bit as good in real life as the did on the Web.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">J.C.</a>";
	quoteList[3] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"It looks fabulous.  Truly wonderful.  My wife and I keep staring at it and smiling.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Mike</a>";
	quoteList[4] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Thanks again for making high quality work available!!\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">John</a>";
	quoteList[5] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"&hellip;an exciting addition to my collection!\"";
	quoteList[6] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"&hellip;First class, &hellip;let me know if you ever need testimonial or reference.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">J Freiman, USA</a>";
	quoteList[7] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"it is better than my highest hopes, really I mean this, and we are very pleased clients.!\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">D. Elliott</a>";
	quoteList[8] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Thank you again for your highly professional help!\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Eduardo C, Spain</a>";
	quoteList[9] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Thank you, I received the beautiful piece and love it!\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Janice</a>";
	quoteList[10] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Pablo arrived safe and sound&hellip; it is awesome! Thank you.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Robt</a>";
	quoteList[11] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Thank you for the great framing job. Your choice was perfect.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">G. Nash</a>";
	quoteList[12] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"It's arrived and it's lovely!\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Andrew</a>";
	quoteList[13] = "Check out the <a href=\"/blog\" title=\"fine art blog\">Masterworks Blog!</a>";
	quoteList[14] = "<a href=\"/blog/art-investments/tips-for-buying-fine-art/\" title=\"fine art investing\">New to art investing?</a>";
	quoteList[15] = "Can't decide? Sit back and enjoy our <a href=\"/slideshow.html\">gallery slideshow</a>.";
	quoteList[16] = "\"Only love interests me, and I am only in contact with things that revolve around love.\", <a href=\"/inventory/chagall\" title=\"Chagall lithographs\">Marc Chagall</a>";
	quoteList[17] = "\"Art is not what you see, but what you make others see.\", <a href=\"/inventory/degas\" title=\"Degas drawings\">Edgar Degas</a>";
	quoteList[18] = "\"It has bothered me all my life that I do not paint like everybody else.\", <a href=\"/inventory/matisse\" title=\"Matisse etchings\">Henri Matisse</a>";
	quoteList[19] = "\"Art is a lie that helps us to realize the truth.\", <a href=\"/inventory/picasso\" title=\"Picasso ceramics\">Pablo Picasso</a>";
	quoteList[20] = "\"Art washes from the soul the dust of everyday life.\", <a href=\"/inventory/picasso\" title=\"Picasso ceramics\">Pablo Picasso</a>";
	quoteList[21] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Viva magnific&oacute; Se&ntilde;or Adelman! This is better than I expected&hellip; thanks again&hellip;\" Joe L";
	quoteList[22] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Thank you Tara, and tell Alex thanks again for his generosity.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">D. S., Oregon</a>";
	quoteList[23] = "Begin your collection with a signed <b><a href=\"/inventory/chagall\">Chagall lithograph</a></b>";
	quoteList[24] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"I LOVE it! It's better in person. I'm saving up my money for my next purchase!\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Greg K</a>";
	quoteList[25] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"It still delights me and every evening I stand in front of it for a few moments before retiring.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">John</a>";
	quoteList[26] = "<a href=\"/art/printmaking.html#2-lithograph\">Lithograph</a>: one of the oldest methods of printmaking. Drawn or painted on stone, with a...";
	quoteList[27] = "<a href=\"/blog/\" title=\"fine art blog\">Protect your assets</a> from rising inflation by investing in tangible assets like gold and fine art.";
	quoteList[28] = "<a href=\"/blog/\" title=\"fine art blog\">Protect your assets</a> from rising inflation by investing in tangible assets like gold and fine art.";
	quoteList[29] = "<a href=\"/blog/\" title=\"fine art blog\">Protect your assets</a> from rising inflation by investing in tangible assets like gold and fine art.";
	quoteList[30] = "<a href=\"/blog/\" title=\"fine art blog\">Protect your assets</a> from rising inflation by investing in tangible assets like gold and fine art.";
	quoteList[31] = "<a href=\"/blog/\" title=\"fine art blog\">Protect your assets</a> from rising inflation by investing in tangible assets like gold and fine art.";
	quoteList[32] = "<a href=\"/blog/\" title=\"fine art blog\">Protect your assets</a> from rising inflation by investing in tangible assets like gold and fine art.";
	quoteList[33] = "Free annual appraisals, 100% refund policy, and of course no Sales BS, just the facts. <a href=\"/buying/index.html\" title=\"Buy fine art\">Learn more</a>";
	quoteList[34] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Excellent and comprehensive answers to my numerous questions. You are thorough and professional.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Eric</a>";
	quoteList[35] = "Give love. Give art. It is a most impressive gift for someone you care for deeply.";
	quoteList[36] = "17th century <a href=\"/inventory/rembrandt\">Rembrandt etchings</a> carry with them centuries of history and art.";
	quoteList[37] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"I received the Lautrec and it's obviously even lovelier vis-a-vis.\"";
	quoteList[38] = "Some people buy art simply because they fall in love with it.";
	quoteList[39] = "Some people buy art simply because they fall in love with it.";
	quoteList[40] = "Some people buy art simply because they fall in love with it.";
	quoteList[41] = "Some people buy art simply because they fall in love with it.";
	quoteList[42] = "Some people buy art simply because they fall in love with it.";
	quoteList[43] = "We offer over 30 impressive <a href=\"/inventory/picasso\">Picasso ceramics</a> in our collection.";
	quoteList[44] = "\"It has bothered me all my life that I do not paint like everybody else.\", <a href=\"/inventory/matisse\" title=\"Matisse etchings\">Henri Matisse</a>";
	quoteList[45] = "\"It has bothered me all my life that I do not paint like everybody else.\", <a href=\"/inventory/matisse\" title=\"Matisse etching\">Henri Matisse</a>";
	quoteList[46] = "\"When Matisse dies, Chagall will be the only painter left who understands what color is.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[47] = "As one of our most celebrated American modern artists, we carry several beautiful <a href=\"/inventory/calder\">Calder lithographs</a>.";
	quoteList[48] = "As one of our most celebrated American modern artists, we carry several beautiful <a href=\"/inventory/calder\">Calder lithographs</a>.";
	quoteList[49] = "As one of our most celebrated American modern artists, we carry several beautiful <a href=\"/inventory/calder\">Calder lithographs</a>.";
	quoteList[50] = "As one of our most celebrated American modern artists, we carry several beautiful <a href=\"/inventory/calder\">Calder lithographs</a>.";
	quoteList[51] = "As one of our most celebrated American modern artists, we carry several beautiful <a href=\"/inventory/calder\">Calder lithographs</a>.";
	quoteList[52] = "As one of our most celebrated American modern artists, we carry several beautiful <a href=\"/inventory/calder\">Calder lithographs</a>.";
	quoteList[53] = "View these <a href=\"/inventory/calder\">Calder lithographs</a>, from one of our most celebrated American modern artists, Alexander Calder.";
	quoteList[54] = "\"When Matisse dies, Chagall will be the only painter left who understands what color is.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[55] = "\"When Matisse dies, Chagall will be the only painter left who understands what color is.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[56] = "\"When Matisse dies, Chagall will be the only painter left who understands what color is.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[57] = "\"When Matisse dies, Chagall will be the only painter left who understands what color is.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[58] = "\"&hellip;there's never been anybody since Renoir who has a feeling for light that Chagall has.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[59] = "\"&hellip;there's never been anybody since Renoir who has a feeling for light that Chagall has.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[60] = "\"&hellip;there's never been anybody since Renoir who has a feeling for light that Chagall has.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[61] = "\"&hellip;there's never been anybody since Renoir who has a feeling for light that Chagall has.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[62] = "\"&hellip;there's never been anybody since Renoir who has a feeling for light that Chagall has.\", <a href=\"/inventory/picasso\" title=\"Picasso etching\">Pablo Picasso</a>";
	quoteList[63] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"&hellip; the Miro arrived today and is now safely on the living room wall. Thank you for a wonderful transaction.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">W.C.</a>";
	quoteList[64] = "In 1947, <a href=\"/inventory/vasarely\">Vasarely</a> discovers that geometric forms can evoke a new perception of space, matter and energy.";
	quoteList[65] = "\"Art is the unceasing effort to compete with the beauty of flowers -- and never succeeding.\", <a href=\"/inventory/chagall\">Marc Chagall</a>";
	quoteList[66] = "\"No, painting is not made to decorate apartments, it's an offensive and defensive weapon against the enemy.\", <a href=\"/inventory/picasso\">Pablo Picasso</a>";
	quoteList[67] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"They arrived! Everything is so much more beautiful than how it appears on the photographs.\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">L.</a>";
	quoteList[68] = "Calder's \"WTC Stabile\" was destroyed by the collapse of the World Trade Centers on September 11, 2001.";
	quoteList[69] = "Miro's \"World Trade Center Tapestry\" adorned the lobby of 2 WTC and was destroyed when the tower collapsed on 9/11/01.";
	quoteList[70] = "\"Whenever I bent over the lithography stone&hellip; It seemed as though I could pour all my sadness and joys into it.\", <a href=\"/inventory/chagall\" title=\"Chagall Prints\">Marc Chagall</a>";
	quoteList[71] = "<img src=\"/images/fine-art-customer-comment.gif\"style=\"vertical-align:text-bottom\" alt=\"Fine art customer quote\" />\"Thank you so much for making sure that everything pertaining to our transaction moved along so smoothly!\" <a href=\"/about/testimonials.html\" title=\"fine art gallery reviews\">Melissa</a>";


var now = new Date();
	var secs = now.getSeconds();
	var raw_random_number = Math.random(secs);
	var random_number = Math.round(raw_random_number * (quoteList.length));

	if (random_number == quoteList.length){random_number = 0}
	var quote = quoteList[random_number];
///////////////////////////////////////////////
/* Mike West - http://mikewest.org/ Released under a CC license - http://creativecommons.org/licenses/by/2.0/ */
            function handleEvent(obj, event, func) {
                try {
                    obj.addEventListener(event, func, false);
                } catch (e) {
                    if (typeof eval("obj.on"+event) == "function") {
                        var existing = obj['on'+event];
                        obj['on'+event] = function () { existing(); func(); };
                    } else {
                        obj['on'+event] = func;                        
                    }
                }
            } 
            
            function TypeAheadSelect() {
                var self = this;
            
                self.instantiate = function () {
                    var allSelects = document.getElementsByTagName('select');
                    for (var i = 0; i < allSelects.length; i++) {
                         if (allSelects[i].getAttribute('typeAheadable')) {
                            self.addFilter(allSelects[i]);
                        }
                    }
                }
            
                self.addFilter = function(obj) {
                    // Find the input box
                 var inputBoxes = document.getElementsByName('t2');
                    // Create the element
		typeAheadInput = inputBoxes[0];
		typeAheadInput.setAttribute("value","");
                    /*
                        This is important: we set the 'haystack' property of our INPUT
                        element to a reference to our master SELECT element.  This powerful
                        feature of JavaScript enables us to talk to the SELECT element 
                        in our INPUT element's event handler, which is critical.
                        
                        We'll see later where `obj` is coming from.  For the moment, just 
                        keep it in mind as a question I need to answer for you.
                    */
                    typeAheadInput.haystack = obj;
                    /*
                        The heavy stuff: this binds an anonymous function to the INPUT
                        element's onkeyup event in order to intercept the keypresses 
                        and parse them in order to determine what to do.
                    */
                    handleEvent(
                        typeAheadInput, 
                        'keyup',
                        function(e) {
                            if (!e) {
                                /*
                                    If `e` wasn't set, then we know that we're using the Internet
                                    Explorer style event model.  So, we'll have to do a little work
                                    to merge the two systems together.
                                */
                                e= window.event;
                            }
                            var theInput = this;
                            var keycode = e.keyCode;
                            switch (keycode) {
                                case 38: // up arrow
                                    /*
                                        We want to respond to the up arrow by moving the current 
                                        value up one in our list.  But we don't want to run off 
                                        the top of the list, so we get the maximum value: 0, or 
                                        the currentIndex - 1.  So if we're at the 8th value, 
                                        we'll move to the 7th, but if we're already at the top, 
                                        we'll stay at the 0th (numbering starts at 0 in JavaScript)
                                    */
                                    var newIndex = Math.max(0, theInput.haystack.currentIndex-1);
                                    theInput.haystack.currentIndex  = newIndex;
                                    theInput.haystack.selectedIndex = newIndex;
                                    /*
                                        We'll also need to clear out our current filter, since 
                                        we've messed with the position in the list.  If we didn't
                                        do this, some of our later optimizations would die horribly.
                                    */
                                    theInput.haystack.currentFilter = "";
                                    break;
                                case 40: // down arrow
                                    /*
                                        Same thing as the up arrow here, except we want to get 
                                        the minimum value between the last element in the list, 
                                        and the currentIndex + 1 to make sure we don't run off
                                        the end.
                                    */
                                    var newIndex = Math.min(theInput.haystack.options.length-1, theInput.haystack.currentIndex+1);
                                    theInput.haystack.currentIndex  = newIndex;
                                    theInput.haystack.selectedIndex = newIndex;
                                    theInput.haystack.currentFilter = "";
                                    break;
                                case 13: // enter
                                    /*
                                        If we hit enter, tell our containing DIV to hide itself
                                    */
                                    theInput.parentNode.style.display = "none";
                                    break;
                                default:
                                    /*
                                        If it's not the up/down arrow, or the enter key, then process
                                        it by telling the SELECT box to set itself to the correct value.
                                        We'll talk about telling the SELECT element how to do that in 
                                        a few moments.
                                        
                                        The timeout code is here in order to deal with fast typists: we
                                        don't want to tell the SELECT box to filter itself for every keypress
                                        if we're in the middle of typing a word.  That would slow things 
                                        and potentially cause problems if the value of the INPUT field 
                                        changed during the middle of an event.  So we store a timer that
                                        waits 25 milliseconds before telling the SELECT object (stored in 
                                        this.haystack) to filter itself using the currently typed-in text.
                                        
                                        Every time a key is pressed, we clear out that timer, and reset it
                                        for another 25 milliseconds.  That solves our problem.
                                    */
                                    clearTimeout(theInput.timer);
                                    theInput.timer = setTimeout(
                                                    "document.getElementById('" +
                                                    theInput.haystack.id + 
                                                    "').filterSelf('" +
                                                    theInput.value +
                                                    "')", 
                                                    25
                                    );
                                    break;
                            }
                        }
                    );
  
                    obj.filterSelf = function (needle) {
                        /*
                            If we've backspaced or deleted all the text in the 
                            INPUT field, then we need to do one of two things:
                                If our SELECT is a multi-select box, then we set
                                the selectedIndex to -1 in order to deselect all
                                the options.  Otherwise, we set it to 0 to choose
                                the first option in the list.
                        */
                        if (needle == "") {
                            obj.currentIndex  = 0;
                            obj.selectedIndex = (obj.getAttribute("multiple") == "multiple")?-1:0;
                            this.currentFilter = "";
                            return;
                        }
                        // we lower-case the needle text so that our comparisons make sense.
                        needle = needle.toLowerCase();
                        /*
                            I've gone with a binary search technique here, because it's generally 
                            pretty darn fast on large arrays.  This is the main reason we require
                            a sorted list, since a binary search can only work when items are in
                            order.  In a nutshell, the technique is this:
                                To begin, set `high` to the end of the list (this.options.length), 
                                and `low` to the beginning of the list (0).  Then pick the middle
                                element.  If that item is higher than the value you're looking for,
                                then your value must be before it in the list.  So reset `high` or
                                `low` to the index of the current element, and repeat until you 
                                find your value, or run out of items.
                
                                At the end of the search routine, we'll either have a value of -1, 
                                or an index.
                        */
                        theIndex = "";
                        if (this.currentFilter == "") {
                            var low = -1;
                            var high = this.options.length;
                        } else if (needle < this.currentFilter) {
                            var low  = -1
                            var high = this.currentIndex;
                        } else if (needle > this.currentFilter) {
                            var low = this.currentIndex;
                            var high = this.options.length;
                        }
                        if (high == 1) {
                            if (this.options[0].text.toLowerCase() == needle) {
                                theIndex = 1;
                            } else {
                                theIndex = 0;
                            }
                        }
                        high = high - 1;
                        if (theIndex == "") {
                            for (;(high-low>1) && (theIndex == "");) {
                                var j = Math.floor((high+low)/2);
                                if (needle <= this.options.item(j).text.toLowerCase()) {
                                    high = j;
                                } else {
                                    low = j;
                                }
                            }
                            if (needle == this.options.item(high).text.toLowerCase()) {
                                theIndex = high;
                            } else {
                                theIndex = low;
                            }
                        }
                        /*
                            If theIndex is -1, then we've got nothing, so set the currentIndex to
                            0.  Else, if we've found the value, set the currentIndex to theIndex.
                            Else, we ended up somewhere in the middle of the list, but didn't find
                            the value we were looking for.  In that case, set the currentIndex to 
                            the value just after the one we ended up on.
                        */        
                        if (theIndex == -1 || needle == this.options[theIndex].text.toLowerCase()) {
                            this.currentIndex  = Math.max(theIndex, 0);
                            this.selectedIndex = Math.max(theIndex, 0);
                        } else {
                            this.currentIndex  = Math.max(theIndex+1, 0);
                            this.selectedIndex = Math.max(theIndex+1, 0);
                        }
                    }
                    obj.currentIndex = 0;
                    obj.currentFilter = "";
             //       obj.parentNode.insertBefore(toggleButton, obj);
             //       obj.parentNode.insertBefore(typeAheadBox, obj);
             //       obj.parentNode.insertBefore(obj, toggleButton);
                }
                handleEvent(window, "load", self.instantiate);
            }
            
            var typeAheadThing = new TypeAheadSelect();
///////////////////////////////////////////////

function doInputCheck(field,valid) {
        var ok = "yes";
        var temp;
        for (var i=0; i<field.value.length; i++) {
        	temp = "" + field.value.substring(i, i+1);
                if (valid.indexOf(temp) == "-1") ok = "no";
        
        	if (ok == "no") {
        	 field.value = field.value.substring(0, i);
		}
        }
}
///////////////////////////////////////////////

<!-- Copyright 2002 Bontrager Connection, LLC
function getCalendarDate()
{
   var months = new Array(13);
   months[0]  = "January";
   months[1]  = "February";
   months[2]  = "March";
   months[3]  = "April";
   months[4]  = "May";
   months[5]  = "June";
   months[6]  = "July";
   months[7]  = "August";
   months[8]  = "September";
   months[9]  = "October";
   months[10] = "November";
   months[11] = "December";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   var dateString = monthname +
                    ' ' +
                    monthday +
                    ', ' +
                    year;
   return dateString;
} // function getCalendarDate()

function getClockTime()
{
   var now    = new Date();
   var hour   = now.getHours();
   var minute = now.getMinutes();
   var second = now.getSeconds();
   var ap = "AM";
   if (hour   > 11) { ap = "PM";             }
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
   var timeString = hour +
                    ':' +
                    minute +
                    ':' +
                    second +
                    " " +
                    ap;
   return timeString;
} // function getClockTime()
//-->

var calendarDate = getCalendarDate();
var clockTime = getClockTime();
/*document.write('Time is ' + clockTime);*/
///////////////////////////////////////////////

//var countrieslist=document.classic.countries
//var citieslist=document.classic.cities
function updatecities(indexNum,selectedcitygroup,price,pieceid){

var currency_symbol=new Array()
//usd
currency_symbol[0]=["$"]
//eur
currency_symbol[1]=["&euro;"]
//gbp
currency_symbol[2]=["&pound;"]
//jpy
currency_symbol[3]=["&yen;"]
//cny
currency_symbol[4]=["<img src=\"/images/flags/currency_cn.gif\" alt=\"CNY\" style=\"vertical-align:middle;\" />"]
//rub
currency_symbol[5]=[""]


var currency_flag=new Array()
//usd
currency_flag[0]=["us"]
//eur
currency_flag[1]=["eu"]
//gbp
currency_flag[2]=["gb"]
//jpy
currency_flag[3]=["jp"]
//cny
currency_flag[4]=["cn"]
//rub
currency_flag[5]=["ru"]

var amount = Math.round(selectedcitygroup*price*100)/100;
//if amount is NOT a whole number, then round to 2 decimal places
if (amount != Math.round(amount))
amount = amount.toFixed(2);

document.getElementById("c"+pieceid).innerHTML = currency_symbol[indexNum]+addCommas(amount)+"&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"/images/flags/flag_"+currency_flag[indexNum]+".gif\" />";

document.getElementById("d"+pieceid).innerHTML = currency_symbol[indexNum]+addCommas(amount);

}





function updatecitiesSale(indexNum,selectedcitygroup,price,pieceid,salepercentage){

var currency_symbol=new Array()
//usd
currency_symbol[0]=["$"]
//eur
currency_symbol[1]=["&euro;"]
//gbp
currency_symbol[2]=["&pound;"]
//jpy
currency_symbol[3]=["&yen;"]
//cny
currency_symbol[4]=["<img src=\"/images/flags/currency_cn.gif\" alt=\"CNY\" style=\"vertical-align:middle;\" />"]
//rub
currency_symbol[5]=[""]


var currency_flag=new Array()
//usd
currency_flag[0]=["us"]
//eur
currency_flag[1]=["eu"]
//gbp
currency_flag[2]=["gb"]
//jpy
currency_flag[3]=["jp"]
//cny
currency_flag[4]=["cn"]
//rub
currency_flag[5]=["ru"]

var amount = Math.round(selectedcitygroup*price*100)/100;
//if amount is NOT a whole number, then round to 2 decimal places
if (amount != Math.round(amount))
amount = amount.toFixed(0);

document.getElementById("c"+pieceid).innerHTML = currency_symbol[indexNum]+addCommas(amount)+"&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"/images/flags/flag_"+currency_flag[indexNum]+".gif\" />";

amount = amount*(100-salepercentage)/100;
amount = amount.toFixed(0);


document.getElementById("d"+pieceid).innerHTML = currency_symbol[indexNum]+addCommas(amount);

}









function changeText(selectedcitygroup){
	document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';
}
///////////////////////////////////////////////

function addCommas(nStr)
{
	nStr += '';
	x = nStr.split('.');
	x1 = x[0];
	x2 = x.length > 1 ? '.' + x[1] : '';
	var rgx = /(\d+)(\d{3})/;
	while (rgx.test(x1)) {
		x1 = x1.replace(rgx, '$1' + ',' + '$2');
	}
	return x1 + x2;
}
// end hiding script from old browsers -->






function validateFormOnSubmitContact(theForm) {
var reason = "";

  reason += validateEmail(theForm.email);
  reason += validateSubject(theForm.subject);
  reason += validateMessage(theForm.message);
      
  if (reason != "") {
    alert("Some fields need correction:\n" + reason + "\n\nWe do not share your information with \nany third parties without your consent. \nWe value your privacy and appreciate \nyour trust in our company.");
    return false;
  }

  return true;
}


function validateFormOnSubmit(theForm) {
var reason = "";

  reason += validateUsername(theForm.username);
  reason += validateEmail(theForm.email);
  reason += validatePhone(theForm.phone);
      
  if (reason != "") {
    alert("Some fields need correction:\n" + reason + "\n\nWe do not share your information with \nany third parties without your consent. \nWe value your privacy and appreciate \nyour trust in our company.");
    return false;
  }

  return true;
}


function validateFormOnSubmitPurchase(theForm) {
var reason = "";

  reason += validateUsername(theForm.namer);
  reason += validateEmail(theForm.email);
  reason += validatePhone(theForm.phone);
  reason += validateMessage(theForm.message);
  reason += validateMailingaddress(theForm.mailingaddress);
  reason += validateMailingaddress2(theForm.mailingaddress2);
  reason += validateMailingaddress3(theForm.mailingaddress3);
  reason += validateMailingaddress4(theForm.mailingaddress4);
  reason += validateZipcode(theForm.zipcode);

      
  if (reason != "") {
    alert("Some fields need correction:\n" + reason + "\n\nWe do not share your information with \nany third parties without your consent. \nWe value your privacy and appreciate \nyour trust in our company.");
    return false;
  }

  return true;
}


function validateFormOnSubmitRsvp(theForm) {
var reason = "";

  reason += validateUsername(theForm.namer);
  reason += validateEmail(theForm.email);
  reason += validatePhone(theForm.phone);
  reason += validateMessage(theForm.message);

      
  if (reason != "") {
    alert("Some fields need correction:\n" + reason + "\n\nWe do not share your information with \nany third parties without your consent. \nWe value your privacy and appreciate \nyour trust in our company.");
    return false;
  }

  return true;
}


function validateFormOnSubmitEmail(theForm) {
var reason = "";

  reason += validateUsername(theForm.name);
  reason += validateEmail(theForm.email);
  reason += validateUsername(theForm.friendName);
  reason += validateEmail(theForm.friendEmail);
  reason += validateMessage(theForm.message);
      
  if (reason != "") {
    alert("Some fields need correction:\n" + reason + "\n\nWe do not share your information with \nany third parties without your consent. \nWe value your privacy and appreciate \nyour trust in our company.");
    return false;
  }

  return true;
}


function validateEmpty(fld) {
    var error = "";
 
    if (fld.value.length == 0) {
        fld.style.background = '#88d9ff'; 
        error = "The required field has not been filled in.\n"
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;  
}


function validateUsername(fld) {
    var error = "";
    var illegalChars = /\W/; // allow letters, numbers, and underscores
 
    if (fld.value == "") {
        fld.style.background = '#88d9ff'; 
        error = "Please enter your name.\n";
    } else if ((fld.value.length < 2) || (fld.value.length > 99)) {
        fld.style.background = '#88d9ff'; 
        error = "The name you entered is too short. Please enter your name again.\n";
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}





function trim(s)
{
  return s.replace(/^\s+|\s+$/, '');
}

function validateEmail(fld) {
    var error="";
    var tfld = trim(fld.value);                        // value of field with whitespace trimmed off
    var emailFilter = /^[^@]+@[^@.]+\.[^@]*\w\w$/ ;
    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;
   
    if (fld.value == "") {
        fld.style.background = '#88d9ff';
        error = "Please enter an email address.\n";
    } else if (!emailFilter.test(tfld)) {              //test email for illegal characters
        fld.style.background = '#88d9ff';
        error = "Please enter a valid email address.\n";
    } else if (fld.value.match(illegalChars)) {
        fld.style.background = '#88d9ff';
        error = "The email address contains illegal characters. Please enter a valid email address.\n";
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}


function validatePhone(fld) {
    var error = "";
    var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');    

   if (fld.value == "") {
        error = "Please enter a phone number.\n";
        fld.style.background = '#88d9ff';
    } else if (isNaN(parseInt(stripped))) {
        error = "The phone number contains illegal characters.\n";
        fld.style.background = '#88d9ff';
    } else if (stripped.length < 10) {
        error = "The phone number is the wrong length. Make sure you included an area code.\n";
        fld.style.background = '#88d9ff';
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}


function validateMessage(fld) {
    var error = "";
    var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');    

	if(fld.value.indexOf("[url=")!=-1) {
        error = "The message contains spam characters.\n";
        fld.style.background = '#88d9ff';
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}

function validateMailingaddress(fld) {
    var error="";
    var tfld = trim(fld.value);                        // value of field with whitespace trimmed off
    var emailFilter = /^[^@]+ [^@]*$/ ;
    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;
   
    if (fld.value == "") {
        fld.style.background = '#88d9ff';
        error = "Please enter a mailing address.\n";
    } else if (!emailFilter.test(tfld)) {              //test email for illegal characters
        fld.style.background = '#88d9ff';
        error = "Please enter a valid mailing address.\n";
    } else if (fld.value.match(illegalChars)) {
        fld.style.background = '#88d9ff';
        error = "The mailing address contains illegal characters. Please enter a valid mailing address.\n";
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}

function validateMailingaddress2(fld) {
    var error="";
    var tfld = trim(fld.value);                        // value of field with whitespace trimmed off
    var emailFilter = /^[^@]*$/ ;
    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;
   
    if (fld.value == "") {
        fld.style.background = '#88d9ff';
        error = "Please enter a mailing address.\n";
    } else if (!emailFilter.test(tfld)) {              //test email for illegal characters
        fld.style.background = '#88d9ff';
        error = "Please enter a valid mailing address.\n";
    } else if (fld.value.match(illegalChars)) {
        fld.style.background = '#88d9ff';
        error = "The mailing address contains illegal characters. Please enter a valid mailing address.\n";
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}

function validateMailingaddress3(fld) {
    var error="";
    var tfld = trim(fld.value);                        // value of field with whitespace trimmed off
    var emailFilter = /^[^@]*$/ ;
    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;
   
    if (fld.value == "") {
        fld.style.background = '#88d9ff';
        error = "Please choose a state.\n";
    } else if (!emailFilter.test(tfld)) {              //test email for illegal characters
        fld.style.background = '#88d9ff';
        error = "Please choose a state.\n";
    } else if (fld.value.match(illegalChars)) {
        fld.style.background = '#88d9ff';
        error = "The mailing address contains illegal characters. Please enter a valid mailing address.\n";
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}


function validateZipcode(fld) {
    var error = "";
    var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');    

   if (fld.value == "") {
        error = "Please enter a ZIP code.\n";
        fld.style.background = '#88d9ff';
    } else if (isNaN(parseInt(stripped))) {
        error = "Please use only NUMBERS for ZIP code.\n";
        fld.style.background = '#88d9ff';
    } else if (stripped.length < 2) {
        error = "The ZIP code is the wrong length.\n";
        fld.style.background = '#88d9ff';
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}




function validateMailingaddress4(fld) {
    var error="";
    var tfld = trim(fld.value);                        // value of field with whitespace trimmed off
    var emailFilter = /^[^@]*$/ ;
    var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/ ;
   
    if (fld.value == "") {
        fld.style.background = '#88d9ff';
        error = "Please choose a country.\n";
    } else if (!emailFilter.test(tfld)) {              //test email for illegal characters
        fld.style.background = '#88d9ff';
        error = "Please choose a country.\n";
    } else if (fld.value.match(illegalChars)) {
        fld.style.background = '#88d9ff';
        error = "The mailing address contains illegal characters. Please enter a valid mailing address.\n";
    } else {
        fld.style.background = '#e7e7ce';
    }
    return error;
}

function validateSubject(fld) {
    var error = "";
    var stripped = fld.value.replace(/[\(\)\.\-\ ]/g, '');

	if(fld.value.indexOf("[url=")!=-1) {
        error = "The message contains spam characters.\n";
        fld.style.background = '#88d9ff';
    } else {
        fld.style.background = '#e7e7ce';
    }
	
	if(fld.value == "")
	{
	error = "Please fill in a subject.\n";
	fld.style.background = '#88d9ff';
	}
    return error;
}



function mouseOver(theid)
{
var str=document.getElementById(theid).src;

str=(str.replace(".gif", "-over.gif"));
document.getElementById(theid).src=str;
}
function mouseOut(theid)
{
var str=document.getElementById(theid).src;

str=(str.replace("-down.gif", ".gif"));
str=(str.replace("-over.gif", ".gif"));
document.getElementById(theid).src=str;
}
function mouseClick(theid)
{
var str=document.getElementById(theid).src;

str=(str.replace("-over.gif", "-down.gif"));
document.getElementById(theid).src=str;
}
function mouseUp(theid)
{
var str=document.getElementById(theid).src;

str=(str.replace("-down.gif", ".gif"));
document.getElementById(theid).src=str;
}



function mouseOverPrev(theid)
{
        theid.style.background = '#e7e7ce';
}
function mouseOutPrev(theid)
{
        theid.style.background = '#f00';
}


































/*
 * jCountdown
 * Creates a countdown timer from a jQuery object. Allows you to format
 * the way the time is displayed.
 *
 * $(<selector>).countdown({params});
 *
 * If you want to replace the 
 *
 */
jQuery.fn.countdown = function(params) {
    var self = this;

    //Properties
    //----------------------------------------------            
    //set the time and day to work with
    self.display = $(this);    
    self.target = new Date(params.date);        
    self.message = params.message?params.message:"It's Here!!";
    self.addZeros = params.addZeros?params.addZeros:false;
            
    //Events
    //----------------------------------------------
    self.onTick = params.onTick?params.onTick:function() { return true; };
    self.onFinish = params.onFinish?params.onFinish:function() { return true; };

    //Methods
    //----------------------------------------------   
    //Updates the text for the countdown timer
    self._tick = function() {

        //get the time difference
        var now = (self.target - new Date());
        
        //make sure success hasn't been reached
        if (now.valueOf() < 0) {

            //clear the interval and run the event
            window.clearInterval(self._interval);
            if (!self.onFinish(self.display)) { return; }
            
            //display the finish message
            self.display.html(self.message);
            return;
            
        };
        
        //update the values
        var seconds = now.valueOf()/1000;        
        var day = (Math.floor(seconds/86400))%86400;
        var hrs = (Math.floor(seconds/3600))%24;
        var min = (Math.floor(seconds/60))%60;
        var sec = (Math.floor(seconds/1))%60;
                
        //run the event if needed
        if (!self.onTick(self.display,day,hrs,min,sec)) { return; }; 
        
        //check for zeros
        if (self.addZeros) {
            hrs = (hrs+"").length<2?"0"+hrs:hrs;
            min = (min+"").length<2?"0"+min:min;
            sec = (sec+"").length<2?"0"+sec:sec;
        };
                
        //display the new time
        self.display.html(
            day+"<span>days</span>"+
            hrs+"<span>hrs</span>"+
            min+"<span>min</span>"+
            sec+"<span>sec</span>"
            );
    };
    
    
    //Setup Routine
    //----------------------------------------------
    self._interval = window.setInterval(
        self._tick,
        params.interval?params.interval:1000
        );
        
    //run immediately by default
    if (!params.delayStart) { self.update(); };

    //return itself
    return this;

};



/*
TargetDate = "10/11/2009 12:00 AM";
BackColor = "palegreen";
ForeColor = "navy";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "It is finally here!";
*/


