// JavaScript Document
var page_top=0;page_new=0;
var scrollTopadd=60;
function top_scroll(){
	page_top = document.body.scrollTop;
	if (page_top==0) page_top = document.documentElement.scrollTop;
	page_new = page_new+(page_top-page_new)/2;
	document.getElementById("btnspeakfor").style.top= (scrollTopadd+page_new)+"px";
}
if (document.getElementById("btnspeakfor")) var ad_time= setInterval('top_scroll()',30);


var pageisIE=(navigator.appVersion.indexOf("MSIE")!=-1) ? true :false;
var pageisIE6=(navigator.appVersion.indexOf("MSIE 6")!=-1) ? true :false;
var pageisFF2=(navigator.userAgent.indexOf("Firefox/2")>0 || navigator.userAgent.indexOf("Firefox/1")>0)? true :false;
var pjs=new Array();
var t_i=-1;
function pageend(){
	if (!document.getElementsByTagName) return;
	var anchors=document.getElementsByTagName("*");
	for (var anchor_i=0; anchor_i<anchors.length; anchor_i++) {
		if (pageisIE6 && anchors[anchor_i].nodeName=="IMG") {
			if (anchors[anchor_i].src.toUpperCase().substring(anchors[anchor_i].src.toUpperCase().length-3,anchors[anchor_i].src.toUpperCase().length) == "PNG") {
				if (anchors[anchor_i].complete) {
					pngtm(anchors[anchor_i]);
				} else {
					if (anchors[anchor_i].onload==null) mf(anchors[anchor_i],"onload","pngtm(this)");
				}
			}
		}
		var aclass=anchors[anchor_i].className.split(" ");
		for (var j_i=0; j_i<aclass.length;j_i++) {
			switch (aclass[j_i]) {
				case "scrolldoor":slidingdoor_main(anchors[anchor_i],'onmouseover','.scrolldoor_content','.scrolldoor_content_til','.scrolldoor_title');break;
				
				//case "column_lookback":groud_photos_main(anchors[anchor_i]);break;
			}
		}
	}
}

function pngtm(thisimg){
	if (thisimg.onload!=null) thisimg.onload=null;
	var i_w=thisimg.width;
	var i_h=thisimg.height;
	thisimg.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+thisimg.src+", sizingmethod=scale);";
	thisimg.src="images/tm.gif";
	thisimg.width=i_w;
	thisimg.height=i_h;
}
function mf(t_d,t_k,t_l){
	var t_m=(typeof(t_d)=="object")?t_d:document.getElementById(t_d);
	if (pageisFF2) {
		t_m.setAttribute(t_k,t_l);
	}else {
		switch (t_k) {
			case "onmouseover":with (t_m) onmouseover=new Function(t_l);break;
			case "onmouseout":with (t_m) onmouseout=new Function(t_l);break;
			case "onmousemove":with (t_m) onmousemove=new Function(t_l);break;
			case "onclick":with (t_m) onclick=new Function(t_l);break;
			case "onload":with (t_m) onload=new Function(t_l);break;
			case "onchange":with (t_m) onchange=new Function(t_l);break;
			case "onblur":with (t_m) onblur=new Function(t_l);break;
			case "onfocus":with (t_m) onfocus=new Function(t_l);break;
			case "onreset":with (t_m) onreset=new Function(t_l);break;
			case "onsubmit":with (t_m) onsubmit=new Function(t_l);break;
			case "ondblclick":with (t_m) ondblclick=new Function(t_l);break;
			case "onmousedown":with (t_m) onmousedown=new Function(t_l);break;
			case "onmouseup":with (t_m) onmouseup=new Function(t_l);break;
			case "onkeypress":with (t_m) onkeypress=new Function(t_l);break;
			case "onkeydown":with (t_m) onkeydown=new Function(t_l);break;
			case "onkeyup":with (t_m) onkeyup=new Function(t_l);break;
			case "onabort":with (t_m) onabort=new Function(t_l);break;
			case "onbeforeunload":with (t_m) onbeforeunload=new Function(t_l);break;
			case "onerror":with (t_m) onerror=new Function(t_l);break;
			case "onmove":with (t_m) onmove=new Function(t_l);break;
			case "onresize":with (t_m) onresize=new Function(t_l);break;
			case "onscroll":with (t_m) onscroll=new Function(t_l);break;
			case "onstop":with (t_m) onstop=new Function(t_l);break;
			case "onunload":with (t_m) onunload=new Function(t_l);break;
			case "onbounce":with (t_m) onbounce=new Function(t_l);break;
			case "onfinish":with (t_m) onfinish=new Function(t_l);break;
			case "onstart":with (t_m) onstart=new Function(t_l);break;
			case "onbeforecopy":with (t_m) onbeforecopy=new Function(t_l);break;
			case "onbeforecut":with (t_m) onbeforecut=new Function(t_l);break;
		}
	}
}
function tagif(t_d,t_k) {
	var tagname="";var tagclass="";var tagid="";
	if (t_k.indexOf("#")>=0) {
		tagname=t_k.substring(0,t_k.indexOf("#"));
		if (tagname.indexOf(".")>0) {
			tagclass=tagname.substring(tagname.indexOf(".")+1);
			tagname=tagname.substring(0,tagname.indexOf("."));
		}
		tagid=t_k.substring(t_k.indexOf("#")+1);
		if (tagid.indexOf(".")>0) {
			tagclass=tagid.substring(tagid.indexOf(".")+1);
			tagid=tagid.substring(0,tagid.indexOf("."));
		}
	} else if(t_k.indexOf(".")>=0){
		tagclass=t_k.substring(t_k.indexOf(".")+1);
		tagname=t_k.substring(0,t_k.indexOf("."));
	} else {
		tagname=t_k;
	}
	var tagnameif=(tagname=="")?true:((t_d.nodeName==tagname.toUpperCase())?true:false);
	var tagclassif=(tagclass=="")?true:(((" "+t_d.className+" ").indexOf(" "+tagclass+" ")>=0)?true:false);
	var tagidif=(tagid=="")?true:((t_d.id==tagid)?true:false);
	return((tagnameif && tagclassif && tagidif));
}
function newtag(t_d){
	var tagname="";var tagclass="";var tagid="";
	if (t_d.indexOf("#")>0) {
		tagname=t_d.substring(0,t_d.indexOf("#"));
		if (tagname.indexOf(".")>0) {
			tagclass=tagname.substring(tagname.indexOf(".")+1);
			tagname=tagname.substring(0,tagname.indexOf("."));
		}
		tagid=t_d.substring(t_d.indexOf("#")+1);
		if (tagid.indexOf(".")>0) {
			tagclass=tagid.substring(tagid.indexOf(".")+1);
			tagid=tagid.substring(0,tagid.indexOf("."));

		}
	} else if(t_d.indexOf(".")>0){
		tagclass=t_d.substring(t_d.indexOf(".")+1);
		tagname=t_d.substring(0,t_d.indexOf("."));
	} else {
		tagname=t_d;
	}
	var tagnew=document.createElement(tagname);
	if (tagclass!="") tagnew.className=tagclass;
	if (tagid!="") tagnew.id=tagid;
	return(tagnew);
}
function subif(t_d,t_k){
	var ifsub=false;
	var asub=t_d.getElementsByTagName("*");
	for (var j_s=0;j_s<asub.length;j_s++) {
		if(asub[j_s]==t_k) {
			ifsub=true;j_s=asub.length;
		}
	}
	return(ifsub);
}

function photo_auto_main(t_d,img_w,img_h,img_place){
	if (t_d.nodeName=="IMG") {
		if (t_d.complete) {
			photo_auto(t_d,img_w,img_h,img_place);
		} else {
			mf(t_d,"onload","photo_auto(this,"+img_w+","+img_h+",'"+img_place+"')");
		}
	} else {
		var anchorsub=t_d.getElementsByTagName("img");
		for (var j_j=0;j_j<anchorsub.length;j_j++) {
			if (anchorsub[j_j].complete) {
				photo_auto(anchorsub[j_j],img_w,img_h,img_place);
			} else {
				mf(anchorsub[j_j],"onload","photo_auto(this,"+img_w+","+img_h+",'"+img_place+"')");
			}
		}
	}
}
function photo_auto(thisimg,img_w,img_h,img_place){
	if (thisimg.onload!=null) thisimg.onload=null;
	var i_w=thisimg.width;
	var i_h=thisimg.height;
	if (img_w>0 && img_h>0) {
		if (i_w>=img_w) {
			if (i_h*img_w/i_w>=img_h){
				thisimg.style.width=parseInt(i_w*img_h/i_h)+"px";
				thisimg.style.height=img_h+"px";
				if (img_place=="center") thisimg.style.padding="0 "+parseInt((img_w-i_w*img_h/i_h)/2)+"px 0 "+(img_w-parseInt(i_w*img_h/i_h)-parseInt((img_w-i_w*img_h/i_h)/2))+"px";
			} else {
				thisimg.style.width=img_w+"px";
				thisimg.style.height=parseInt(i_h*img_w/i_w)+"px";
				if (img_place=="center") thisimg.style.padding=parseInt((img_h-i_h*img_w/i_w)/2)+"px 0 "+(img_h-parseInt(i_h*img_w/i_w)-parseInt((img_h-i_h*img_w/i_w)/2))+"px 0";
			}
		} else {
			if (i_h>=img_h) {
				thisimg.style.height=img_h+"px";
				thisimg.style.width=parseInt(i_w*img_h/i_h)+"px";
				if (img_place=="center") thisimg.style.padding="0 "+parseInt((img_w-i_w*img_h/i_h)/2)+"px 0 "+(img_h-parseInt(i_w*img_h/i_h)-parseInt((img_w-i_w*img_h/i_h)/2))+"px";
			} else {
				if (img_place=="center") thisimg.style.padding=parseInt((img_h-i_h)/2)+"px "+parseInt((img_w-i_w)/2)+"px "+(img_h-i_h-parseInt((img_h-i_h)/2))+"px "+(img_w-i_w-parseInt((img_w-i_w)/2))+"px";
			}
		}
	} else {
		if (img_w<1) {
			if (i_h>img_h) {
				thisimg.style.width=parseInt(i_w*img_h/i_h)+"px";
				thisimg.style.height=img_h+"px";
			} else {
				if (img_place=="center") thisimg.style.padding=parseInt((img_h-i_h)/2)+"px 0px "+(img_h-i_h-parseInt((img_h-i_h)/2))+"px";
			}
		} else {
			if (i_w>img_w) {
				thisimg.style.height=parseInt(i_h*img_w/i_w)+"px";
				thisimg.style.width=img_w+"px";
			} else {
				if (img_place=="center") thisimg.style.padding="0px "+parseInt((img_w-i_w)/2)+"px 0px "+(img_w-i_w-parseInt((img_w-i_w)/2))+"px";
			}
		}
	}
	if (pageisIE6 && thisimg.src.toUpperCase().substring(thisimg.src.toUpperCase().length-3,thisimg.src.toUpperCase().length)=="PNG") pngtm(thisimg);
}

function addnode(t_d,t_w,t_p,t_n){
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],t_w)) {
			switch (t_p) {
				case "start":
					if (anchorsub[j_j].firstChild) {
						anchorsub[j_j].insertBefore(newtag(t_n),anchorsub[j_j].firstChild);
					} else {
						anchorsub[j_j].appendChild(newtag(t_n));
					}
				break;
				case "before":anchorsub[j_j].parentNode.insertBefore(newtag(t_n),anchorsub[j_j]);break;
				case "after":
					if (anchorsub[j_j].nextSibling) {
						anchorsub[j_j].parentNode.insertBefore(newtag(t_n),anchorsub[j_j].nextSibling);
					} else {
						anchorsub[j_j].parentNode.appendChild(newtag(t_n));
					}
				break;nextSibling
				default:anchorsub[j_j].appendChild(newtag(t_n));
			}
		}
	}
}

function menu_main(t_d,t_k){
	var anchorsub=t_d.getElementsByTagName("*");
	for (var j_j=0;j_j<anchorsub.length;j_j++) {
		if (tagif(anchorsub[j_j],t_k)) {
			mf(anchorsub[j_j],"onmouseover","menu(this,'on')");
			mf(anchorsub[j_j],"onmouseout","menu(this,'out')");
		}
	}
}
function menu(t_j,t_k) {
	if (t_k=="on") {
		if (t_j.className.indexOf(" mouseon")<0) t_j.className+=" mouseon";
	} else {
		if (t_j.className.indexOf(" mouseon")>=0) t_j.className=t_j.className.substring(0,t_j.className.indexOf(" mouseon"));
	}
}

function slidingdoor_main(t_d,t_k,d_container,d_title,d_btn){
	t_i++;
	pjs[t_i]=new Array(); var t_l=0; var t_m=-1;var btn=t_d;pjs[t_i][0]=0;
	var anchorsub=t_d.getElementsByTagName("*");
	var slidingtil=newtag("ul.slidingdoor_title");
	for (var j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],d_container)){
			t_m=j_j;
		} else if (tagif(anchorsub[j_j],d_title)){
			if (t_m>=0) {
				if (subif(anchorsub[t_m],anchorsub[j_j])){
					t_l++;
					if (!anchorsub[t_m].id) anchorsub[t_m].id="pjs"+t_i+"_"+(2*t_l);
					pjs[t_i][2*t_l]=anchorsub[t_m].id;
					pjs[t_i][2*t_l+1]="pjs"+t_i+"_"+(2*t_l+1);
					var newli=newtag("li#"+pjs[t_i][2*t_l+1]);
					if (anchorsub[t_m].className.indexOf("sliding_on")>=0) {
						anchorsub[t_m].className=anchorsub[t_m].className.substring(0,anchorsub[t_m].className.indexOf("sliding_on"))+anchorsub[t_m].className.substring(anchorsub[t_m].className.indexOf("sliding_on")+10)+" sliding_on";
						newli.className="slidingbtn"+t_l+" slidingtil_on";
						pjs[t_i][0]=t_l;
					} else {
						newli.className="slidingbtn"+t_l;
					}
					newli.innerHTML=anchorsub[j_j].innerHTML;
					slidingtil.appendChild(newli);
					mf(newli,t_k,"slidingdoor("+t_i+","+t_l+")");
					t_m=-1;
				}
			}
		} else if (d_btn!=undefined && tagif(anchorsub[j_j],d_btn)) {
			btn=anchorsub[j_j];
		}
	}
	if (!!btn.firstChild) {
		btn.insertBefore(slidingtil,btn.firstChild);
	} else {
		btn.appendChild(slidingtil);
	}
	if (pjs[t_i][0]==0) slidingdoor(t_i,1);
}
function slidingdoor(t_d,t_l){
	if (t_l!=pjs[t_d][0]) {
		if (pjs[t_d][0]>0) {
			var c_a_o=document.getElementById(pjs[t_d][2*pjs[t_d][0]]);
			if (c_a_o.className.indexOf(" sliding_on")>=0) {
				var c_b_o=document.getElementById(pjs[t_d][2*pjs[t_d][0]+1]);
				c_a_o.className=c_a_o.className.substring(0,c_a_o.className.indexOf(" sliding_on"));
				c_b_o.className=c_b_o.className.substring(0,c_b_o.className.indexOf(" slidingtil_on"));
			}
		}
		document.getElementById(pjs[t_d][2*t_l]).className+=" sliding_on";
		document.getElementById(pjs[t_d][2*t_l+1]).className+=" slidingtil_on";
		pjs[t_d][0]=t_l;
	}
}

function scontent_main(t_d,t_k){
	t_i++;j_l=1;
	pjs[t_i]=new Array();pjs[t_i][0]=2;
	var anchorsub=t_d.getElementsByTagName("*");
	for (j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],t_k)){
			j_l++;
			if (!anchorsub[j_j].id) anchorsub[j_j].id="pjs_"+t_i+"_"+j_l;
			pjs[t_i][j_l]=anchorsub[j_j].id;
			anchorsub[j_j].style.display=(j_l==2)?"block":"none";
		}
	}
	var btn_up=newtag("a.btn_up");
	var btn_dn=newtag("a.btn_dn");
	t_d.appendChild(btn_up);
	t_d.appendChild(btn_dn);
	mf(t_d,"onmouseover","scontent_stop("+t_i+",0)");
	mf(t_d,"onmouseout","scontent_stop("+t_i+",1)");
	mf(btn_up,"onclick","scontent("+t_i+",-1)");
	mf(btn_dn,"onclick","scontent("+t_i+",1)");
	pjs[t_i][1]=setInterval("scontent("+t_i+",1)",3000);
}
function scontent_stop(t_d,t_n){
	clearInterval(pjs[t_d][1]);
	if (t_n==1) pjs[t_d][1]=setInterval("scontent("+t_d+",1)",3000);
}
function scontent(t_d,t_n){
	document.getElementById(pjs[t_d][pjs[t_d][0]]).style.display="none";
	pjs[t_d][0]=pjs[t_d][0]+t_n;
	if (pjs[t_d][0]==0) pjs[t_d][0]=pjs[t_d].length-1;
	if (pjs[t_d][0]==pjs[t_d].length) pjs[t_d][0]=2;
	document.getElementById(pjs[t_d][pjs[t_d][0]]).style.display="block";
}
function sad_main(t_d,t_k,t_min,t_max,t_h){
	t_i++;j_l=6;
	pjs[t_i]=new Array();pjs[t_i][0]=0;pjs[t_i][3]=0;pjs[t_i][4]=t_min;pjs[t_i][5]=t_max;pjs[t_i][6]=t_h
	var anchorsub=t_d.getElementsByTagName("*");
	for (j_j=0; j_j<anchorsub.length; j_j++) {
		if (tagif(anchorsub[j_j],t_k)){
			j_l++;
			if (!anchorsub[j_j].id) anchorsub[j_j].id="pjs_"+t_i+"_"+j_l;
			pjs[t_i][j_l]=anchorsub[j_j].id;
			mf(anchorsub[j_j],"onmouseover","sad("+t_i+","+j_l+")");
		}
	}
	mf(t_d,"onmouseover","sad_stop("+t_i+",0)");
	mf(t_d,"onmouseout","sad_stop("+t_i+",1)");
	sad(t_i,7);
	pjs[t_i][1]=setInterval("sad("+t_i+",0)",5000);
}
function sad_stop(t_d,t_n){
	clearInterval(pjs[t_d][1]);
	if (t_n==1) pjs[t_d][1]=setInterval("sad("+t_d+",0)",5000);
}
function sad(t_d,t_n){
	var t_l=t_n;
	if (t_l==0) t_l=(pjs[t_d][0]>(pjs[t_d].length-2))?7:(pjs[t_d][0]+1);
	if (t_l==1) t_l=7;
	if (pjs[t_d][0]!=t_l && pjs[t_d][3]==0) {
		clearInterval(pjs[t_d][2]);
		pjs[t_d][2]=setInterval("sad_m("+t_d+","+t_l+")",5);
	}
}
function sad_m(t_d,t_n){
	pjs[t_d][3]++;
	if (pjs[t_d][3]<20) {
		if (pjs[t_d][0]>0) document.getElementById(pjs[t_d][pjs[t_d][0]]).style.width=(pjs[t_d][5]-parseInt((pjs[t_d][5]-pjs[t_d][4])*pjs[t_d][3]/20))+"px";
		if (pjs[t_d][0]>0) document.getElementById(pjs[t_d][pjs[t_d][0]]).style.top=parseInt(pjs[t_d][6]*(1-Math.abs(pjs[t_d][3]/10-1)))+"px";
		document.getElementById(pjs[t_d][t_n]).style.width=(pjs[t_d][4]+parseInt((pjs[t_d][5]-pjs[t_d][4])*pjs[t_d][3]/20))+"px";
		document.getElementById(pjs[t_d][t_n]).style.top="-"+parseInt(pjs[t_d][6]*(1-Math.abs(pjs[t_d][3]/10-1)))+"px";
	} else {
		clearInterval(pjs[t_d][2]);
		if (pjs[t_d][0]>0) document.getElementById(pjs[t_d][pjs[t_d][0]]).style.width=pjs[t_d][4]+"px";
		if (pjs[t_d][0]>0) document.getElementById(pjs[t_d][pjs[t_d][0]]).style.top="0";
		document.getElementById(pjs[t_d][t_n]).style.width=pjs[t_d][5]+"px";
		document.getElementById(pjs[t_d][t_n]).style.top="0";
		pjs[t_d][3]=0;
		pjs[t_d][0]=t_n;
	}

}

var groud_photo_speed=3000;
function groud_photos_main(t_d){
	t_i++;
	pjs[t_i]=new Array();
	var anchorsub=t_d.getElementsByTagName("*");
	pjs[t_i][1]=0;pjs[t_i][2]=0;pjs[t_i][5]=0;pjs[t_i][6]=0;pjs[t_i][7]=1;pjs[t_i][8]=0;
	pjs[t_i][11]=false;pjs[t_i][14]=0;pjs[t_i][17]=false;pjs[t_i][21]=new Array();
	for (j_j=0;j_j<anchorsub.length;j_j++) {
		pjs[t_i][0]=anchorsub[j_j].className.split(" ");
		for (j_k=0;j_k<pjs[t_i][0].length;j_k++) {
			switch (pjs[t_i][0][j_k]) {
				case "groud_photo_txt":pjs[t_i][11]=anchorsub[j_j];break;
				case "groud_photo_btntxt":
					pjs[t_i][17]=anchorsub[j_j];
					pjs[t_i][14]=1;
				break;
				case "groud_photo_btnimg":
					pjs[t_i][17]=anchorsub[j_j];
					pjs[t_i][14]=2;
				break;
				case "groud_photo":
					pjs[t_i][10]=anchorsub[j_j];
					anchorsub[j_j].style.padding=0;
					anchorsub[j_j].style.position="relative";
					anchorsub[j_j].style.overflow="hidden";
					pjs[t_i][3]=anchorsub[j_j].clientWidth;
					pjs[t_i][4]=anchorsub[j_j].clientHeight;
					if (anchorsub[j_j].getElementsByTagName("img")) {
						pjs[t_i][20]=anchorsub[j_j].getElementsByTagName("img");
						pjs[t_i][1]=pjs[t_i][20].length;
						if (anchorsub[j_j].getElementsByTagName("li")) {
							pjs[t_i][13]=anchorsub[j_j].getElementsByTagName("li");
							if(pjs[t_i][1]!=pjs[t_i][13].length) alert("IMG和LI不对应！");
						} else{
							alert("“li”标签缺失！");
						}
					}
					if (anchorsub[j_j].getElementsByTagName("span")) {
						for (j_l=0;j_l<anchorsub[j_j].getElementsByTagName("span").length;j_l++) {
							if (anchorsub[j_j].getElementsByTagName("span")[j_l].className.indexOf("photonote")>=0) {
								pjs[t_i][21][j_l]=anchorsub[j_j].getElementsByTagName("span")[j_l].innerHTML;
							}
						}
					}
				break;
			}
		}
	}
	//if (pjs[t_i][11]!=false && pjs[t_i][1]>0) pjs[t_i][11].innerHTML=pjs[t_i][21][0];
	if (pjs[t_i][11]!=false && pjs[t_i][1]>0) pjs[t_i][11].innerHTML=pjs[t_i][20][0].alt.split("\n").join("<br />");
	if (pjs[t_i][1]>1) {
		pjs[t_i][12]=new Array();
		if (pjs[t_i][14]>0) {
			pjs[t_i][19]="";
			pjs[t_i][17].style.zIndex=4;
		}
		for (j_k=0;j_k<pjs[t_i][1];j_k++) {
			pjs[t_i][13][j_k].style.position="absolute";
			pjs[t_i][13][j_k].style.visibility="hidden";
			pjs[t_i][13][j_k].style.zIndex=1;
			pjs[t_i][13][j_k].style.overflow="hidden";
			pjs[t_i][20][j_k].style.verticalAlign="baseline";
			if (pjs[t_i][14]==1) pjs[t_i][19]+="<a href=\"javascript:groud_photos("+t_i+","+j_k+")\" id=\"btn"+t_i+"_"+j_k+"\">"+(j_k+1)+"</a>";
			if (pjs[t_i][14]>1) pjs[t_i][19]+="<a href=\"javascript:groud_photos("+t_i+","+j_k+")\" id=\"btn"+t_i+"_"+j_k+"\"><img src=\""+pjs[t_i][20][j_k].src+"\" /></a>";
			//pjs[t_i][12][j_k]=pjs[t_i][21][j_k];
			pjs[t_i][12][j_k]=pjs[t_i][20][j_k].alt.split("\n").join("<br />");
		}
		pjs[t_i][17].innerHTML=pjs[t_i][19];
		pjs[t_i][13][0].style.zIndex="2";
		pjs[t_i][13][0].style.visibility="visible";
		if (pjs[t_i][14]>0) document.getElementById("btn"+t_i+"_0").className="btn_on";
		pjs[t_i][9]=setTimeout("groud_photos_change("+t_i+")",groud_photo_speed);
		if (pageisFF2) {
			t_d.setAttribute("onmousemove","groud_photos_stop("+t_i+")");
			t_d.setAttribute("onmouseout","groud_photos_move("+t_i+")");
		}else{
			with (t_d) onmousemove=new Function("groud_photos_stop("+t_i+")");
			with (t_d) onmouseout=new Function("groud_photos_move("+t_i+")");
		}

	}
	pjs[t_i][0]=0;pjs[t_i].length=19;
}
function groud_photos_change(t_j){
	pjs[t_j][5]++;
	if (pjs[t_j][5]==1) pjs[t_j][6]=Math.round(Math.random()*6);
	if (pjs[t_j][5]<41) {
		switch (pjs[t_j][6]) {
			case 0 :
				j_k=Math.round(pjs[t_j][4]*(pjs[t_j][5]/40-1));
				j_l=Math.round(pjs[t_j][3]*(1-pjs[t_j][5]/40));
			break;
			case 1 :
				j_k=0;
				j_l=Math.round(pjs[t_j][3]*(1-pjs[t_j][5]/40));
			break;
			case 2 :
				j_k=Math.round(pjs[t_j][4]*(1-pjs[t_j][5]/40));
				j_l=Math.round(pjs[t_j][3]*(pjs[t_j][5]/40-1));
			break;
			case 3 :
				j_k=Math.round(pjs[t_j][4]*(pjs[t_j][5]/40-1));
				j_l=Math.round(pjs[t_j][3]*(pjs[t_j][5]/40-1));
			break;
			case 4 :
				j_k=0;
				j_l=Math.round(pjs[t_j][3]*(pjs[t_j][5]/40-1));
			break;
			case 5 :
				j_k=Math.round(pjs[t_j][4]*(1-pjs[t_j][5]/40));
				j_l=Math.round(pjs[t_j][3]*(1-pjs[t_j][5]/40));
			break;
			default:j_k=0;j_l=0;
			if (pageisIE) {
				pjs[t_j][10].style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+Math.abs(100-pjs[t_j][5]*5)+")";
			} else {
				pjs[t_j][10].style.opacity=Math.abs(100-pjs[t_j][5]*5)/100;
			}
		}
		if (pjs[t_j][5]<21) {
			pjs[t_j][13][pjs[t_j][7]].style.visibility="visible";
			pjs[t_j][13][pjs[t_j][7]].style.zIndex=3;
			pjs[t_j][13][pjs[t_j][7]].style.top=j_k+"px";
			pjs[t_j][13][pjs[t_j][7]].style.left=j_l+"px";
		} else { 
			pjs[t_j][13][pjs[t_j][8]].style.visibility="visible";
			pjs[t_j][13][pjs[t_j][2]].style.top=j_k+"px";
			pjs[t_j][13][pjs[t_j][2]].style.left=j_l+"px";
		}
		if (pjs[t_j][5]==20) {
			pjs[t_j][8]=pjs[t_j][2];
			pjs[t_j][2]=pjs[t_j][7];
			pjs[t_j][7]++;
			if (pjs[t_j][7]>=pjs[t_j][1]) pjs[t_j][7]=0;
			for (j_i=0;j_i<pjs[t_j][1];j_i++) {
				if (pjs[t_j][14]>0) document.getElementById("btn"+t_j+"_"+j_i).className="";
			}
			if (pjs[t_j][14]>0) document.getElementById("btn"+t_j+"_"+pjs[t_j][2]).className="btn_on";
			if (pjs[t_j][11]!=false) pjs[t_j][11].innerHTML=pjs[t_j][12][pjs[t_j][2]];
		}
		pjs[t_j][9]=setTimeout("groud_photos_change("+t_j+")",10);
	} else {
		if (pageisIE) {
			pjs[t_j][10].style.filter="";
		} else {
			pjs[t_j][10].style.opacity=1;
		}
		for (j_i=0;j_i<pjs[t_j][1];j_i++) {
			pjs[t_j][13][j_i].style.zIndex=1;
			pjs[t_j][13][j_i].style.visibility="hidden";
			pjs[t_j][13][j_i].style.top=0;
			pjs[t_j][13][j_i].style.left=0;
			pjs[t_j][13][j_i].style.width=pjs[t_j][3]+"px";
			pjs[t_j][13][j_i].style.hight=pjs[t_j][4]+"px";
		}
		pjs[t_j][13][pjs[t_j][2]].style.zIndex="2";
		pjs[t_j][13][pjs[t_j][2]].style.visibility="visible";
		pjs[t_j][5]=0;
		if (pjs[t_j][0]==0) pjs[t_j][9]=setTimeout("groud_photos_change("+t_j+")",groud_photo_speed);
		if (pjs[t_j][0]==3) {
			pjs[t_j][0]=1;
			pjs[t_j][9]=setTimeout("groud_photos_change("+t_j+")",groud_photo_speed);
		}
		if (pjs[t_j][0]==2) {
			pjs[t_j][0]=3;
			groud_photos_change(t_j);
		}
	}
}
function groud_photos(t_j,mt){
	clearTimeout(pjs[t_j][9]);
	if (pjs[t_j][2]!=mt) {
		pjs[t_j][0]=2;
		pjs[t_j][5]=40;
		pjs[t_j][7]=mt;
		groud_photos_change(t_j);
	} else {
		pjs[t_j][9]=setTimeout("groud_photos_change("+t_j+")",groud_photo_speed);
	}
}
function groud_photos_stop(t_j){
	if (pjs[t_j][0]==0) {
		pjs[t_j][0]=1;
		pjs[t_j][5]=40;
		clearTimeout(pjs[t_j][9]);
		groud_photos_change(t_j);
	}
}
function groud_photos_move(t_j){
	if (pjs[t_j][0]==1) {
		pjs[t_j][0]=0;
		clearTimeout(pjs[t_j][9]);
		pjs[t_j][9]=setTimeout("groud_photos_change("+t_j+")",groud_photo_speed);
	}
}
pageend();