    var pageIndex=1;
    var imgPage=6;
    var imgShow=7;
	var pageCount=0;
    var imgCount=0;
    var imgLast=0;
	var aryImages=new Array();
	var aboutArr=new Array();
	function thatwindow(txt,about){
	window.pageIndex=1;
	var imgdata=txt;
	var aboutdata=about;
	var initArr=imgdata.split("|||");
	var initArr2=aboutdata.split("|");
	for(i=0;i<initArr.length;i++){
	window.aryImages[i]=initArr[i].split("|")[1];
	window.aboutArr[i]=initArr2[i];

	}
	window.pageCount=(initArr.length%window.imgPage==0)?(initArr.length/window.imgPage):(Math.floor(initArr.length/window.imgPage)+1);
    window.imgCount=initArr.length;
    window.imgLast=window.imgCount-(window.pageCount-1)*window.imgPage;
	var eSrc=(document.all)?window.event.srcElement:arguments[1];
	var shield = document.createElement("DIV");
	shield.id = "shield";
	shield.style.position = "absolute";
	shield.style.left = "0px";
	shield.style.top = "0px";
	shield.style.width = "100%";
	shield.style.height = document.body.scrollHeight+"px";
	shield.style.background = "#000";
	shield.style.textAlign = "center";
	shield.style.zIndex = "10000";
	shield.style.filter = "alpha(opacity=0)";
	shield.style.opacity = 0;
	var alertFram = document.createElement("DIV");
	alertFram.id="alertFram";
	alertFram.style.position = "absolute";
	alertFram.style.left = "50%";
	alertFram.style.top = "50%";
	alertFram.style.marginLeft = "-360px" ;
	alertFram.style.marginTop = -290+document.documentElement.scrollTop+"px";
    alertFram.style.width = "720px";
	alertFram.style.height = "480px";
	alertFram.style.background = "#fff";
	alertFram.style.textAlign = "center";
	alertFram.style.lineHeight = "100%";
	alertFram.style.zIndex = "10001";
	strHtml="<div class=\"img_area\">\n";
	strHtml += "<div class=\"img_close\"><img src=\"../images/flahalo/webCase_ad_close.gif\" alt=\"关 闭\" width=22 height=22 border=0 onmouseover=\"this.style.cursor='pointer'; this.src='../images/flahalo/webCase_ad_close2.gif'\" onclick=\"doOk()\" onmouseout=\"this.src='../images/flahalo/webCase_ad_close.gif'\" /></div>\n";
	strHtml+="<div class=\"img_arrow\"><img src=\"../images/flahalo/webCase_ad_arrow.gif\" /></div>\n";
	strHtml+="<div id=\"imgTitle\" class=\"img_title\">"+aboutArr[0]+"</div>\n";
	strHtml+="<div class=\"img_show\"><img id=\"imgMain\" name=\"imgMain\" src=\""+window.aryImages[0]+"\" width=602 height=382 style=\"border:2px #fff;\"></div>\n";
	alertFram.innerHTML = strHtml;
	document.body.appendChild(alertFram);
	document.body.appendChild(shield);
	this.setOpacity = function(obj,opacity){
		if(opacity>=1)opacity=opacity/100;
		try{ obj.style.opacity=opacity; }catch(e){}
		try{ 
			if(obj.filters.length>0&&obj.filters("alpha")){
				obj.filters("alpha").opacity=opacity*100;
			}else{
				obj.style.filter="alpha(opacity=\""+(opacity*100)+"\")";
			}
		}catch(e){}
	}
	var c = 0;
	this.doAlpha = function(){
		if (++c > 80){clearInterval(ad);return 0;}
		setOpacity(shield,c);
	}
	var ad = setInterval("doAlpha()",1);
	this.doOk = function(){
		document.body.removeChild(alertFram);
		document.body.removeChild(shield);
		eSrc.focus();
		document.body.onselectstart = function(){return true;}
		document.body.oncontextmenu = function(){return true;}
	}
	
}
	function nextpage(){
    if(pageIndex<pageCount){
       pageIndex++;
       for(i=1;i<7;i++){
	      document.getElementById("thumb"+i).style.display="none";
 	   }
	   for(i=1;i<((pageIndex<pageCount)?7:(imgLast+1));i++){
	      document.getElementById("thumb"+i).style.display="block";
	      document['img'+i].src =aryImages[imgPage*(pageIndex-1)+i-1];
	   }
	document['imgMain'].src =aryImages[imgPage*(pageIndex-1)];
	document.getElementById('imgTitle').innerHTML=aboutArr[imgPage*(pageIndex-1)];
	}else{
	return;
	}
  }
  function prepage(){
    if(pageIndex>1){
       pageIndex--;
       for(i=1;i<7;i++){
	      document.getElementById("thumb"+i).style.display="none";
 	   }
	   for(i=1;i<(pageIndex<pageCount?7:(imgLast+1));i++){
	      document.getElementById("thumb"+i).style.display="block";
	      document['img'+i].src =aryImages[imgPage*(pageIndex-1)+i-1];
	   }
	document['imgMain'].src =aryImages[imgPage*(pageIndex-1)];
	document.getElementById('imgTitle').innerHTML=aboutArr[imgPage*(pageIndex-1)];
	}else{
	return;
	}
  }
  
  for (i=0; i < aryImages.length; i++) {
    var preload = new Image();
    preload.src = aryImages[i];
  }
  function swap(imgFlag) {
    document['imgMain'].src = aryImages[imgPage*(pageIndex-1)+imgFlag-1];
	document.getElementById('imgTitle').innerHTML=aboutArr[imgPage*(pageIndex-1)+imgFlag-1];
  }
  function resizepic(o){ 
    var a=new Image();
    a.src=o.src
    var maxwidth=50/a.height*a.width; 
    var maxheight=51; 
	o.width=maxwidth;
    o.height=maxheight;
  }
