// 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 + 'cssfix_win_ff.css" />');
				break;
				
				case "Mac":
					//alert("browser is Firefox on mac!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'cssfix_mac_ff.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 + 'cssfix_win_ie5.css" />');
					}else if(version >= 6){
						
						d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'cssfix_win_ie.css" />');
						
						if(version == 6){
							//alert("browser is explorer 6 on windows!");
							d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'cssfix_win_ie6.css" />');
						}else if(version == 7){
							//alert("browser is explorer 7 on windows!");
							d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'cssfix_win_ie7.css" />');
						}
					}
				
				break;
				
				case "Mac":
					//alert("browser is explorer on mac!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'cssfix_mac_ie.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 + 'cssfix_win_op.css" />');
				break;
				
				case "Mac":
					//alert("browser is Opera on mac!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'cssfix_mac_op.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 + 'cssfix_win_saf.css" />');
				break;
				
				case "Mac":
					//alert("browser is safari on mac!");
					d.write('<link rel = "stylesheet" type = "text\/css" href = "' + path + 'cssfix_mac_saf.css" />');
				break;
			}
			
		break;
		
		default:
			//alert("An unknown browser");
		break;
		
	}
	
}
