var nn4 = (document.layers)? true : false;
var ie = (document.all)? true : false;
var dom = (document.getElementById)? true : false;

var layerRef="null", styleSwitch="null";


if (nn4) {
	layerRef="document.layers"
	styleRef=""
}else if(ie){
		layerRef="document.all"
		styleRef=".style"
}

function setfr(fr){
	if(window.menu) window.menu.SetVariable('cur_part',fr)
}

function show(lId){
	if (dom){
		eval(lId+styleRef+'.visibility="visible"')
	} else {
		eval(layerRef+'["'+lId+'"]'+styleRef+'.visibility="visible"');
	}
}
function hide(lId){
	if (dom){
		eval(lId+styleRef+'.visibility="hidden"')
	} else {
		eval(layerRef+'["'+lId+'"]'+styleRef+'.visibility="hidden"');
	}
}
function preload_imgs(){
	var imgCnt = arguments.length
	for (i = 0; i < imgCnt; i++){
		img = new Image()
		img.src = '/img/'+arguments[i]
	}
}
function img_win(win_href,win_width,win_height) {
	if(nn4){
		topV = (outerHeight-win_height)/2
		leftV = (outerWidth-win_width)/2
	}
	else {
		topV = (window.screen.height-win_height)/2
		leftV = (window.screen.width-win_width)/2
	}
	window.open("/pic/gallery/"+win_href,"","width=" + win_width + ",height=" + win_height + ",top="+topV+",left="+leftV+",resizable=no,toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no");
}
