// JavaScript Document

function css_switcher(browser,version,os,path) {
	
	d = document;
	
	switch(browser){
		case "Firefox":
			
			switch(os){
				case "Windows":
					//alert("browser is Firefox on windows!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/ff_fix_win.css" />');
				break;
				
				case "Mac":
					//alert("browser is Firefox on mac!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/ff_fix_mac.css" />');
				break;
			}
			
		break;
		
		case "Explorer":
			
			switch(os){
				case "Windows":
					
					if(version < 6){
						//alert("browser is explorer 5.5 or lower on windows!");
						d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/ie55_fix_win.css" />');
					}else if(version >= 6){
						
						d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/ie_fix_win.css" />');
						
						if(version == 6){
							//alert("browser is explorer 6 on windows!");
							d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/ie6_fix_win.css" />');
						}else if(version == 7){
							//alert("browser is explorer 7 on windows!");
							d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/ie7_fix_win.css" />');
						}
					}
				
				break;
				
				case "Mac":
					//alert("browser is explorer on mac!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/ie_fix_mac.css" />');
				break;
			}
			
		break;
		
		case "Opera":
			
			switch(os){
				case "Windows":
					//alert("browser is Opera on windows!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/op_fix_win.css" />');
				break;
				
				case "Mac":
					//alert("browser is Opera on mac!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/op_fix_mac.css" />');
				break;
			}
			
		break;
		
		case "Safari":
			
			switch(os){
				case "Windows":
					//alert("browser is safari on windows!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/saf_fix_win.css" />');
				break;
				
				case "Mac":
					//alert("browser is safari on mac!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'style_fixers/saf_fix_mac.css" />');
				break;
			}
			
		break;
		
		default:
			alert("An unknown browser");
		break;
		
	}
	
}