var agt = navigator.userAgent.toLowerCase();
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_gecko= (navigator.product == "Gecko");
var is_webkit=agt.indexOf('webkit')>-1;
var is_safari = (agt.indexOf('chrome')==-1)&&is_webkit;
var is_ie6 = is_ie && /msie (\d)\./.test(agt) && parseInt(RegExp.jQuery1) < 7;
var is_ie7 = is_ie && /msie (\d)\./.test(agt) && parseInt(RegExp.jQuery1) == 7;
function a(x,y){
//l = jQuery('#main').offset().left;
//w = jQuery('#main').width();
//jQuery('#tbox').css('left',(l + w + x) + 'px');
if(!is_ie6){
jQuery('#tbox').css('right','10' + 'px');
jQuery('#tbox').css('top',y + 'px');
}
//document.getElementById('tbox').style.right='30px;';
// document.getElementById('tbox').style.bottom=y+'px;';
// alert(111);
}
function b(){
h = jQuery(window).height();
t = jQuery(document).scrollTop();
if(t > h){
jQuery('#gotop').fadeIn('slow');
}else{
jQuery('#gotop').fadeOut('slow');
}
}
jQuery(document).ready(function(e) {
a(-144,100);//#tbox的div距浏览器底部和页面内容区域右侧的距离
//b();
jQuery('#gotop').click(function(){
jQuery(document).scrollTop(0);
})
});
jQuery(window).resize(function(){
a(-144,100);//#tbox的div距浏览器底部和页面内容区域右侧的距离
});
jQuery(window).scroll(function(e){
//b();
})
function showzy()
{
if(jQuery('#zuanyeshezhi'+1+'div').css('display')=='none')
{
for(i=1;i<=9;i++)
{
jQuery('#zuanyeshezhi'+i+'div').css('display','block');
}
jQuery('#zuanyeshezhi').css("background-position","0px -850px");
}
else
{
for(i=1;i<=9;i++)
{
jQuery('#zuanyeshezhi'+i+'div').css('display','none');
}
jQuery('#zuanyeshezhi').css("background-position","0px -750px");
}
}
function showcwo(sURL, sTitle)
{
try
{
window.external.addFavorite(sURL, sTitle);
}
catch (e)
{
try
{
window.sidebar.addPanel(sTitle, sURL, "");
}
catch (e)
{
alert("您的浏览器暂不支持此功能,加入收藏失败,请使用Ctrl+D进行添加");
}
}
}