var n = navigator;
// string comparisons are much easier if we lowercase everything now.
// to make indexOf() tests more compact/readable, we prepend a space 
// to the userAgent string (to get around '-1' indexOf() comparison)
var ua = ' ' + n.userAgent.toLowerCase();
var pl = n.platform.toLowerCase(); // not supported in NS3.0
var an = n.appName.toLowerCase();

// browser version
var version = n.appVersion;

var is_nn = ua.indexOf('mozilla') > 0;

// 'compatible' versions of "mozilla" aren't NNavigator
if(ua.indexOf('compatible') > 0) {
	is_nn = false;
}

var is_opera = ua.indexOf('opera') > 0;
var is_webtv = ua.indexOf('webtv') > 0;
var is_ie = ua.indexOf('msie') > 0;
var is_aol = ua.indexOf('aol') > 0;
var is_omniweb = ua.indexOf('omniweb') > 0;
var is_galeon = ua.indexOf('galeon') > 0;

var is_major = parseInt( version );
var is_minor = parseFloat( version );

 if (is_ie) {
   document.write("<link rel= \"stylesheet\" type=\"text/css\" href=\"vchain.css\" media=\"screen\" />")
} 
if (is_opera){
   document.write("<link rel= \"stylesheet\" type=\"text/css\" href=\"vchainmoz.css\" media=\"screen\" />")
}

else {
  var l=document.createElementNS("http://www.w3.org/1999/xhtml","link");
  l.setAttribute("rel", "stylesheet");
  l.setAttribute("type", "text/css");
  l.setAttribute("href", "vchainmoz.css");
  l.setAttribute("media", "screen");
  document.getElementsByTagName("head")[0].appendChild(l);
}

