// 01.02.2002, Nicolas Cuntz
// mail@setcolor.de

var css_file = "";
var app_name = navigator.appName;
var app_version = navigator.appVersion;

css_file = "n4iexwin.css";

// In the internet we can use the domain url
if (window.location.protocol == "http:")
  css_file = "http://prov.catoptrale.de/" + css_file;
else
{
	var c_dir = extract_current_dir(window.location.pathname);
  if ((c_dir=="tools") || (c_dir=="de") || (c_dir=="en") || (c_dir=="links"))
    css_file = "../" + css_file;	
}

s  = "<link rel=\"stylesheet\"";
s += " href=\"" + css_file + "\"";
s += " type=\"TEXT/CSS\"" + ">";

document.writeln(s);

function is_netscape()
{
	if (app_name.search(/etscape/) != -1) return true;
	else return false;
}

function get_os()
{
	if (app_version.search(/Linux 2./) != -1) return "linux";
	else return "";
}

function is_smp()
{
  if ((get_os() == "linux") && (app_version.search(/smp/) != -1)) return true;
	else return false;
}

function remove_last_symbol(s)
{
	if (s.length <= 1) return "";
	return s.substr(0,s.length-1);
}

function get_last_symbol(s)
{
	if (s.length == 0) return "";
	return s.substr(s.length-1,1);
}

function extract_current_dir(s)
{
  var r_str = "";
  
  while ((get_last_symbol(s) != "\/") && (get_last_symbol(s) != "\\") && (s != ""))
    s = remove_last_symbol(s);  	
  s = remove_last_symbol(s);
  while ((get_last_symbol(s) != "\/") && (get_last_symbol(s) != "\\") && (s != ""))
  {
  	r_str = get_last_symbol(s) + r_str;
    s = remove_last_symbol(s);
  }
  return r_str;
}

function setExpo(hrefStr1,hrefStr2)
{
  if ((navigator.appName!="Netscape") && 
  ((navigator.appVersion.substring(0,1)=="2") ||
  (navigator.appVersion.substring(0,1)=="3") ||  
  (navigator.appVersion.substring(0,1)=="4") || 
  (navigator.appVersion.substring(0,3)=="5.0")))      
  top.location.href=hrefStr1+"#"+hrefStr2;
  else top.location.href=hrefStr1+"?"+hrefStr2;
}
