/********   产品宣传图片效果js ******/

//轮流播放
	
var ImgSrc = new Array();//图片地址
ImgSrc[0] = "images/product/01.gif";

ImgSrc[1] = "images/product/02.gif";
ImgSrc[2] = "images/product/03.gif";
ImgSrc[3] = "images/product/04.gif";
ImgSrc[4] = "images/product/05.gif";
ImgSrc[5] = "images/product/06.gif";
ImgSrc[6] = "images/product/07.gif";
ImgSrc[7] = "images/product/08.gif";

ImgSrc[8] = "images/product/09.gif";
ImgSrc[9] = "images/product/02.jpg";
ImgSrc[10] = "images/product/02.jpg";


for (var i=0;i<ImgSrc.length;i++){(new Image()).src = ImgSrc[i];}//预加载图片

var ImgAlt = new Array();//鼠标放上去显示的文字
ImgAlt[0] = "精英特获“中国教育培训十大品牌”荣誉！";
ImgAlt[1] = "精英特获“中国教育培训十大品牌”荣誉！";
ImgAlt[2] = "精英特获“中国教育培训十大品牌”荣誉！";
ImgAlt[3] = "精英特获“中国教育培训十大品牌”荣誉！";
ImgAlt[4] = "精英特获“中国教育培训十大品牌”荣誉！";
ImgAlt[5] = "精英特获“中国教育培训十大品牌”荣誉！";
ImgAlt[6] = "精英特获“中国教育培训十大品牌”荣誉！";

var ImgHerf =  new Array();//链接
ImgHerf[0] = "http://www.jint.cn/d423-2659.html";
ImgHerf[1] = "http://www.jint.cn/d423-2659.html";
ImgHerf[2] = "http://www.jint.cn/d423-2659.html";
ImgHerf[3] = "http://www.jint.cn/d423-2659.html";
ImgHerf[4] = "http://www.jint.cn/d423-2659.html";
ImgHerf[5] = "http://www.jint.cn/d423-2659.html";
ImgHerf[6] = "http://www.jint.cn/d423-2659.html";

var step=0;
function slideit(){

	//rewrite by haiwa@2005-7-7
	var oImg = document.getElementById("javascript.img");
	if (document.all){oImg.filters.blendTrans.apply();}
	oImg.src=ImgSrc[step];
	//document.getElementById("javascript.a").href=ImgHerf[step];
	//oImg.alt=ImgAlt[step];
	if (document.all){oImg.filters.blendTrans.play();}
	step = (step<(ImgSrc.length-1))?(step+1):0;
	(new Image()).src = ImgSrc[step];//加载下一个图片
	
	if(step==0){
		clearInterval(intervalSlide);
		compareReadType();
	}
}

//速读效果对比js
var index1=0;	
var index2=0;
var intervalTraditonalRead,intervalRapidRead,intervalSlide;

function compareReadType(){
	var oImg = document.getElementById("javascript.img");
	oImg.style.display = "none";
	
	var oParentDiv=document.getElementById("mid22t");
	//alert(oParentDiv.style.cssText);
	oParentDiv.style.backgroundImage = "url(/images/product/01.jpg)";
	
	oParentDiv.innerHTML = oImg.outerHTML + "<div id='div_readtype1' style='letter-spacing:2px;line-height:20px;font-size:12px;float:left;border:0px solid red; width:245px;height:145px; margin-top:65px;margin-left:20px ;'></div><div id='div_readtype2' style='letter-spacing:2px;line-height:20px;font-size:12px;border:0px solid red; width:245px;height:145px; margin-top:65px;margin-left:320px ;'></div>";
	
	intervalTraditonalRead = setInterval("traditonalRead()",200);
	intervalRapidRead = setInterval("rapidRead()",1000);
	
	traditonalRead();
	rapidRead();
}
function traditonalRead(){			
	var textarr=stringToArray("扩展视幅：汉字本身就由多个字组成，如“谢”字由“言身寸”三个字组成，一眼就能看懂。你具备一眼识别多个字的能力，经过训练可以充分开发出来！既然你具备一眼看两三个字的能力，为什么不能经过训练一眼看更多的五个十个字呢？");
	
	textarr[index1] = "<font color='red'>"+ textarr[index1] +"</font>";
	//alert(textarr.length);
	document.getElementById("div_readtype1").innerHTML = textarr.join("");
	
	index1 = (index1< (textarr.length-1))?index1 + 1:0;	
	
	//传统阅读完一遍，开始轮流播放图片
	if(index1==0){
		clearInterval(intervalRapidRead);
		clearInterval(intervalTraditonalRead);
		displayPics();
	}
}
function rapidRead(){
	var textarr=new Array("扩展视幅：汉字本身就由多个字组成，",
						   "如“谢”字由“言身寸”三个字组成，",
						   "一眼就能看懂。你具备一眼识别多个字",
						   "的能力，经过训练可以充分开发出来！",
						   "既然你具备一眼看两三个字的能力，为",
						   "什么不能经过训练一眼看更多的五个十",
						   "个字呢？");
	textarr[index2] = "<font color='red'>"+ textarr[index2] +"</font>";
	//alert(textarr.length);
	document.getElementById("div_readtype2").innerHTML = textarr.join("<br>");
	
	index2 = (index2< (textarr.length-1))?index2 + 1:0;	
}
function displayPics(){
	
	document.getElementById("javascript.img").style.display = "block";
	
	document.getElementById("mid22t").style.backgroundImage = "url(/images/product/bg.jpg)";
	
	document.getElementById("div_readtype1").style.display="none";
	document.getElementById("div_readtype2").style.display="none";
	
	intervalSlide = setInterval("slideit()",3000);
}

setTimeout("compareReadType()",3000);
//setTimeout("displayPics()",10000);
//