//<![CDATA[
function popupZone() {
	var id1, id2;
	for (var i=1;i<=popupItemCount;i++) {
		if (popupZoneTmpVal!=1) {
			popupZoneVal = popupZoneTmpVal;
			popupZoneTmpVal = 1;
		}
		if (popupZoneVal == popupItemCount+1) popupZoneVal = 1;
		id1 = "popNum"+i;
		id2 = "bannerZone_"+i;
		if (popupZoneVal==i) {
			document.getElementById(id1).setAttribute('src',"/open_content/main_page/main_0"+i+"_over.gif");
			document.getElementById(id2).style.top	= "0px";
		} else {
			document.getElementById(id1).setAttribute('src',"/open_content/main_page/main_0"+i+"_off.gif");
			document.getElementById(id2).style.top	= "-9000px";
		}
	}
	popupZoneVal = popupZoneVal + 1;
	if (popupZoneVal == 1) {
		autocontrolvar=setTimeout("popupZone()",0);	
	} else {
		autocontrolvar=setTimeout("popupZone()",waitTime);			
	}
}

function popupZoneStop(chk) {
	if (chk) {
		clearTimeout(autocontrolvar);
		document.getElementById("bannerStop").setAttribute("src","/open_content/main_page/pz_btn_stop_h.gif");		
		document.getElementById("bannerPlay").setAttribute("src","/open_content/main_page/pz_btn_play.gif");
		document.getElementById("popupText").innerHTML = "Stop";
	} else {
		clearTimeout(autocontrolvar);
		document.getElementById("bannerStop").setAttribute("src","/open_content/main_page/pz_btn_stop.gif");		
		document.getElementById("bannerPlay").setAttribute("src","/open_content/main_page/pz_btn_play_h.gif");		
		document.getElementById("popupText").innerHTML = "Play";		
		popupZone();
	}
}

function popupZoneMove(num) {
	var id1, id2;
	for (i=1;i<=popupItemCount;i++) {
		id1 = "popNum"+i;
		id2 = "bannerZone_"+i;
		if (num==i) {
			document.getElementById(id1).setAttribute('src',"/open_content/main_page/main_0"+i+"_over.gif");
			document.getElementById(id2).style.top	= "0px";
		} else {
			document.getElementById(id1).setAttribute('src',"/open_content/main_page/main_0"+i+"_off.gif");
			document.getElementById(id2).style.top	= "-9000px";
		}
	}
	popupZoneVal = num;
	popupZoneTmpVal = num;
	popupZoneStop(1);
}
popupZone();
//]]>