var imagesId=0;
var imagesInterval;
var detailInterval;
function initImages() {
	document.write('<img width=184 height=200 src='+imagesList[imagesId]+' id=photo style="filter:revealTrans(Duration=1, Transition=23)" alt="点击放大" onclick="showLarge(this)" style="cursor:hand">');
	if(imagesList.length>1)imagesInterval=setInterval(transImages,3000);
	}
	
	
function initlogoImages( url) {
    
	document.write('<img width=184 height=200 src='+url+' id=photo style="filter:revealTrans(Duration=1, Transition=23)" alt="点击放大" onclick="showLarge(this)" style="cursor:hand">');
	
	}
function transImages() {
	if(document.getElementById('photo')!=null && imagesList.length>1) {
		imagesId++;
		if(imagesId>imagesList.length-1)imagesId=0;
		photo.filters.item(0).apply();
		photo.filters.item(0).transition = 23;
		photo.src=imagesList[imagesId];
		photo.filters.item(0).play();
		}
	}
function scrollDetail(dir) {
	clearInterval(detailInterval);
	detailInterval=setInterval("startScroll("+dir+")",1);
	}
function startScroll(dir) {
	detail.scrollTop+=dir;
	}

function showLarge(e) {
	var url=e.src;
	var largeWin=window.open('about:blank','large','width=100,height=100,resizabled=true');
	largeWin.document.write('<img src="'+url+'" onload="resizeTo(this.width+8,this.height+28)">');
	largeWin.document.body.style.margin=0;
	}
function setBigImgSize(theURL,sImage){
    var imgObj;
    var sizeStand = 500;
    if(arguments.length>=3){
        sizeStand = arguments[2];
    }
    if(arguments.length>=4){
        sizeStandh = arguments[3];
    }

    imgObj = new Image();
    imgObj.src = theURL;

    if ((imgObj.width != 0) && (imgObj.height != 0)) {
        if(imgObj.width>sizeStand ){
                var iHeight = imgObj.height*sizeStand/imgObj.width;
                sImage.height = iHeight;
                sImage.width = sizeStand;
        }else{
            sImage.width = imgObj.width;
            sImage.height= imgObj.height;
        }
    }else{
        sImage.width = sizeStand;
        sImage.height= sizeStand;
    }
}

function showproduce(unitid,produceid,type){
	
	window.location.href ="infodetail.aspx?unitid="+unitid+"&produceid=" + produceid + "&type=" + type 
}
public showvedio(picid)
{
window.location.href ="../info/vedio?picid="+picid;
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function imgopen(pid){
    MM_openBrWindow('../imagedetail.aspx?picId='+pid,'','scrollbars=yes,width=800,height=600')
}