<!--
	prev1 = new Image (32,18);
	prev1.src = "/images/prev1.jpg";
	prev2 = new Image (32,18);
	prev2.src = "/images/prev2.jpg";
	
	next1 = new Image (32,18);
	next1.src = "/images/next1.jpg";
	next2 = new Image (32,18);
	next2.src = "/images/next2.jpg";
	
	gobtn1 = new Image (48,24);
	gobtn1.src = "/images/go1.jpg";
	gobtn2 = new Image (48,24);
	gobtn2.src = "/images/go2.jpg";

	function reload1(pgm, form){
		var val1=form.rv_type.options[form.rv_type.options.selectedIndex].value;
		var val2=form.rv_make.options[form.rv_make.options.selectedIndex].value;
		self.location = pgm + '?RVType=' + val1 + '&RVMake=' + val2;
	}

	function reload2(pgm, fld, srt, ordr){
		var val1=fld.options[fld.options.selectedIndex].value;
		self.location=pgm + '?sort_order=' + srt + '&order_by=' + ordr + '&cur_page=' + val1;
	}

	function mouseOver(fld, img) {
		fld.src = img;
	}

	function mouseOut(fld, img) {
		fld.src = img;
	}

	function open_window(url) {
		var w = 640, h = 480;

		if (document.all) {
			 /* the following is only available after onLoad */
			 w = document.body.clientWidth;
			 h = document.body.clientHeight;
		}
		else if (document.layers) {
			 w = window.innerWidth;
			 h = window.innerHeight;
		}

		var popW = 640, popH = 480;

		var leftPos = (w-popW)/2, topPos = (h-popH)/2;

		var NEW_WIN = null;

		NEW_WIN = window.open ("", "PhotoViewer", "toolbar=0,directories=0,status=0,menubar=0,scrollbars=1,resize=1");
		NEW_WIN.location.href = url;
	}

	function doClear(theText) {
		if (theText.value == theText.defaultValue) {
			theText.value = ""
		}
	}

  // Check if its a numeric key pressed.
	function isNumberKey(evt) {
		var charCode = (evt.which) ? evt.which : event.keyCode

		if (charCode > 31 && (charCode < 48 || charCode > 57)) return false;

		return true;
	}

  // Make sure that a required field is filled in.
  function checkFilled(textfield, fieldname) {
     if (textfield.value.length == 0) {
        alert("The field \"" + fieldname + "\" is required.");
        textfield.focus();
        textfield.select();
        return false;
     }
     return true;
  }
    
   // Check that a string contains only alphabetic characters
   function alphaOnly(theString) { 
     var OK = true;
     for (var i=0;i<theString.length;i++) {
        theChar = theString.charAt(i);
        if ( (theChar >= "a") && (theChar <= "z") )
           continue;
        if ( (theChar >= "A") && (theChar <= "Z") )
           continue;
        OK = false;
     }
     return OK;
   }

   // Check that a field contains only numeric characters
   function numbersOnly(theString) {
     var OK = true;
     for (var i=0;i<theString.length;i++) {
        theChar = theString.charAt(i);
        if ((theChar < "0") || (theChar > "9")) {
           OK = false;
           break;
        }
     }
    return OK;
  }

	function mask(str,textbox,loc,delim) {
		var locs = loc.split(',');

		for (var i = 0; i <= locs.length; i++) {
			for (var k = 0; k <= str.length; k++) {
				if (k == locs[i]){
					if (str.substring(k, k+1) != delim) {
						str = str.substring(0,k) + delim + str.substring(k,str.length)
					}
				}
			}
		}

		textbox.value = str
	}

	function hov(loc,cls){
		if(loc.className)
			loc.className=cls;
	}

	function findLinkByHref(href) {
		for (var i=0; i<document.links.length; i++) {
			if (document.links[i].href == href) return i;
		}
		return -1;
	}

	function changeLinkHref(id,newHref,oldHref) {
		if (document.links.length > 0) {
			if (document.getElementById) {
				document.getElementById(id).href = newHref;
			}
			else if (document.all) {
				document.all[id].href = newHref;
			}
			else {
				var index = findLinkByHref(oldHref);
				if (index > -1)
					document.links[index].href = newHref;
			}
		}
	}
//-->