function check(){
if(window.navigator.userAgent.indexOf("MSIE 8.0")>=1){
//如果浏览器为IE 8.0
alert("ie8");
}
else if(window.navigator.userAgent.indexOf("MSIE 7.0")>=1){
//如果浏览器为IE 7.0
setActiveStyleSheet("IE7.0_index_layout.css");//设置css样式表
}
else if(window.navigator.userAgent.indexOf("TencentTraveler")>=1){
//如果浏览器为腾讯TT
setActiveStyleSheet("TT_index_layout.css");
}
else if(window.navigator.userAgent.indexOf("Maxthon")>=1){
//如果浏览器为傲游
setActiveStyleSheet("Maxthon_index_layout.css");
}
else if(window.navigator.userAgent.indexOf("MSIE 6.0")>=1){
//如果浏览器为IE 6.0
alert("ie6");
}
else if(window.navigator.userAgent.indexOf("Firefox")>=1){
//如果浏览器为Firefox
setActiveStyleSheet("FF_index_layout.css");
}
else if(window.navigator.userAgent.indexOf("Safari")>=1){
//如果浏览器为Safari
setActiveStyleSheet("Safari_index_layout.css");
}
else if(window.navigator.appName=="Opera"){
//如果浏览器为Opera
setActiveStyleSheet("Opera_index_layout.css");
}
else{
//如果浏览器为其它
setActiveStyleSheet("default_index_layout.css");
}
}
if(window.navigator.userAgent.indexOf("MSIE 8.0")>=1){
//如果浏览器为IE 8.0
alert("ie8");
}
else if(window.navigator.userAgent.indexOf("MSIE 7.0")>=1){
//如果浏览器为IE 7.0
setActiveStyleSheet("IE7.0_index_layout.css");//设置css样式表
}
else if(window.navigator.userAgent.indexOf("TencentTraveler")>=1){
//如果浏览器为腾讯TT
setActiveStyleSheet("TT_index_layout.css");
}
else if(window.navigator.userAgent.indexOf("Maxthon")>=1){
//如果浏览器为傲游
setActiveStyleSheet("Maxthon_index_layout.css");
}
else if(window.navigator.userAgent.indexOf("MSIE 6.0")>=1){
//如果浏览器为IE 6.0
alert("ie6");
}
else if(window.navigator.userAgent.indexOf("Firefox")>=1){
//如果浏览器为Firefox
setActiveStyleSheet("FF_index_layout.css");
}
else if(window.navigator.userAgent.indexOf("Safari")>=1){
//如果浏览器为Safari
setActiveStyleSheet("Safari_index_layout.css");
}
else if(window.navigator.appName=="Opera"){
//如果浏览器为Opera
setActiveStyleSheet("Opera_index_layout.css");
}
else{
//如果浏览器为其它
setActiveStyleSheet("default_index_layout.css");
}
}