
document.write('<style>#floating_ad {position: absolute;top: 200;right:0px;z-index:9999;}#floating_ad.fixed {position: fixed;top: 200;}</style><div id=\"floating_ad\" ><a href=\"http://chat1.web0800.com/v4/chat/chat.php?ver=401&company=128&vcwStyle=0&vcwColor=1&vcwLang=big5&vcwTitle=%E6%82%A0%E7%BE%8E%E8%A8%BA%E6%89%80%E7%B7%9A%E4%B8%8A%E5%AE%A2%E6%9C%8D%E7%B3%BB%E7%B5%B1&vcwCoName=%E6%82%A0%E7%BE%8E%E8%A8%BA%E6%89%80%E9%86%AB%E5%AD%B8%E4%B8%AD%E5%BF%83&vcwExpire=5&vcwCusTit=%E6%82%A0%E7%BE%8E%E8%A8%BA%E6%89%80%E7%B7%9A%E4%B8%8A%E5%AE%A2%E6%9C%8D%E7%B3%BB%E7%B5%B1\" target=\"_blank\"><img src=\"/Content/i/sub_banner6.gif\" border=\"0\" width=\"119\" height=\"113\"></a></div>');
/*
$(document).ready(function () {  

  var top = $('#floating_ad').offset().top - parseFloat($('#floating_ad').css('marginTop').replace(/auto/, 0));
  $(window).scroll(function (event) {
    // what the y position of the scroll is
    //var y = $(this).scrollTop();
	var y = getScrollTop();
	$('#floating_ad').css('top',y +'px');
	
    // whether that's below the form
    if (y >= top) {
      // if so, ad the fixed class
      $('#floating_ad').addClass('fixed');
    } else {
      // otherwise remove it
      $('#floating_ad').removeClass('fixed');
    }
	
  });
});
*/
	function getScrollTop() {

		if (typeof window.pageYOffset != 'undefined') {
			return window.pageYOffset;
		} else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') {
			return document.documentElement.scrollTop;
		}else if (typeof document.body != 'undefined') {
			return document.body.scrollTop;
		}
	}


function scall(){
	document.getElementById('floating_ad').style.top=getScrollTop()+300+'px';
//alert(getScrollTop()+'=>'+document.getElementById('floating_ad').style.top);
}
window.onscroll=scall;
window.onresize=scall;
window.onload=scall;

