var Mac, Win, IE, NN, Moz, Safari, Opera, SafariVer, path;

path = "/jibika/styles";

Mac = 0;
Win = 0;
IE = 0;
NN = 0;
Mox = 0;
Safari = 0;
Opera = 0;
SafariVer = 0;

if(navigator.appVersion.indexOf('Mac',0) != -1) { Mac = 1; }
if(navigator.appVersion.indexOf('Win',0) != -1) { Win = 1; }
if(navigator.appName.indexOf("Microsoft",0) != -1) { IE = 1; }

//if(navigator.userAgent.indexOf("Safari") != -1) {
//	Safari = 1;
//	if(navigator.userAgent.indexOf("Safari/412") != -1) {
//		SafariVer = 2;
//	} else {
//		SafariVer = 1;
//	}
//}
if(navigator.userAgent.indexOf("Firefox") != -1) {
	Moz = 1;
}

if(navigator.userAgent.indexOf("Netscape") != -1) {
	NN = 1;
}

if(navigator.userAgent.indexOf("Opera") != -1) { Opera = 1; }

if(Opera && Win) {
	document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + path +"/win_opera.css\" media=\"screen, tv\">\n");
}

if(Opera && Mac) {
	document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + path +"/mac_opera.css\" media=\"screen, tv\">\n");
}

if(Mac && IE && Opera == 0) {
	document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + path +"/mac_ie.css\" media=\"screen, tv\">\n");
}

if(Mac && (Moz || NN)) {
	document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + path +"/mac_gecko.css\" media=\"screen, tv\">\n");
}

//if(Safari) {
//		if(SafariVer == 2) {
//			document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"style/safari2.css\" media=\"all\">\n");
//		} else {
//			document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"style/safari1.css\" media=\"all\">\n");
//		}
//			document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + path +"/safari.css\" media=\"screen, tv\">\n");
//}


