﻿
var currslid = 0;
var slidint;
function setfoc(id){
	document.getElementById("focpic").src = picarry[id];
	document.getElementById("foclnk").href = lnkarry[id];
	document.getElementById("fttltxt").innerHTML = '<a href="'+lnkarry[id]+'" target="_blank">'+ttlarry[id]+'</a>';
	currslid = id;
	for(i=0;i<6;i++){
		document.getElementById("tmb"+i).className = "thubpic";
	};
	document.getElementById("tmb"+id).className ="thubpiccur";
	focpic.style.visibility = "hidden";
	focpic.filters[0].Apply();
	if (focpic.style.visibility == "visible") {
		focpic.style.visibility = "hidden";
		focpic.filters.revealTrans.transition=23;
	}
	else {
		focpic.style.visibility = "visible";
		focpic.filters[0].transition=23;
	}
	focpic.filters[0].Play();
	stopit();
}

function playnext(){
	if(currslid==5){
		currslid = 0;
	}
	else{
		currslid++;
	};
	setfoc(currslid);
	playit();
}
function playit(){
	slidint = setTimeout(playnext,4500);
}
function stopit(){
	clearTimeout(slidint);
	}
window.onload = function(){
	playit();
}


var picarry = {};
var lnkarry = {};
var ttlarry = {};
picarry[0] = "/Img/11.jpg";
lnkarry[0]  = "http://special.cnmd.net/Page/2011cmj/";
ttlarry[0] = "第九届现代装饰国际传媒奖-圆满落幕";
picarry[1] = "/Img/22.jpg";
lnkarry[1]  = "http://special.cnmd.net/designnewtrends/index.html";
ttlarry[1] = "关注设计群体 推广区域力量";
picarry[2] = "/Img/33.jpg";
lnkarry[2]  = "http://news.cnmd.net/News/26613.aspx";
ttlarry[2] = "喜贺现代装饰杂志社荣获深圳市重点文化企业";
picarry[3] = "/Img/44.jpg";
lnkarry[3]  = "http://www.modernde.com/";
ttlarry[3] = "《现代装饰?家居》从2010年11月刊开始，由原来的152P增至为168P";
picarry[4] = "/Img/55.jpg";
lnkarry[4]  = "http://t.sina.com.cn/modernde";
ttlarry[4] = "和《现代装饰》一起编制冬日“围脖”吧！";
picarry[5] = "/Img/67.jpg";
lnkarry[5]  = "http://special.cnmd.net/page/cmjsz/index.htm";
ttlarry[5] = "城市发现·设计绽放";

