var delay = 400;
var _st = window.setTimeout; 
window.setTimeout = function(fRef, mDelay) { 
  if(typeof fRef == 'function'){ 
	  var argu = Array.prototype.slice.call(arguments,2); 
	  var f = (function(){ fRef.apply(null, argu); }); 
	  return _st(f, mDelay); 
   } 
  return _st(fRef,mDelay); 
};
 
//setTimeout('close_slide()',3000);//调用带参数与不带参数的函数时有不同		
//setTimeout(function(){clip_slide(url);},3000);
//setTimeout(start,delay);

function clip_slide(url){	
	var id='entrySlide';
	var anim = function(){
		n += 20;
		if(n >= 405){
			document.getElementById(id).style.marginTop = "-405px";
			window.clearInterval(t1);
			//window.location.reload(url);
			window.location.href=url;
			
		}else{
			document.getElementById(id).style.marginTop = "-"+ n +"px";			
		}
	},n=0;
	var t1 = window.setInterval(anim,20);
}

//向下伸展到达目标位置后等待若干时间后向上收缩菜单至正式位置
function float_slide(param){

		document.getElementById('entrySlide').style.display="";
		var anim = function(){
			n += 20;
			if(n >= 405){
				//bind_iframe(param,800);
				//window.location.href=param;
				document.getElementById('entrySlide').style.marginTop = "0px";
				window.clearInterval(t1);
				
				window.setTimeout(clip_slide,delay,param); 				

			}else{
				document.getElementById('entrySlide').style.marginTop = "-"+(405 - n)+"px";
				//alert("ad.marginTop=-"+(405 - n)+"//n="+n);
			}
		},n=0;
		var t1 = window.setInterval(anim,20);
}

function close_chk_show(){
	var anim = function(){
		n += 20;
		if(n >= 405){
			document.getElementById('entrySlide').style.marginTop = "-405px";
			window.clearInterval(t1);
		}else{
			document.getElementById('entrySlide').style.marginTop = "-"+ (450 - n) +"px";
			
		}
	},n=0;
	var t1 = window.setInterval(anim,20);
}

function init_slice(t){
	document.getElementById('entrySlide').style.marginTop = "-"+t+"px";
}
function bind_iframe(page,h){
	document.getElementById("teamelec_iframe_id").src=page;
	document.getElementById("teamelec_iframe_id").height=h+"px";
}

