﻿//首页的脚本调用
function obj(){return document.getElementById?document.getElementById(arguments[0]):eval(arguments[0]);} 

//广告图片切换
var tmpN = 100;
var tmpNs = 0;
var tmpTime=10;
var tmpSpeed=3;

//divobj为大图显示的div,url为图片的链接地址,path为图片路径,title就是title
function AdImageChange(divobj,url,path,title){
 //先将div的原图变淡
 doChangePic(obj(divobj),"none",url,path,title);
}
function doChangePic(obj,type,url,path,title){
 if(type=="none"){
 if (tmpN >= 1){
		 tmpN=tmpN-tmpSpeed;
		 obj.style.filter="alpha(opacity="+tmpN+")";
		 setTimeout(function(){doChangePic(obj,type,url,path,title);},tmpTime); 
	 }
	 else{
	 obj.style.filter="alpha(opacity=100)"; 
	 tmpN=100;
	 obj.innerHTML="<a href='" +url+ "'><img src='adimage/" +path+ "' width='757' height='350' title='" +title+ "'/></a>";
	 doChangePic(obj,"block",url,path,title)
	 return;
	 }
 }
 else{
 if (tmpNs <= 100){
		 tmpNs=tmpNs+tmpSpeed;
		 obj.style.filter="alpha(opacity="+tmpNs+")";
		 setTimeout(function(){doChangePic(obj,type,url,path,title);},tmpTime); 
	 }
	 else{
	 tmpNs= 0;
	 return ;
	 }
 } 
}
//订单查询 
function searchOrder(){
 window.location.href='orderdetails.aspx?orderNumber='+obj("txtorder").value
}
