function modalNotCloneItem(idWindow, arrOpen, arrClose, showText, winWr) {
    this.winWr    = typeof(winWr) != "undefined" ? winWr : _wrapper;
    this.idWindow = idWindow;
    this.arrOpen  = arrOpen;
    this.arrClose = arrClose;
    this.showText = typeof(showText) != "undefined" ? showText : null;
    this.winWr.setOnloadListener(this);
}

modalNotCloneItem.prototype = {
    selectsWr : [],
    isVoile   : false,
    onload : function () {
        var cnf, tags, i, k, j, selList, selectWr;
        cnf = this.config;
        this.idWindow = this.winWr.getElement(this.idWindow);
        this.winWr.doc.body.appendChild(this.idWindow.elm);
        this.voile = this.winWr.getElement(cnf.voileId);
/**/
		this._preDoing();
        // Get element "showText"
        if (this.showText){
            tags = this._getTags(cnf.showTextTag);
            for(k=0; k<tags.length; k++) {
                if(tags[k].id == this.showText) {
                    tags[k].removeAttribute("id");
                    this.showText = this.winWr.getElmWrapper(tags[k]);
                }
            }
        }

        // Get element "open Modal"
        for(i=0;i<this.arrOpen.length;i++){
        	if (this.arrOpen[i]!=""){
         	   this.winWr.getElement(this.arrOpen[i]).addListener(this, "onclick", "openWin");
         	} else {
	            this._openWin();
	        }
        }


        // Get element "close Modal"
        tags = this._getTags(cnf.closeTag);
        var oElmWr;
        for(k=0; k<tags.length; k++) {
            for(i=0;i<this.arrClose.length;i++){
                if(tags[k].id == this.arrClose[i]) {
                    tags[k].removeAttribute("id");
                    oElmWr = this.winWr.getElmWrapper(tags[k]);
                    oElmWr.addListener(this, "onclick", "closeWin").oElmWr = oElmWr;
                }
            }
        }
        if(this.winWr.bv.isIE && this.winWr.bv.ver == "6.0") {
            j = 0;
            var notHdn = this.config.notHdnSel;
            selList = this.winWr.doc.getElementsByTagName("select");
            for(i=0; i<selList.length; i++) {
                selectWr = this.winWr.getElmWrapper(selList[i]);
                if (selectWr.isShow && typeof(notHdn[selectWr.elm.id]) == "undefined") {
                    this.selectsWr[j++] = selectWr;
                }
            }
        }

    },
    openWin : function (evtWr){
        evtWr.eventDrop();
        evtWr.elmWr.elm.blur();
        this._openWin();
    },
    closeWin : function (evtWr, par){
        evtWr.eventDrop();
        this._closeWin();
    },
    _closeWin : function (){
        this.idWindow.hide();
        if (this.showText){
            this.showText.hide();
        }
        //this.voile.style.height = "100%";
        if(!this.isVoile) {
        	this.voile.hide();
        }
        if (!this.winWr.isIE) {
            this.winWr.removeListener(this, "onscroll", "checkScroll");
            this.winWr.removeListener(this, "onresize", "checkScroll");
        }
        this._selectCtrl(true);
    },
    _openWin : function (){
        this._selectCtrl(false);
        this.idWindow.show();
        if (this.showText){
            this.showText.show();
        }
        
        this.idWindow.elm.style.marginLeft =  "0px";
        this.idWindow.elm.style.top = "0px";
        var w = this.idWindow.getWidth();
        var h = this.idWindow.getHeight();
        var wWin = this.winWr.getScrollX() + (this.winWr.getWindowWidth() - w)/2;
        var hWin = this.winWr.getScrollY() + (this.winWr.getWindowHeight() - h)/2;
        wWin = wWin < 0 ? 0 : wWin;
        hWin = hWin < 0 ? 0 : hWin;
        this.idWindow.setAbsLeft(wWin);
        //this.idWindow.setAbsTop(hWin);
		this.idWindow.setAbsTop(60);
        this.isVoile = this.voile.isShow();
        this.voile.show();
        if (!this.winWr.isIE) {
            this.voileHeight = this.voile.getHeight();
            this.checkScroll();
            this.winWr.addListener(this, "onscroll", "checkScroll");
            this.winWr.addListener(this, "onresize", "checkScroll");
        }
    },
    checkScroll : function (){
        this.voile.style.height = this.winWr.getScrollY()>0 ? this.voileHeight + this.winWr.getScrollY() + "px" : "100%";
    },
    _selectCtrl : function (stat){
        if(!this.winWr.bv.isIE || !this.winWr.bv.ver == "6.0") return;
        for(var i=0; i<this.selectsWr.length; i++) {
               this.selectsWr[i].setVisibility(stat);
        }
    },
    _getTags : function (tagNames){
        var tags, tagsRet, i, k;
        tagsRet = [];
        for(i=0;i<tagNames.length; i++) {
            tags = this.idWindow.elm.getElementsByTagName(tagNames[i]);
            for(k=0; k<tags.length; k++) {
                if(tags[k].id) {
                    tagsRet.push(tags[k]);
                }
            }
        }
        return tagsRet;
    },
    _preDoing : function (){
    },
    config : {
        voileId     : "voile",
        showTextTag : ["div"],
        closeTag    : ["button", "a"],
        notHdnSel   : {"recommend_rating":1, "condition_rating":1}
    }
}