str = navigator.userAgent.toUpperCase();
if (str.indexOf("FIREFOX") >= 0){
document.write('<link rel="stylesheet" href="/css/style_nn.css" type="text/css" />');
}else if (str.indexOf("MSIE 7") >= 0){
document.write('<link rel="stylesheet" href="/css/style_ie7.css" type="text/css" />');
}else if (str.indexOf("SAFARI") >= 0){
document.write('<link rel="stylesheet" href="/css/style_safari.css" type="text/css" />');
}

function qs(el){
	if(window.RegExp && window.encodeURIComponent){
		var ue=el.href,qe=encodeURIComponent(document.search.q.value);
		if(ue.indexOf("q=")!=-1){
			el.href=ue.replace(new RegExp("q=[^&$]*"),"q="+qe);
		}else if(qe){
			el.href=ue+"?q="+qe;
		}else if(!qe){
			el.href=ue;
		}else{
			el.href=ue+"&q="+qe;
		}
	}
	return 1;
}

function backToTop() {
  var x1 = x2 = x3 = 0;
  var y1 = y2 = y3 = 0;
  if (document.documentElement) {
      x1 = document.documentElement.scrollLeft || 0;
      y1 = document.documentElement.scrollTop || 0;
  }
  if (document.body) {
      x2 = document.body.scrollLeft || 0;
      y2 = document.body.scrollTop || 0;
  }
  x3 = window.scrollX || 0;
  y3 = window.scrollY || 0;
  var x = Math.max(x1, Math.max(x2, x3));
  var y = Math.max(y1, Math.max(y2, y3));
  window.scrollTo(Math.floor(x / 2), Math.floor(y / 2));
  if (x > 0 || y > 0) {
      window.setTimeout("backToTop()", 25);
  }
}

function getBrowserName()
{
    var aName  = navigator.appName.toUpperCase();
    var uName  = navigator.userAgent.toUpperCase();
    if (aName.indexOf("NETSCAPE") >= 0)       return "Netscape";
    if (aName.indexOf("MICROSOFT") >= 0)      return "Explorer";
    return "";
}
function getBrowserVersion()
{
	var browser = getBrowserName();
	var version = 0;
	var s = 0;
	var e = 0;
	var appVer  = navigator.appVersion;
	if (browser == "Netscape")
	{
		s = appVer.indexOf(" ",0);
		version = eval(appVer.substring(0,s));
		if (version >= 5) version++;
	}
	if (browser == "Explorer")
	{
		appVer  = navigator.userAgent;
		s = appVer.indexOf("MSIE ",0) + 5;
		e = appVer.indexOf(";",s);
		version = eval(appVer.substring(s,e));
	}
	return version;
}
function getOSType()
{
    var RetCode = "";
    var uAgent  = navigator.userAgent.toUpperCase();
    if (uAgent.indexOf("MAC") >= 0)           RetCode = "MacOS";
    if (uAgent.indexOf("WIN") >= 0)           RetCode = "Windows";
    if (uAgent.indexOf("X11") >= 0)           RetCode = "UNIX";
    return RetCode;
}
