
$(function(){
	var index = 0;
	$(".number li").hover(function(){
		index  =  $(".number li").index(this);
		
	   $(this).fadeTo("slow", 1.0); 
	   
		showImg(index);
	},function(){
	   $(this).fadeTo("slow", 0.5); 
	   });	
	$('#image').hover(function(){
			  if(MyTime){
				 clearInterval(MyTime);
			  }
	 },function(){
			  MyTime = setInterval(function(){
			    showImg(index)
			    if(index == 0){closeimg(4)}else{
		closeimg(index-1)}
				index++;
				if(index==5){index=0;}
			  } , 5000);
	 });
	 //ΧΤΆ―ΏͺΚΌ
	 var MyTime = setInterval(function(){
		showImg(index)
		if(index == 0  ){closeimg(4)}else{
		closeimg(index-1)}
		index++;
		
		if(index==5){index=0; }
		
	 } , 5000);
})
function showImg(i){
		$("#img img")
			.eq(i).stop(true,true).fadeIn('slow')
			.parent().siblings().find("img").hide();
			$(".number li")
			.eq(i).fadeTo("slow", 1.0);
			//*.siblings().fadeTo("slow", 0.5);
		
}
function closeimg(i){
$(".number li")
			.eq(i).fadeTo("slow", 0.5);
}

function settab(id){
var dd="12";
	for(s=1;s<=dd;s++){
		if(s==id){	
			document.getElementById('menu_'+s).style.display = "block";
		}else{
			document.getElementById('menu_'+s).style.display = "none";
		}
	}

}

function op(id,id2){
document.getElementById(id).style.display="";
document.getElementById(id2).style.display="";
}
function dx(id,id2){
document.getElementById(id).style.display="none";
document.getElementById(id2).style.display="none";
}

$(document).ready(function(){
	 $(".num").fadeTo("slow", 0.5);
	 $(".autoimg3").fadeTo("slow", 0.5); 
	 $(".autoimg3").hover(function(){
	   $(this).fadeTo("slow", 1.0); 
	   },function(){
	   $(this).fadeTo("slow", 0.5); 
	   });
});

var adcn_p=document.getElementById('adcn391');
var adcn_tb=document.getElementById('adcn363');
var oriht = 0;
var myintv;
function curlup(){ //only apply to AdChina
adcn_s = adcn_p.getElementsByTagName('span')[0];
  if(oriht > 1){
    oriht -=4;
    adcn_s.style.height = oriht+"px";
  }
  else {
    adcn_p.style.display = "none";
    clearInterval(myintv);
  }
}
setTimeout(function(){
if(adcn_p.getElementsByTagName('span') && adcn_p.getElementsByTagName('span').length > 0){
adcn_p.style.display = '';
adcn_s = adcn_p.getElementsByTagName('span')[0];
oriht = parseInt(adcn_s.style.height);
adcn_s.style.overflow='hidden';
setTimeout("myintv = setInterval('curlup()',8)",5500);
}
 if(adcn_tb.getElementsByTagName('span') && adcn_tb.getElementsByTagName('span').length > 0){
   adcn_s = adcn_tb.getElementsByTagName('span')[0];
   document.getElementsByTagName('table')[2].style.display='none';
   adcn_tb.style.display = '';
   document.getElementsByTagName('body')[0].style.marginTop = '0px';
 }
},90);

