﻿var tablink_idname = new Array("LLK5Link","LLKLink")
var tabcontent_idname = new Array("LLK5Content","LLKContent") 
var tabcount = new Array("3","3")
var loadtabs = new Array("2","1")  
var autochangemenu = 0;
var changespeed = 5;
var stoponhover = 1;
function easytabs(menunr, active) {if (menunr == autochangemenu){currenttab=active;}if ((menunr == autochangemenu)&&(stoponhover==1)) {stop_autochange()} else if ((menunr == autochangemenu)&&(stoponhover==0))  {counter=0;}menunr = menunr-1;for (i=1; i <= tabcount[menunr]; i++){document.getElementById(tablink_idname[menunr]+i).className='tab'+i;document.getElementById(tabcontent_idname[menunr]+i).style.display = 'none';}document.getElementById(tablink_idname[menunr]+active).className='tab'+active+' tabactive';document.getElementById(tabcontent_idname[menunr]+active).style.display = 'block';}var timer; counter=0; var totaltabs=tabcount[autochangemenu-1];var currenttab=loadtabs[autochangemenu-1];function start_autochange(){counter=counter+1;timer=setTimeout("start_autochange()",1000);if (counter == changespeed+1) {currenttab++;if (currenttab>totaltabs) {currenttab=1}easytabs(autochangemenu,currenttab);restart_autochange();}}function restart_autochange(){clearTimeout(timer);counter=0;start_autochange();}function stop_autochange(){clearTimeout(timer);counter=0;}

window.onload=function(){
var menucount=loadtabs.length; var a = 0; var b = 1; do {easytabs(b, loadtabs[a]);  a++; b++;}while (b<=menucount);
if (autochangemenu!=0){start_autochange();}
}

var tt; 
var key=0; 
var counts=3; 

function change_img()
{

	if(key==0){key=1;} 
	else if(document.all)
	{
	document.getElementById("pic").filters[0].Apply(); 
	document.getElementById("pic").filters[0].Play(duration=2); 
	document.getElementById("pic").filters[0].Transition=23;
	}
	
	eval('document.getElementById("pic").src=img'+nn+'.src'); 
	eval('document.getElementById("url").href=url'+nn); 
	eval('document.getElementById("title").innerHTML=txt'+nn+'.txt'); 
	var Text=eval('txt'+nn+'.txt');
	var Link=eval('url'+nn);
	document.getElementById("title").innerHTML="<a href="+Link+">"+Text+"</a>";
	document.getElementById("pic").alt=Text;
	
	for (var i=1;i<=counts;i++)
	{
	document.getElementById("xxjdjj"+i).className='axx'; 
	}
	document.getElementById("xxjdjj"+nn).className='bxx'; 
	nn++;
	if(nn>counts){nn=1;} 
	tt=setTimeout('change_img()',7000); 
}

function changeimg(n)
{
	nn=n; 
	window.clearInterval(tt); 
	change_img();
}

function ShowRotateImg()
{
	var widths=280; 
	var w=2*2;
	var widthss=widths+w;
	var heights=210; 
	var heightss=heightss+w;
	var heightt=20;

	
	img1=new Image();img1.src='/image/RotateImg1.jpg';
	url1=new String("/LLK5/");
	txt1=new Image();txt1.txt='连连看5正式发布';
	
	img2=new Image();img2.src='/image/RotateImg2.jpg';
	url2=new String("http://bbs.llk.cn/showtopic-22.aspx");
	txt2=new Image();txt2.txt='连连看5“唛哩唛哩轰”主题';
	
	img3=new Image();img3.src='/image/RotateImg3.jpg';
	url3=new String("http://bbs.llk.cn/showtopic-185.aspx");
	txt3=new Image();txt3.txt='连连看5烛光悼念动态背景';

	var nn=1; 

	document.write('<style>');
	document.write('.axx{padding:1px 7px;border-left:#cccccc 1px solid;font-size:12px;}');
	document.write('a.axx:link,a.axx:visited{color:#fff;line-height:12px;font:9px sans-serif;background-color:#666;}');
	document.write('a.axx:active,a.axx:hover{color:#fff;line-height:12px;font:9px sans-serif;background-color:#999;}');
	document.write('.bxx{padding:1px 7px;border-left:#cccccc 1px solid;}');
	document.write('a.bxx:link,a.bxx:visited{color:#fff;line-height:12px;font:9px sans-serif;background-color:#009900;}');
	document.write('a.bxx:active,a.bxx:hover{color:#fff;line-height:12px;font:9px sans-serif;background-color:#ff9900;}');
	document.write('</style>');

	document.write('<div style="width:'+widthss+'px;height:'+heights+'px;overflow:hidden;text-overflow:clip">');
	document.write('<div style="width:100%;filter:alpha(style=0,opacity=80"><a id="url"><img id="pic" style="border:2px #def solid;FILTER: progid:DXImageTransform.Microsoft.RevealTrans (duration=2,transition=23)" width='+widths+' height='+heights+' /></a></div>');
	document.write('<div style="filter:alpha(style=1,opacity=10,finishOpacity=90);background: #888888;width:280px;text-align:right;top:-16px;position:relative;margin:1px;height:14px;border:0px;padding-top:1px;z-index:4000;"><div>');
	for(var i=1;i<counts+1;i++)
	{
		document.write('<a href="javascript:changeimg('+i+');" id="xxjdjj'+i+'" class="axx" target="_self">'+i+'</a>');
	}
	document.write('</div></div></div>');
	document.write('<div align=center id="title" type="txt" style="border-top:0 solid white;width:'+widthss+'px;color:#ff8800;font-size:12px;padding-top:1;text-align:center;"></div>');
	changeimg(1);

}

