function scrollcall2(){	//相對位置補正
	$('#backBlock').css("width",($(window).width()<$(document).width())?$(document).width():$(window).width());
	$('#backBlock').css("height",($(window).height()<$(document).height())?$(document).height():$(window).height());
}
$(function(){
	if($.browser.msie && ($.browser.version.substring(0,1) == '6' || $.browser.version.substring(0,1) == '7') ) {
		if($.cookie("closeinst")==null){
			//$.cookie("closeinst", "1", { path: '/', expires: 7 });
			
		$('body').append('<div id="backBlock" style="top: 0px;left: 0px;position: absolute;background-color: #333;z-index: 1000;display: none;width: 1px;height: 1px;"></div>');
		$('body').append('<div id="placeholder"></div>');
		$('body').append('<div id="placeholderStart" style="width: 300px;height: 200px;position: absolute;left: 50%;top: 50%;margin-left: -150px;margin-top: -100px;z-index: 1002;padding:5px;text-align:right;display:block; font-size:16px; color:#333;"><table width="300" border="0" cellpadding="0" cellspacing="0"><tr><td background="../plugins/fancybox/fancy_shadow_nw.png" ><div style="width:20px; height:20px;"></div></td><td background="../plugins/fancybox/fancy_shadow_n.png" ><div style="width:160px; height:20px;"></div></td><td background="../plugins/fancybox/fancy_shadow_ne.png" ><div style="width:20px; height:20px;"></div></td></tr><tr><td background="../plugins/fancybox/fancy_shadow_w.png"><div style="width:20px; "></div></td><td height="140" bgcolor="#FFFFFF"><div style="width:270px; height:125px; padding:10px">　　您目前使用的<span style="color:#F00">IE瀏覽器版本太舊</span>，因此無法使用本站。<br />　　請下載Google專為IE推出的瀏覽器外掛，除了保有IE原本的操作，更可以享受更快更好的上網體驗。</div><div style="width:270px; height:25px; text-align:center; padding-bottom:10px;" align="center"><a href="javascript:" style=" text-decoration:underline; color:#093;">立即安裝</a></div></td><td background="../plugins/fancybox/fancy_shadow_e.png"><div style="width:20px;"></div></td></tr><tr><td background="../plugins/fancybox/fancy_shadow_sw.png"><div style="width:20px; height:20px;"></div></td><td background="../plugins/fancybox/fancy_shadow_s.png" ><div style="width:160px; height:20px;"></div></td><td background="../plugins/fancybox/fancy_shadow_se.png" ><div style="width:20px; height:20px;"></div></td></tr></table></div>');
		$('body').append('<div id="placeholderClose" style="width: 30px;height: 30px;position: absolute;left: 50%;top: 50%;margin-left: 385px;margin-top: -265px;z-index: 1003; display:block;  font-size:0px; border-width: 0;"><a href="javascript:"><img src="/plugins/fancybox/fancy_close.png" width="30" height="30" border="0" /></a></div><div id="placeholderStartClose" style="width: 30px;height: 30px;position: absolute;left: 50%;top: 50%;margin-left: 150px;margin-top: -90px;z-index: 1003; display:block;  font-size:0px; border-width: 0;"><a href="javascript:"><img src="/plugins/fancybox/fancy_close.png" width="30" height="30" border="0" /></a></div>');
		
		$(window).scroll(function () {scrollcall2();}); 
		$(window).resize(function () {scrollcall2();}); 
		$(window).load(function () {
        scrollcall2();
		$("#backBlock").show( 0,function(){
				$(this).animate({ 
					opacity: 0.6
				  }, 500 );
			});
		});

		//IE6和IE7提示
		if($.browser.msie && $.browser.version.substring(0,1) == '6') {
			$('#placeholderClose img,#placeholderStartClose img,#placeholderStart td').supersleight(); 
        }
		$('#placeholderStart').css('display','block');
		$('#placeholderStartClose').css('display','block');
		$('#placeholderClose').css('display','none'); 
		$('div#placeholderStart').css('display','block');
		CFInstall.check({
			node: "placeholder",
			destination: document.url
		});

		$('div#placeholderStartClose a').click(function(){
			$('#placeholderStartClose').fadeOut(500);
			$('#placeholderStart').fadeOut(500);
			$('#backBlock').fadeOut(500);
		});	
		$('div#placeholderClose a').click(function(){
			$('#placeholderClose').fadeOut(500);
			$('#placeholder').fadeOut(500);
			$('#backBlock').fadeOut(500);
		});	
		$('div#placeholderStart a').click(function(){
			$('#placeholderStart').fadeOut(500);
			$('#placeholderStartClose').fadeOut(500);
			$('#placeholder').fadeIn(500);
			$('#placeholderClose').fadeIn(500);
		});	
		}
	}

});
