
	//À¸Ä¿ÇÐ»»
function display(num){
   document.getElementById('c'+num).className="on";
   document.getElementById('n'+num).style.display="";
   
   for(var i=1;i<=9;i++){
   if(i!=num){
   if(document.getElementById('c'+i)!=null&&document.getElementById('n'+i)!=null){
   document.getElementById('c'+i).className="";
   document.getElementById('n'+i).style.display="none";
   }
   }
   }
}

//¼òÀú¹ö¶¯
function $(id){
	if (document.getElementById(id)){
		return document.getElementById(id);
	}else{
		return false;
	}
}

function myscroller(){
	this.speeder = 1;
	this.dheight = 20;
	this.seconds = 3000;
	this.movetyper = new Array();
	this.moveheights = new Array();
	this.screenheights = new Array();
	this.scrollerheight = new Array();
	this.screenaccesses = new Array();
	this.processer = new Array();
	this.up = function(id,mh,sh,rer){
		if (!$(id)){
			return false;
		}
		this.tmperid = id + '_scroller';
		if (!$(this.tmperid)){
			this.movetyper[id] = 'up';
			this.moveheights[id] = mh ? mh : this.dheight;
			this.screenheights[id] = sh ? sh : this.moveheights[id];
			this.appender(id);
			this.scrollerheight[id] = $(this.tmperid).scrollHeight
			this.screenaccesses[id] = true;
			this.processer[id] = setTimeout('marqueer.up("' + id + '")',this.seconds);
		}else{
			if (!this.screenaccesses[id]){
				return false;
			}
			this.tmptop = $(this.tmperid).scrollTop;
			if (rer){
				$(this.tmperid).scrollTop = 0;
				this.processer[id] = setTimeout('marqueer.up("' + id + 
'")',this.seconds);
			}else if (this.tmptop >= this.scrollerheight[id] - this.screenheights[id]){
				this.processer[id] = setTimeout('marqueer.up("' + id + 
'","","","true")',this.seconds);
			}else{
				this.tmptop += 1;
				$(this.tmperid).scrollTop = this.tmptop;
				if (this.tmptop % this.moveheights[id] == 0){
					this.processer[id] = setTimeout('marqueer.up("' + id + 
'")',this.seconds);
				}else{
					this.processer[id] = setTimeout('marqueer.up("' + id + 
'")',this.speeder);
				}
			}
		}
	}
	this.stoper = function(id){
		this.screenaccesses[id] = false;
		clearTimeout(this.processer[id]);
		this.processer[id] = null;
	}
	this.starter = function(id){
		this.screenaccesses[id] = true;
		this.processer[id] = setTimeout('marqueer.up("' + id + '")',this.speeder);
	}
	this.appender = function(id){
		this.tmperid = id + '_scroller';
		this.tmperhtml = $(id).innerHTML;	$(id).innerHTML = '';
		this.appended = document.createElement('div');
		this.appended.setAttribute('id',this.tmperid);
		$(id).appendChild(this.appended);
		$(this.tmperid).innerHTML = this.tmperhtml;
		$(this.tmperid).style.overflow = 'hidden';
		$(this.tmperid).style.height = this.screenheights[id] + 'px';
	}
}
marqueer = new myscroller();
					var rdm=Math.random();
rdm=1+1;
document.getElementById("img51").src="wp-content/themes/inove/img/ad_"+rdm+".jpg";
document.getElementById("linkl1").href=document.getElementById("linkl"+rdm+"").href;
document.getElementById("img5"+rdm+"").src="wp-content/themes/inove/img/ad_1.jpg";
document.getElementById("linkl"+rdm+"").href="#"
document.getElementById("link5pic").href=document.getElementById("linkl1").href;
document.getElementById("btnimg1").href=document.getElementById("linkl1").href;
document.getElementById("btnimg"+rdm+"").href="#"
var layeri=0;
var stopshow=0;
var timeout=0;

function moveformat(id){
if(stopshow==0){
picswin(id);
var browser=navigator.appName;
if(browser!="Microsoft Internet Explorer"){
layeri++;
document.getElementById(id).style.zIndex = layeri;
document.getElementById(id).style.left=(0+"px");
var linkid="link"+id;
document.getElementById("link5pic").href=document.getElementById(linkid).href;
}
else{
document.getElementById(id).style.posLeft = 360;
layeri++;
document.getElementById(id).style.zIndex = layeri;
movestart(id);
}
}
}

function movestart(id){
if(document.getElementById(id).style.posLeft!=0){
var mnum=document.getElementById(id).style.posLeft*0.2;
var x=document.getElementById(id).style.posLeft-mnum;
document.getElementById(id).style.posLeft=x;
moveid=id;
setTimeout("movestart(moveid);",30);
}
else{
var linkid="link"+id;
document.getElementById("link5pic").href=document.getElementById(linkid).href;
}
}

var i=1;

function showindexad(){
if (i<3 && stopshow==0){
  i++;
  var picid="l";
  picid=picid+i;
  setTimeout("moveformat('"+picid+"');showindexad();",5000);
  }
else if(stopshow==0){
  i=1;
  var picid="l";
  picid=picid+i;
  setTimeout("moveformat('"+picid+"');showindexad();",5000);
  }
else{
timeout=1;
}
}

showindexad();

function picsw(id) {
if(document.getElementById("pn"+id+"").src!="wp-content/themes/inove/img/p"+id+".gif"){
picswin(id);
showindexad2(id);
}
}

function picswin(id){
document.getElementById("pnl1").src="wp-content/themes/inove/img/pl1a.gif";
document.getElementById("pnl2").src="wp-content/themes/inove/img/pl2a.gif";
document.getElementById("pnl3").src="wp-content/themes/inove/img/pl3a.gif";
document.getElementById("pn"+id+"").src="wp-content/themes/inove/img/p"+id+".gif";
}

function showindexad2(id){
  stopshow=1;
  var browser=navigator.appName;
  if(browser!="Microsoft Internet Explorer"){
  layeri++;
  document.getElementById(id).style.zIndex = layeri;
  document.getElementById(id).style.left=(0+"px");
  var linkid="link"+id;
  document.getElementById("link5pic").href=document.getElementById("link"+id).href;
  }
else{
  document.getElementById(id).style.posLeft = 360;
  layeri++;
  document.getElementById(id).style.zIndex = layeri;
  movestart(id);
  }
}
function startauto(){
  stopshow=0;
  if(timeout==1){
  showindexad();
  timeout=0;
  }
}
