function isIE(){ //ie?
    return !!(window.attachEvent && !window.opera);
}

if(!isIE()){ //firefox innerText define
    HTMLElement.prototype.__defineGetter__("innerText",
    function(){
        var anyString = "";
        var childS = this.childNodes;
        for(var i=0; i<childS.length; i++) {


            if(childS[i].nodeType==1)
                //anyString += childS[i].tagName=="BR" ? "\n" : childS[i].innerText;
                anyString += childS[i].innerText;
            else if(childS[i].nodeType==3)
                anyString += childS[i].nodeValue;
        }
        return anyString;
    }
    );
    HTMLElement.prototype.__defineSetter__("innerText",
    function(sText){
        this.textContent=sText;
    }
    );
}

function ShowWindow(strUrl,width ,height){
	var isMSIE= (navigator.appName == "Microsoft Internet Explorer");
	if (isMSIE){
		window.showModalDialog(strUrl,self,'help:no;status:no;dialogWidth='+ width +'px;dialogHeight='+ height +'px;directories:yes;scrollbars:no;Resizable=no;');
	}else{
		if(height){
			height += 30;
			var win = window.open(strUrl,'newWin','dialog=yes,modal=yes,width=' + width +',height=' + height + ',resizable=no,scrollbars=no');
			eval('try { win.resizeTo(width, height); } catch(e) { }'); 
		}else{
			var win = window.open(strUrl,'newWin','dialog=yes,modal=yes,width=' + width +',resizable=yes,scrollbars=no');
		}
        win.focus();    
	}
}
