cit = new Array;
var st = 0;

function show() {
	clearTimeout(st);
	hide();
	for (i=0; i<show.arguments.length; i++) {
//		alert(show.arguments[i]);
		if (!document.all) {
			document.getElementById(show.arguments[i]).style.visibility='visible';
		} else {
			document.all[show.arguments[i]].style.visibility='visible';
		}
	}
	cit = show.arguments;
}

function hide() {
	for  (i=0; i<cit.length; i++) {
		if (!document.all) {
			document.getElementById(cit[i]).style.visibility='hidden';
		} else {
			document.all[cit[i]].style.visibility='hidden';
		}
	}
}

function showpic(pic, w, h, tit) {
	pw=window.open('', 'pw', 'height='+h+28+',width='+w+6+',screenX=50,screenY=50,top=50,left=50,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	buf = '<html><head><title>'+tit+'</title></head><body topmargin=0 leftmargin=0 marginwidth=0 marginheight=0><a href=# onClick=self.close()><img src='+pic+' alt="Щелкните на картинке, чтобы закрыть окно" border=0></a></body></html>'
	pw.document.write(buf);
	pw.document.close();
	pw.resizeTo(w+6, h+28);
	pw.focus();
}

function showdesc(file, w, h) {
	dw=window.open(file, 'dw', 'height='+h+',width='+w+',screenX=50,screenY=50,top=50,left=50,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	dw.resizeTo(w, h);
	dw.focus();
}

function change_razdel(id,name,rid){
	if (newname=prompt("Измените название "+name,name))
	{
		location.href='images.php?rid='+rid+"&newrid="+id+"&newname="+newname;
	}
}

function change_name_map(rid,name,act,doc,id){
	if (newname=prompt("Изменение названия "+name,name))	{
		location.href='index.php?doc='+doc+"&id="+id+"&newname="+newname+"&user="+act+"&rid="+rid;
	}
}

function showvac(file,id){
	dw=window.open(file,'vac'+id,"tollbar=0, width=600, height=600, scrollbars=yes,resizable=yes");
	dw.resizeTo('600', '600');
}

function new_spec(root_dir){
	sw=window.open(root_dir+'_include/getspec.php', 'sw', 'height=550,width=480,screenX=0,screenY=0,top=0,left=0,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
	sw.resizeTo(550, 480);
	sw.focus();
} 
