//--------------------------------------
bw = new checkBrowser();
//--------------------------------------
function checkBrowser(){
  this.ver=navigator.appVersion
  this.dom=document.getElementById?1:0
  this.mac=(this.ver.indexOf("Mac")>-1)?1:0;
  this.ie6=((this.ver.indexOf("MSIE 6")>-1) && this.dom)?1:0;
  this.opera=(navigator.userAgent.indexOf('Opera')>=0)?1:0
  this.ie5=this.ie6 || ((this.ver.indexOf("MSIE 5")>-1) && this.dom)?1:0;
	// || (navigator.userAgent.indexOf('Opera')>=0)
  this.ie4=(document.all && !this.dom)?1:0;
  this.ns5=(this.dom && (parseInt(this.ver) >= 5) && (!this.opera)) ?1:0;
  this.ns4=(!document.all && !this.dom)?1:0;
  this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5 || this.ie6);
  return this;
	//Opera - это .ns5 -> (this.dom && (parseInt(this.ver) >= 5)
}
//--------------------------------------
//--------------------------------------
if (document.images) {
	//mDef = newImage("img/m_default.jpg");
	//m8_on = newImage("/img/m8_over-mod.jpg");
//MM_preloadImages('/img/btn_on.gif', '/img/btn_off.gif');
}
//--------------------------------------
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt; }
}
//--------------------------------------
function rollover(id1,name1){
  if (document.images) {document.images[id1].src=eval(name1+".src");}
  return true;
}
//--------------------------------------
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
//--------------------------------------
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//--------------------------------------
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
//--------------------------------------
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//--------------------------------------
function showpict(isrc, w, h, talt) {
	var appear,pic;
	//return false;
appear='top=' + (screen.height/2-90) + ',left=' + (screen.width/2-90) + ',width=' + w + ',height=' + h + ',directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0';
pic=window.open('', 'pictw', appear);
pic.document.open();
	pic.document.write("<HTML><HEAD><SCRIPT>window.focus();</SCRIPT></HEAD><BODY LEFTMARGIN=\"0\" TOPMARGIN=\"0\" MARGINHEIGHT=\"0\" MARGINWIDTH=\"0\"><table border=0 cellpadding=0 cellspacing=0><tr align=center valign=middle><td><a href=\"javascript:void(0);\" onclick='if (window.opener) window.opener.focus();window.close();return false;'><IMG border=0 SRC=\"" + isrc + "\" WIDTH=\"" + w + "\" HEIGHT=\"" + h + "\" ALT=\"" + talt + "\"></a></td></tr></table></BODY></HTML>");
	pic.document.close();
}
//--------------------------------------
var wn=0;
function ShowPictSeparate(isrc, w, h, talt) {
	var appear,pic, wname;
	//return false;
appear='top=' + (screen.height/2-90) + ',left=' + (screen.width/2-90) + ',width=' + w + ',height=' + h + ',directories=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0';
wname='pictw'+wn;
//eval('w'+ wn + '=window.open("", wname, appear)');
//eval('pic=w'+wn);
pic=window.open('', wname, appear);
wn+=1;
pic.document.open();
	pic.document.write("<HTML><HEAD><SCRIPT>window.focus();</SCRIPT></HEAD><BODY LEFTMARGIN=\"0\" TOPMARGIN=\"0\" MARGINHEIGHT=\"0\" MARGINWIDTH=\"0\"><table border=0 cellpadding=0 cellspacing=0><tr align=center valign=middle><td><a href=\"javascript:void(0);\" onclick='if (window.opener) window.opener.focus();window.close();return false;'><IMG border=0 SRC=\"" + isrc + "\" WIDTH=\"" + w + "\" HEIGHT=\"" + h + "\" ALT=\"" + talt + "\"></a></td></tr></table></BODY></HTML>");
	pic.document.close();
}//showpictSeparate
//--------------------------------------
function PageOpen(url, w, h, wname) {
	window.open(url, wname, 'top=' + (0) + ',left=' + (0) + ',width=' + w + ',height=' + h + ',directories=0,location=0,menubar=0,resizable=0,scrollbars=1,status=0,toolbar=0');
}//PageOpen
//--------------------------------------