var goto_top_type = -1;
var goto_top_itv = 0;

function goto_top_timer()
{
	var y = goto_top_type == 1 ? document.documentElement.scrollTop : document.body.scrollTop;
	var moveby = 15;

	y -= Math.ceil(y * moveby / 100);
	if (y < 0) { y = 0; }

	if (goto_top_type == 1)
	{
		 document.documentElement.scrollTop = y;
	}else {
		document.body.scrollTop = y;
	}

	if (y == 0) {
	clearInterval(goto_top_itv);
	goto_top_itv = 0;
	}
}

function goto_top()
{
	if (goto_top_itv == 0)
	{
		if (document.documentElement && document.documentElement.scrollTop)
		{
			goto_top_type = 1;
		}else if (document.body && document.body.scrollTop)
		{
			goto_top_type = 2;
		}else {
			goto_top_type = 0;
		}
	
		if (goto_top_type > 0) {
			goto_top_itv = setInterval('goto_top_timer()', 50);
		}
	}
}

$("#quickLink").append('<ul><li id="Rnav1"></li><li ><div class="online"><a href="http:\/\/www.zdexp.com/chinese/feedback/">.</a></div></li><li id="Rnav2"><a href="\/\/www.zdexp.com/chinese/job/">人才招聘</a></li><li id="Rnav4"><a href="\/\/www.zdexp.com/aboutus/contact-us.html">联系地址</a></li><li id="Rnav5"><a href="#top" onclick="goto_top();return false;">TOP</a></li></ul>');




jQuery('#Rnav1').html('<a target="_blank"  href="http://www.idinfo.cn/SignHandle?userID=3303826000013118">工商在线</a>');
function fixposition()
{

	var marginLeft= (jQuery(window).width() - jQuery('#layout').width())/8  + 'px';		
	jQuery('#quickLink').animate({top:$(window).scrollTop()+300+"px",right:marginLeft },{queue: false, duration: 350});



}
 jQuery(function(){ 

	if(jQuery(window).width()<1024)
	{
	$("#quickLink").css({display:'none'});

	}else{	
	var marginLeft= (jQuery(window).width() - jQuery('#layout').width())/8  + 'px';		
	jQuery('#quickLink').animate({top:$(window).scrollTop()+100+"px",right:marginLeft },{queue: false, duration: 350});
	 
				 
	var scr = true;
	try{
		if(external.max_version.indexOf("1.")==0){		scr = false;		}
	}catch(e){
	scr = true;
	}
	if(scr){		
			fixposition();	 
			jQuery(window).scroll(function(){	
				fixposition();				
			});
	　　　　}
	　}
});	
