nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
nn6 = (document.getElementById && !ie4)? true : false
function popupWin(fileName, windowName, winWidth, winHeight) {
if (nn4 || ie4 || nn6) {
posX = Math.round((screen.width - winWidth) / 2);
posY = Math.round((screen.height - winHeight) / 2);
posCode = (nn4 || nn6)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;
} else { posCode = ""; }
newWindow = window.open(fileName,windowName,'menubar=no,toolbar=no,scrollbars=yes,status=yes,width='+winWidth+',height='+winHeight+','+posCode);
newWindow.focus();
}



//Переключалка таблиц
function DisablePicup(tid){
	var ttid = document.getElementById(tid);
	if(nn6){
		c=1;
	}else{
		c=0;
	}
	if(c==0){
		for (var i=0;i<ttid.childNodes[c].childNodes[c].childNodes.length;i++){
			if(ttid.childNodes[c].childNodes[c].childNodes[i].className!="noline"){
				ttid.childNodes[c].childNodes[c].childNodes[i].className="";
			}
		}
	}else{
//		alert(ttid.childNodes[c].childNodes[c].childNodes.length);
		for (var i=0;i<ttid.childNodes[c].childNodes[c].childNodes.length;i++){
//			alert(ttid.childNodes[c].childNodes[i].nodeName)
			if(ttid.childNodes[c].childNodes[i].className!="noline"){
				ttid.childNodes[c].childNodes[c].childNodes[i].className="";
			}
		}
	}
}

function PicupOn(ob){
	ob.parentNode.className="on"
}

function divOn(ob, on){
	o = document.getElementById(ob);
	if(on==1){
		o.className="visible";
	}else{
		o.className="novisible";
	}
};

