/*
Purpose - detecting browser & switch the file with CSS depending on browser
Browser - IE and NN (4.0 or greater)
Author - Josef Kozak (vig300)
Date - 19.6.2000
*/


version=0;

adrprefix="";
for (i=0; i<rootlevel; i++) adrprefix += "../index.html";



browserName = navigator.appName; 
browserVersion = parseInt(navigator.appVersion); 

if (browserName == "Netscape") 
{
  if ((browserVersion < 3) && (navigator.userAgent.indexOf("OS/2") == 0)) version = 0;
  else
  { 
    if (browserVersion < 4) version = 1; 
    else version = 2;
  }
} 
else 
if (browserName == "Microsoft Internet Explorer" && browserVersion > 3) 
{
  version = 3;
}


if (version == 2) 
{
  document.write('<link rel="stylesheet" href="' + adrprefix + '_js_and_css/base_nn.css">');
} 
else if (version==3) 
{
  document.write('<link rel="stylesheet" href="' + adrprefix + '_js_and_css/base_ie.css">'); 
}

function OpenImage(filename, title, width, height)
{
	wi = Math.floor(Math.random() * 1000) + 1000
	ImageWindow = window.open('', wi.toString(), 'status=no,width='+width.toString()+',height='+height.toString()+',resizable=no,menubar=no,scrollbars=no,toolbar=no')
	ImageWindow.document.write('<html><head><title>'+title+'</title></head><body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>')
	ImageWindow.document.write('<img src="'+filename+'" width='+width.toString()+' height='+height.toString()+'><br>')
	ImageWindow.document.write('</body></html>')
}

function OpenWindow(script, title, width, height)
{
  	topik = (screen.height/2)-(height/2);
  	left = 150;
  	
  	variables = 'status=no,width='+width+',height='+height+',resizable=no,menubar=no,scrollbars=no,toolbar=no,left='+left+',top='+topik;
	  	
	wi = Math.floor(Math.random() * 1000) + 1000;
	popup = window.open(script, wi.toString(), variables);
}




