// JavaScript Document

var browsercss = 'default.css';
var isMobile = false;
var ieVersion = '5.0';
var isIe = false;

if (navigator.userAgent.match(/iPad/i) != null) {
	browsercss = 'ipad.css';
}

if (navigator.userAgent.match(/iPod/i) != null) {
	browsercss = 'ipod.css';
	isMobile = true;
}

if (navigator.userAgent.match(/iPhone/i) != null) {
	browsercss = 'ipod.css';
	isMobile = true;
}

if (navigator.userAgent.match(/Android/i) != null) {

	browsercss = 'android.css';
	isMobile = true;
}

if (navigator.userAgent.match(/MSIE/) != null) {
	isIe = true;
	var m = navigator.userAgent.match(/MSIE (...)/);
	ieVersion = m[1];
	
	if (isIe) {
		if (("5.0" == ieVersion) || ("5.5" == ieVersion))
			browsercss = "ie5.css";
			
		if ("6.0" == ieVersion)
			browsercss = "ie6.css";
	}
}

loadCss(browsercss);

function loadCss(filename){
	var fileref=document.createElement("link")
	fileref.setAttribute("rel", "stylesheet")
	fileref.setAttribute("type", "text/css")
	fileref.setAttribute("href", "styles/" + filename)
	
	if (typeof fileref!="undefined")
		document.getElementsByTagName("head")[0].appendChild(fileref)
}



