/**include
//_javascript/js-wrapper.js;
//_javascript/load-wrapper.js;
*/
var form_find_clock = function (sPriceFrom, sPriceTo, sModel, nIdPriceFrom, nIdPriceTo, nIdModel, winWr)
{
    this.winWr   = typeof(winWr)   != "undefined" ? winWr : _wrapper;

    this.nIdPriceFrom	= nIdPriceFrom;
    this.nIdPriceTo		= nIdPriceTo;
    this.nIdModel		= nIdModel;

    this.sPriceFrom = sPriceFrom;
    this.sPriceTo	= sPriceTo;
    this.sModel	    = sModel;

    this.winWr.setOnloadListener(this);
}

form_find_clock.prototype = {

    onload : function(evtWr)
    {
		var oPriceFrom = this.winWr.getElement(this.nIdPriceFrom);
		var oPriceTo   = this.winWr.getElement(this.nIdPriceTo);
		var oModel     = this.winWr.getElement(this.nIdModel);

		if (oPriceFrom.elm.value == "") {
			oPriceFrom.elm.value = this.sPriceFrom;
			oPriceFrom.addListener(this, "onclick", "onclick").text = this.sPriceFrom;
			oPriceFrom.addListener(this, "onblur", "onblur").text = this.sPriceFrom;
		}
		if (oPriceTo.elm.value == "") {
			oPriceTo.elm.value = this.sPriceTo;
			oPriceTo.addListener(this, "onclick", "onclick").text = this.sPriceTo;
			oPriceTo.addListener(this, "onblur", "onblur").text = this.sPriceTo;
		}
		if (oModel.elm.value == "") {
			oModel.elm.value = this.sModel;
			oModel.addListener(this, "onclick", "onclick").text = this.sModel;
			oModel.addListener(this, "onblur", "onblur").text = this.sModel;
		}

    },

    onclick : function(evtWr, aData)
    {
    	if (evtWr.elmWr.elm.value == aData.text) {
    		evtWr.elmWr.elm.value = "";
    	}
    },

    onblur : function(evtWr, aData)
    {
    	if (evtWr.elmWr.elm.value == "") {
    		evtWr.elmWr.elm.value = aData.text;
    	}
    }
}
