function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

function onSelectAim(val) {
	form_aim = MM_findObj('aim');
	form_otheraim = MM_findObj('aim_other');
	if(val == 13) {					
		form_aim.className = 'displn';
		form_otheraim.className = 'disply';
	}
}
function onBackAim() {
	form_aim = MM_findObj('aim');
	form_otheraim = MM_findObj('aim_other');					
	form_aim.className = 'disply';
	form_otheraim.className = 'displn';
	form_aim.selectedIndex = 0;
}

function getScreen() {
    this.height = screen.height;
    this.width = screen.width;
    this.center = screen.availWidth/2;
    this.middle = screen.availHeight/2;
}

function alp(theURL,g) {
if (document.layers) {
  window.open(theURL,'');
	   } else {
s =  new getScreen();
c = s.height/60;
//fe = features.split(',');
var w, h;
tdh = '';
//~ alert(s.height);
	if(s.height < 700) {
		w = '640';
		h= '490';
		tdh = 'height=410';
	} else {
		w = '700';
		h= '490';
		tdh = 'height=450';
	}	
if(g) {
	w = '450';
	if(s.height < 700) h= '550';
	}
	features ='width='+w+',height='+h+',top='+c+',left='+c
  msgWindow=window.open("","",features);
  msgWindow.document.write('<html><HEAD><TITLE>Konvi</TITLE><link href="/css.php?lang=ua" rel="stylesheet" type="text/css">');
  msgWindow.document.write('</HEAD><body id="nobg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="padding:5px;">');
  msgWindow.document.write('<table width="100%" class="tabw" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" '+tdh+' valign="middle"><img src='+theURL+' onDblClick="window.close()" class="wini" border=0></td></tr></table>');
  msgWindow.document.write('<div class="contactw"><div><a href="javascript:window.close()">закрыть</a></div></div>');
  msgWindow.document.write('</body></html>');
  }

  if(window.focus) {
     msgWindow.window.focus();
  }
}

function BrowserCheck() {
        var b = navigator.appName
        if (b=="Netscape") this.b = "ns"
        else if (b=="Microsoft Internet Explorer") this.b = "ie"
        else this.b = b
        this.version = navigator.appVersion
        this.v = parseInt(this.version)
        this.ns = (this.b=="ns" && this.v<5)
        this.ns4 = (this.b=="ns" && this.v==4)
        this.ns5 = (this.b=="ns" && this.v==5)
        this.ie = (this.b=="ie" && this.v>=4)
        this.ie4 = (this.version.indexOf('MSIE 4')>0)
        this.ie5 = (this.version.indexOf('MSIE 5')>0)
        this.min = (this.ns||this.ie)		
}

is = new BrowserCheck();