
//------------------------------------------------------------Auflösungs- und Browserweiche--------------------------------------------------------------------------------
var browser = parseInt(navigator.appVersion);
var ext_browser = parseFloat(navigator.appVersion);
var IE = navigator.userAgent.indexOf("MSIE") >= 0;
var Opera = navigator.userAgent.indexOf("Opera") >= 0;
var netscape = navigator.userAgent.indexOf("Netscape") >= 0;
var mozilla = navigator.userAgent.indexOf("Mozilla") >= 0;


ScreenRes = screen.width;
if(ScreenRes == "1280") res = "1280";
else if (ScreenRes == "1152") res = "1152";
else if (ScreenRes == "1024") res = "1024";
else if (ScreenRes == "800") res = "800";
else if (ScreenRes == "640") res = "640";

			//--------640.css-----Auflösung 640 px und kleiner
if(screen.width <= 640) { 
			
			if (IE && !Opera) {    			//---msie_640.css----------Microsoft Internet Explorer
								   document.write("<link rel='stylesheet' href='/Alle/msie_640.css' type='text/css'>")  } 

			else {										//---ns_640.css-------------Netscape
	 				if  (netscape)    { 
									document.write("<link rel='stylesheet' href='/Alle/ns_640.css' type='text/css'>") }

														  //---mozilla_640.css------Mozilla
					else if (mozilla && !netscape && !Opera)  {
									document.write("<link rel='stylesheet' href='/Alle/mozilla_640.css' type='text/css'>") }		  
	    	
														  //---opera_640.css--------Opera
					else if (Opera)  {
									document.write("<link rel='stylesheet' href='/Alle/opera_640.css' type='text/css'>") }		  

 					else 							  //---msie_640.css---------sonstige
 						             document.write("<link rel='stylesheet' href='/Alle/msie_640.css' type='text/css'>") 	

 			        }
} 
								
								
		//-------------------Auflösung  größer als 640 px und kleiner  als 1024 px  (z. B. 800x600)
		
else if(screen.width > 640 && screen.width < 1024) { 
			if (IE && !Opera) {    		//---msie_800.css----------Microsoft Internet Explorer
								   document.write("<link rel='stylesheet' href='/Alle/msie_800.css' type='text/css'>")  } 

			else {									//---ns_800.css-------------Netscape
	 				if  (netscape)    { 
									document.write("<link rel='stylesheet' href='/Alle/ns_800.css' type='text/css'>") }

														  //---mozilla_800.css------Mozilla
					else if (mozilla && !netscape && !Opera)  {
									document.write("<link rel='stylesheet' href='/Alle/mozilla_800.css' type='text/css'>") }		  
	    	
														  //---opera_800.css--------Opera
					else if (Opera)  {
									document.write("<link rel='stylesheet' href='/Alle/opera_800.css' type='text/css'>") }		  

 					else 							  //---msie_800.css---------sonstige
 						             document.write("<link rel='stylesheet' href='/Alle/msie_800.css' type='text/css'>") 	

 					}
}						
								
			//-------------------Auflösung  größer als 640 px und kleiner  als 1024 px  (z. B. 800x600)
		
else if(screen.width >= 1024 && screen.width < 1280) { 
			if (IE && !Opera) {    		//---msie_1024.css----------Microsoft Internet Explorer
								   document.write("<link rel='stylesheet' href='/Alle/msie_1024.css' type='text/css'>")  } 

			else {									//---ns_1024.css-------------Netscape
	 				if  (netscape)    { 
									document.write("<link rel='stylesheet' href='/Alle/ns_1024.css' type='text/css'>") }

														  //---mozilla_1024.css------Mozilla
					else if (mozilla && !netscape && !Opera)  {
									document.write("<link rel='stylesheet' href='/Alle/mozilla_1024.css' type='text/css'>") }		  
	    	
														  //---opera_1024.css--------Opera
					else if (Opera)  {
									document.write("<link rel='stylesheet' href='/Alle/opera_1024.css' type='text/css'>") }		  

 					else 							  //---msie_1024.css---------sonstige
 						             document.write("<link rel='stylesheet' href='/Alle/msie_1024.css' type='text/css'>") 	

 					}
}						
		//------1280.css------Auflösung 1280 und größer	
		
else{  if (IE && !Opera) {    				//---msie.css----------Microsoft Internet Explorer
								   document.write("<link rel='stylesheet' href='/Alle/msie_1280.css' type='text/css'>")  } 

			else {										//---ns.css-------------Netscape
	 				if  (netscape)    { 
									document.write("<link rel='stylesheet' href='/Alle/ns_1280.css' type='text/css'>") }

														  //---mozilla.css------Mozilla
					else if (mozilla && !netscape && !Opera)  {
									document.write("<link rel='stylesheet' href='/Alle/mozilla_1280.css' type='text/css'>") }		  
	    	
														  //---opera.css--------Opera
					else if (Opera)  {
									document.write("<link rel='stylesheet' href='/Alle/opera_1280.css' type='text/css'>") }		  

 					else 							  //---msie.css---------sonstige
 						             document.write("<link rel='stylesheet' href='/Alle/msie_1280.css' type='text/css'>") 	

 					}
} 
 