/* 팝업창 띄우기 */
var winobject="";
function popUp(url, width, height, scrollbars){		
	if(winobject!="") winobject.close();
	winobject=window.open(url, "popUp"+(new Date()).getTime(), "width="+width+", height="+height+", scrollbars="+(scrollbars?scrollbars:"")+", toolbar=no, menubar=no, statuebar=no");
	winobject.focus(); 
}

function autoResizePopup() {
	var winW, winH, sizeToW, sizeToH;
	if ( parseInt(navigator.appVersion) > 3 ) {
 		if ( navigator.appName=="Netscape" ) {
  			winW = window.innerWidth;
			winH = window.innerHeight;
 		}
 		if ( navigator.appName.indexOf("Microsoft") != -1 ) {
  			winW = document.body.scrollWidth;
  			winH = document.body.scrollHeight;
 		}
	}
	sizeToW = 0;
	sizeToH = 0;
	if ( winW > 600 ) {
		sizeToW = 600 - document.body.clientWidth;
	} else if ( Math.abs(document.body.clientWidth - winW ) > 3 ) {
		sizeToW = winW - document.body.clientWidth;
	}
	if ( winH > 680 ) {
		sizeToH = 680 - document.body.clientHeight;
	} else if ( Math.abs(document.body.clientHeight - winH) > 4 ) {
		sizeToH = winH - document.body.clientHeight;
	}
	if ( sizeToW != 0 || sizeToH != 0 )
		window.resizeBy(sizeToW, sizeToH);
//alert(winW + ":" + winH + ":"  +document.body.clientWidth);
}

/* top navigation */
function initTopMenu(el,depth1) {
	topMenuOut(el.getElementsByTagName("img").item(0));
	
	if(el.id == "top-menu" + depth1) {
		topMenuOver(el.getElementsByTagName("img").item(0));
		
	}

	document.getElementById("top-sub-menu1").style.position="absolute";
	document.getElementById("top-sub-menu1").style.left="0";
	document.getElementById("top-sub-menu1").style.width="299px";
	document.getElementById("top-sub-menu1").style.height="29px";
	//document.getElementById("top-sub-menu1").style.background="url('../images/main/bg_2depth_1.gif') no-repeat";
	document.getElementById("top-sub-menu1").style.background="url('../images/common/bg_2depth_1.gif') no-repeat";

	document.getElementById("top-sub-menu2").style.position="absolute";
	document.getElementById("top-sub-menu2").style.left="100px";
	document.getElementById("top-sub-menu2").style.width="700px";
	document.getElementById("top-sub-menu2").style.height="29px";
	//document.getElementById("top-sub-menu2").style.background="url('../images/main/bg_2depth_2.gif') no-repeat";
	document.getElementById("top-sub-menu2").style.background="url('../images/common/bg_2depth_2.gif') no-repeat";

	document.getElementById("top-sub-menu3").style.position="absolute";
	document.getElementById("top-sub-menu3").style.left="10px";
	document.getElementById("top-sub-menu3").style.width="680px";
	document.getElementById("top-sub-menu3").style.height="29px";
	//document.getElementById("top-sub-menu3").style.background="url('../images/main/bg_2depth_3.gif') no-repeat";
	document.getElementById("top-sub-menu3").style.background="url('../images/common/bg_2depth_3.gif') no-repeat";

	document.getElementById("top-sub-menu4").style.position="absolute";
	document.getElementById("top-sub-menu4").style.left="227px";
	document.getElementById("top-sub-menu4").style.width="450px";
	document.getElementById("top-sub-menu4").style.height="29px";
	//document.getElementById("top-sub-menu4").style.background="url('../images/main/bg_2depth_4.gif') no-repeat";
	document.getElementById("top-sub-menu4").style.background="url('../images/common/bg_2depth_4.gif') no-repeat";

	document.getElementById("top-sub-menu5").style.position="absolute";
	document.getElementById("top-sub-menu5").style.left="490px";
	document.getElementById("top-sub-menu5").style.width="249px";
	document.getElementById("top-sub-menu5").style.height="29px";
	//document.getElementById("top-sub-menu5").style.background="url('../images/main/bg_2depth_5.gif') no-repeat";
	document.getElementById("top-sub-menu5").style.background="url('../images/common/bg_2depth_5.gif') no-repeat";

	document.getElementById("top-sub-menu6").style.position="absolute";
	document.getElementById("top-sub-menu6").style.left="640px";
	document.getElementById("top-sub-menu6").style.width="249px";
	document.getElementById("top-sub-menu6").style.height="29px";
	//document.getElementById("top-sub-menu6").style.background="url('../images/main/bg_2depth_6.gif') no-repeat";
	document.getElementById("top-sub-menu6").style.background="url('../images/common/bg_2depth_6.gif') no-repeat";

	document.getElementById("top-sub-menu7").style.position="absolute";
	document.getElementById("top-sub-menu7").style.left="486px";
	document.getElementById("top-sub-menu7").style.width="600px";
	document.getElementById("top-sub-menu7").style.height="29px";
	//document.getElementById("top-sub-menu7").style.background="url('../images/main/bg_2depth_7.gif') no-repeat";
	document.getElementById("top-sub-menu7").style.background="url('../images/common/bg_2depth_7.gif') no-repeat";


}
function topMenuOver(img) {
	img.src = img.src.replace(".gif", "_on.gif");
}
function topMenuOut(img) {
	img.src = img.src.replace("_on.gif", ".gif");
}

function selectTopmenuByMenuId() {
	var depth1 = this.id.substring("top-menu-head".length,this.id.length);
	var menuId = "sub-menu" + depth1;		
	var selectDepth1 = "top-" + depth1 + "-1";
	var topnav = document.getElementById("mainMenu");
	if(!topnav) return;
	var topEl = topnav.getElementsByTagName("ul");
	for(i = 0 ; i < topEl.length ; i++){
		if(topEl[i].id.substring(0,12) == "top-sub-menu") {
			topEl[i].style.display = "none";
		}
	}
	var topEl2 = topnav.getElementsByTagName("li");
	for(i = 0 , seq = 1; i < topEl2.length ; i++){
		if(topEl2[i].id.substring(0,8) == "top-menu") {
			initTopMenu(topEl2[i],depth1);
		}
	}
	
	var nav = document.getElementById("top-" + menuId);
	if(!nav) return;
	nav.style.display = "block";
	menuEl = nav.getElementsByTagName("li");
	for(i = 0; i < menuEl.length; i++) {
		var imgEl = menuEl.item(i).getElementsByTagName("img")
		if(imgEl != null && imgEl.length>0) {
			imgEl.item(0).onmouseover = menuOver;
			imgEl.item(0).onmouseout = menuOut;
			imgEl.item(0).onfocus = menuOver;
			imgEl.item(0).onblur = menuOut;
		}
	}
}

function initTopmenuByMenuId(depth1, depth2, depth3, depth4, menuId) {
	var selectDepth1 = "top-" + depth1 + "-" + depth2;
	var selectDepth2 = "top-" + depth1 + "-" + depth2 + "-" + depth3;
	var selectDepth3 = "top-" + depth1 + "-" + depth2 + "-" + depth3 + "-" + depth4;
	var topnav = document.getElementById("mainMenu");
	if(!topnav) return;
	var topEl = topnav.getElementsByTagName("ul");
	for(var i = 0 ; i < topEl.length ; i++){
		if(topEl[i].id.substring(0,12) == "top-sub-menu") {
			topEl[i].style.display = "none";
		}
	}
	
	var topEl2 = topnav.getElementsByTagName("a");

	for(i = 0, seq = 0 ; i < topEl2.length ; i++){
		if(topEl2[i].id.substring(0,13) == "top-menu-head") {
			topEl2[i].onmouseover =  selectTopmenuByMenuId;
			topEl2[i].onfocus = selectTopmenuByMenuId;
			if ( topEl2[i].id.substring(13) == depth1) {
				topEl2[i].onmouseover();
			}
			seq++;
		}
	}
	
	var nav = document.getElementById("top-" + menuId);
	if(!nav) return;
	nav.style.display = "block";
	menuEl = nav.getElementsByTagName("li");
	for(i = 0; i < menuEl.length; i++) {
		var menuElItm = menuEl.item(i);
		var imgEl = menuElItm.getElementsByTagName("img");
		if(imgEl == null || imgEl.length == 0)  {
			var aEl = menuElItm.getElementsByTagName("a");
			var itm = aEl.item(0);
			if (menuElItm.id == selectDepth1 || menuElItm.id == selectDepth2  || menuElItm.id == selectDepth3  ) {
				itm.className = "on";
			}
		} else {
			var itm = imgEl.item(0);
			if (menuElItm.id == selectDepth1 || menuElItm.id == selectDepth2  || menuElItm.id == selectDepth3  ) {
				itm.src = itm.src.replace(".gif", "_on.gif");
				itm.onmouseover = null;
				itm.onmouseout = null;
				itm.onfocus = null;
				itm.onblur = null;
			}
			else {
				itm.onmouseover = menuOver;
				itm.onmouseout = menuOut;
				itm.onfocus = menuOver;
				itm.onblur = menuOut;
			}
		}
	}
}

/* roll over-out image */
function menuOver() {
	var s = this.src;
	s = s.replace("_on.gif", ".gif");
	this.src = s.replace(".gif", "_on.gif");
}

function menuOut() {
	this.src = this.src.replace("_on.gif", ".gif");
}

function initImgEffect(ImgEls,SelImg) {
	
	MenuImg = document.getElementById(ImgEls).getElementsByTagName("img");
	MenuImgLen = MenuImg.length;

	for (i=0; i<MenuImgLen; i++) {
		MenuImg.item(i).onmouseover = menuOver;
		MenuImg.item(i).onmouseout = menuOut;
		if (i == SelImg) {
			MenuImg.item(i).onmouseover();
			MenuImg.item(i).onmouseover = null;
			MenuImg.item(i).onmouseout = null;
		}
	}
}

/* Tab Content */
function initTabMenu(tabContainerID) {
	var tabContainer = document.getElementById(tabContainerID);
	var tabAnchor = tabContainer.getElementsByTagName("a");
	var i = 0;

	for(i=0; i<tabAnchor.length; i++) {
		if (tabAnchor.item(i).className == "tab")
			thismenu = tabAnchor.item(i);
		else
			continue;

		thismenu.container = tabContainer;
		thismenu.targetEl = document.getElementById(tabAnchor.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.imgEl = thismenu.getElementsByTagName("img").item(0);
		if (thismenu.imgEl) {
			thismenu.onmouseover = function () {
				//this.onclick();
			}
		}
		thismenu.onclick = tabMenuClick;
		
		if (!thismenu.container.first)
			thismenu.container.first = thismenu;
	}
	tabContainer.first.onclick();
}
function tabMenuClick() {
	currentmenu = this.container.current;
	if (currentmenu != this) {
		if (currentmenu) {
			currentmenu.targetEl.style.display = "none";
			if (currentmenu.imgEl) {
				currentmenu.imgEl.src = currentmenu.imgEl.src.replace("_on.gif", ".gif");
			} else {
				currentmenu.className = currentmenu.className.replace(" on", "");
			}
		}

		this.targetEl.style.display = "block";
		if (this.imgEl) {
			this.imgEl.src = this.imgEl.src.replace(".gif", "_on.gif");
		} else {
			this.className += " on";
		}
		this.container.current = this;
	}
	return false;
}
 
/* ZonnInOut */

var nowZoom = 100; // 현재비율
var maxZoom = 200; // 최대비율
var minZoom = 100; // 최소비율(현재와 같아야 함)


function zoomNo(){

	location.reload();

}

// 텍스트 키운다.
function zoomIn() {
	scaleFont(1);
	return;
	if (nowZoom < maxZoom) {
		nowZoom += 10; // 10%씩 커진다.
	} else {
		return;
	}
	document.body.style.zoom = nowZoom + "%";
}

// 텍스트 줄인다.
function zoomOut() {
	scaleFont(-1);
	return;
	if (nowZoom > minZoom) {
		nowZoom -= 10; // 10%씩 작아진다.
	} else {
		return;
	}

	document.body.style.zoom = nowZoom + "%";
}
var fontSize = 13;
function scaleFont(val) {

    var fontSizeSave = fontSize;
	
    if (val > 0) {
        if (fontSize <= 20) {
            fontSize = fontSize + val; 
        }
    } else {
        if (fontSize > 10) {
            fontSize = fontSize + val; 
        }
    }
    if (fontSize != fontSizeSave) {
        drawFont(fontSize);
    }
    //set_cookie("ck_fontsize", fontSize, 30); 
}

function drawFont(fontSize) {
//    if (!fontSize) {
//        fontSize = getFontSize();
//    }
	var con_font = document.getElementById("containerMain");
	con_fonts = con_font.getElementsByTagName("ul");
	for(i = 0; i < con_fonts.length; i++) {
		con_fonts.item(i).style.fontSize = fontSize + "px";
	}
	con_fonts = con_font.getElementsByTagName("th");
	for(i = 0; i < con_fonts.length; i++) {
		con_fonts.item(i).style.fontSize = fontSize + "px";
	}
	con_fonts = con_font.getElementsByTagName("td");
	for(i = 0; i < con_fonts.length; i++) {
		con_fonts.item(i).style.fontSize = fontSize + "px";
	}	
}

/* 롤링 배너 */	
function scrolling_up(objId,sec1,sec2,speed,height) { 	  
	this.objId=objId; 	  
	this.sec1=sec1;
	this.sec2=sec2;
	this.speed=speed;
	this.height=height; 	 
	this.h=0;
	this.div=document.getElementById(this.objId); 	  
	this.htmltxt=this.div.innerHTML; 	  
	//this.div.innerHTML=this.htmltxt+this.htmltxt;
	this.div.innerHTML=this.htmltxt;
	this.div.isover=false; 	  
	this.div.controlPlay = true;
	//마우스 온 오버되면 플레이 되는 것 방지 위해 주석 처리
	//this.div.onmouseover=function(){this.isover=true;} 	  
	//this.div.onmouseout=function(){this.isover=false;}
	var self=this; 	  
	this.div.scrollTop=0;
	window.setTimeout(function() {self.play()},this.sec1); 
}
scrolling_up.prototype={
	play:function() {
		var self=this; 
		if(!this.div.isover){
			this.div.scrollTop+=this.speed; 
			if(this.div.scrollTop>this.div.scrollHeight/2){
				this.div.scrollTop=0; 
				}else{
					this.h+=this.speed;
					if(this.h>=this.height){ 
						if(this.h>this.height|| this.div.scrollTop%this.height !=0){ 
						this.div.scrollTop-=this.h%this.height;
						this.h = 0;
						} 
						this.h=0;
						window.setTimeout(function(){self.play()},this.sec1); 
						return;
					}
				}
			} 
			window.setTimeout(function(){self.play()},this.sec2);
		}, prev:function() { 
				if(this.div.scrollTop == 0) this.div.scrollTop = this.div.scrollHeight/2; 
				if ( this.h != 0 ) {
					this.div.scrollTop -= this.height+this.h;
					this.h = 0;
					} else this.div.scrollTop -= this.height;
				}, next:function() { 
					if(this.div.scrollTop ==  this.div.scrollHeight/2) this.div.scrollTop =0; 
					if ( this.h != 0 ) {
						this.div.scrollTop += this.height-this.h;
						this.h = 0;
					} else this.div.scrollTop += this.height;
				}, stop:function() { 		    
					if( this.div.controlPlay == true ){
						this.div.controlPlay = false;    
						this.div.isover = true;
						document.getElementById('rollBtnStop').src = 'images/main/btn_play.gif';    
						document.getElementById('rollBtnStop').alt = '시작';
					}else{
						this.div.controlPlay = true;
						this.div.isover = false;
						document.getElementById('rollBtnStop').src = 'images/main/btn_stop.gif';    
						document.getElementById('rollBtnStop').alt = '정지';
					}
				}
			};
			var hotKeyword;
			function init_banner() {
				hotKeyword = new scrolling_up("bannerList",30000000,2,1,50); 
				document.getElementById("rollBtn").onmouseover = function() {
					hotKeyword.div.isover=true;
				}
				document.getElementById("rollBtn").onmouseout = function() {
					if( hotKeyword.div.controlPlay == true ) {		       
					hotKeyword.div.isover=false;
				}else{
					hotKeyword.div.isover=true;		   
				}
			}
			document.getElementById("rollBtn").onfocus = function() {
				hotKeyword.div.isover=true;
		}
		document.getElementById("rollBtn").onblur = function() {
		hotKeyword.div.isover=false;
	}
}

/* 퀵메뉴 */
function initMoving(target, position, topLimit, btmLimit) {
	if (!target)
		return false;

	var obj = target;
	obj.initTop = position;
	obj.topLimit = topLimit;
	obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;

	obj.style.position = "absolute";
	obj.top = obj.initTop;
	obj.left = obj.initLeft;

	if (typeof(window.pageYOffset) == "number") {
		obj.getTop = function() {
			return window.pageYOffset;
		}
	} else if (typeof(document.documentElement.scrollTop) == "number") {
		obj.getTop = function() {
			return document.documentElement.scrollTop;
		}
	} else {
		obj.getTop = function() {
			return 0;
		}
	}

	if (self.innerHeight) {
		obj.getHeight = function() {
			return self.innerHeight;
		}
	} else if(document.documentElement.clientHeight) {
		obj.getHeight = function() {
			return document.documentElement.clientHeight;
		}
	} else {
		obj.getHeight = function() {
			return 500;
		}
	}

	obj.move = setInterval(function() {
		if (obj.initTop > 0) {
			pos = obj.getTop() + obj.initTop;
		} else {
			pos = obj.getTop() + obj.getHeight() + obj.initTop;
			//pos = obj.getTop() + obj.getHeight() / 2 - 15;
		}

		if (pos > obj.bottomLimit)
			pos = obj.bottomLimit;
		if (pos < obj.topLimit)
			pos = obj.topLimit;

		interval = obj.top - pos;
		obj.top = obj.top - interval / 3;
		obj.style.top = obj.top + "px";
	}, 30)
}

/* popupzone */
var current_popup = 1;
var popup_play = 0;
var popupzoneCnt = 6
var timeTmp;
function change_popup(value) {
	if(value > popupzoneCnt) value = 1;
	if(value < 1) value = popupzoneCnt;
	current_popup=value;
	for(i=1;i<=popupzoneCnt;i++) {
		if(document.getElementById("popup_"+i)) {
			if(obj = document.getElementById("popup_"+i))
				if(i==value) {
					obj.style.display="block";
					if(imgobj = document.getElementById("popup_img_"+i)) imgobj.src = imgobj.src.replace("off","on");
				} else {
					obj.style.display="none";
					if(imgobj = document.getElementById("popup_img_"+i)) imgobj.src = imgobj.src.replace("on","off");
				}
		} else {
			value = 1;
		}
	}
}
		
function setPopupZoneCnt(cnt) {
	popupzoneCnt = cnt;
}
function play_popup(value) {
	if(value == 0) 	popup_play = 0;
	else if(value == 1) popup_play = 1;
	if(popup_play==1) {
		change_popup(current_popup+1);
		timeTmp = setTimeout("play_popup()", 5000);
	}
}
function move_play_popup(num) {
	change_popup(num);
	clearTimeout ( timeTmp ) ;
	if(popup_play==1) {
		timeTmp = setTimeout("play_popup()", 5000);
	}
}
play_popup(1);	//팝업 PLAY
		
		
		
/* bannerzone */
var current_banner = 1;
var banner_play = 0;
var bannerzoneCnt = 5
function change_banner(value) {
	if(value > bannerzoneCnt) value = 1;
	if(value < 1) value = bannerzoneCnt;
	current_banner=value;
	for(i=1;i<=bannerzoneCnt;i++) {
		//alert(document.getElementById("banner_"+i));
		if(document.getElementById("banner_"+i)) {
			if(obj = document.getElementById("banner_"+i))
				if(i==value) {
					obj.style.display="block";
					if(imgobj = document.getElementById("banner_img_"+i)) imgobj.src = imgobj.src.replace("off","on");
				} else {
					obj.style.display="none";
					if(imgobj = document.getElementById("banner_img_"+i)) imgobj.src = imgobj.src.replace("on","off");
				}
		} else {
			value = 1;
		}
	}
}
		
function setBannerZoneCnt(cnt) {
	bannerzoneCnt = cnt;
}
function play_banner(value) {
	if(value == 0) 	banner_play = 0;
	else if(value == 1) banner_play = 1;
	if(banner_play==1) {
		change_banner(current_banner+1);
		setTimeout("play_banner()", 5000);
	}
}
play_banner(1);	//팝업 PLAY		

/* IE Flicker Bug 해결 */
(function(){
	/*Use Object Detection to detect IE6*/
	var  m = document.uniqueID /*IE*/
	&& document.compatMode  /*>=IE6*/
	&& !window.XMLHttpRequest /*<=IE6*/
	&& document.execCommand ;
	try{
		if(!!m){ m("BackgroundImageCache", false, true) /* = IE6 only */ }
	}catch(oh){};
})();




/* 메인리스트- 공지사항 보도자료*/
/*
var k;
var listNum;
var listImg;
var list_img;
var list_sub;
var s;
var slistNum;
var slistImg;
var slist_img;
var slist_sub;

function list(str) {
	for(k = 1 ; k < 4; k++){
		if (k==3) {
			slistNum = "slist0" + k;
			slist_sub = document.getElementById(slistNum);
			document.getElementById(slistNum).className = "off";		
			slistImg = "slistimg0" + k;
			slist_img = document.getElementById(slistImg);
			slist_img.src="/images/main/main_tab2_02.gif";
				if(str == k){		
				document.getElementById(slistNum).className = "on";		
				slist_img.src="/images/main/main_tab2_02_.gif";
			}
		} else {
			listNum = "list0" + k;
			list_sub = document.getElementById(listNum);
			document.getElementById(listNum).className = "off";		
			listImg = "listimg0" + k;
			list_img = document.getElementById(listImg);
			list_img.src="/images/main/main_tab_0"+k+".gif";
			if(str == k){		
				document.getElementById(listNum).className = "on";		
				list_img.src="/images/main/main_tab_0"+k+"_.gif";
			}
		}
	}
}
*/
/* 메인리스트- 공지사항 보도자료*/
var k;
var listNum;
var listImg;
var list_img;
var list_sub;

function list(str) {
	for(k = 1 ; k <6; k++){
		listNum = "list0" + k;
		if (document.getElementById(listNum)) {
			list_sub = document.getElementById(listNum);
			document.getElementById(listNum).className = "off";		
			listImg = "listimg0" + k;
			list_img = document.getElementById(listImg);
			list_img.src="/images/main/main_tab_0"+k+".gif";
				if(str == k){		
				document.getElementById(listNum).className = "on";		
				list_img.src="/images/main/main_tab_0"+k+"_.gif";
			}
		}
	}
}


var k;
var snsNum;
var snsImg;
var sns_img;
var sns_sub;

function sns(str) {
	for(k = 1 ; k <6; k++){
		snsNum = "sns0" + k;
		if (document.getElementById(snsNum)) {
			sns_sub = document.getElementById(snsNum);
			document.getElementById(snsNum).className = "off";		
			snsImg = "snsimg0" + k;
			sns_img = document.getElementById(snsImg);
			sns_img.src="/images/main/social_tab_0"+k+".gif";
				if(str == k){		
				document.getElementById(snsNum).className = "on";		
				sns_img.src="/images/main/social_tab_0"+k+"on.gif";
			}
		}
	}
}




/* 메인리스트- 공지사항 보도자료*/
function slist(str) {
	for(s = 1 ; s < 3; s++){
		slistNum = "slist0" + s;
		slist_sub = document.getElementById(slistNum);
		document.getElementById(slistNum).className = "off";		
		slistImg = "slistimg0" + s;
		slist_img = document.getElementById(slistImg);
		slist_img.src="/images/main/main_tab2_0"+s+".gif";
			if(str == s){		
			document.getElementById(slistNum).className = "on";		
			slist_img.src="/images/main/main_tab2_0"+s+"_.gif";
		}
	}
}



// 보이기감추기
function displayOn() {
	var i,j,a=displayOn.arguments;
	for(i=0;i<a.length;i++) {
		obj = document.getElementById(a[i]);
		if (obj) { obj.style.display = "block"; }
	}
}
function displayOff() {
	var i,j,a=displayOff.arguments;
	for(i=0;i<a.length;i++) {
		obj = document.getElementById(a[i]);
		if (obj) { obj.style.display = "none"; }
	}
}


var bannerSpanNum=0;
function bannerPrev() {
	if(document.getElementById("spanBanner0")) { document.getElementById("spanBanner0").style.display="none"; }
	if(document.getElementById("spanBanner1")) { document.getElementById("spanBanner1").style.display="none"; }
	if(document.getElementById("spanBanner2")) { document.getElementById("spanBanner2").style.display="none"; }
	if(document.getElementById("spanBanner3")) { document.getElementById("spanBanner3").style.display="none"; }
	if(document.getElementById("spanBanner4")) { document.getElementById("spanBanner4").style.display="none"; }
	if(document.getElementById("spanBanner5")) { document.getElementById("spanBanner5").style.display="none"; }

	if (bannerSpanNum>0) {
		bannerSpanNum--;
		document.getElementById("spanBanner"+bannerSpanNum).style.display="";
	} else {
		document.getElementById("spanBanner0").style.display="";
	}
}

function bannerNext() {
	if(document.getElementById("spanBanner0")) { document.getElementById("spanBanner0").style.display="none"; }
	if(document.getElementById("spanBanner1")) { document.getElementById("spanBanner1").style.display="none"; }
	if(document.getElementById("spanBanner2")) { document.getElementById("spanBanner2").style.display="none"; }
	if(document.getElementById("spanBanner3")) { document.getElementById("spanBanner3").style.display="none"; }
	if(document.getElementById("spanBanner4")) { document.getElementById("spanBanner4").style.display="none"; }
	if(document.getElementById("spanBanner5")) { document.getElementById("spanBanner5").style.display="none"; }

	//if (bannerSpanNum>0) {
		bannerSpanNum++;
		if (document.getElementById("spanBanner"+bannerSpanNum)) {
			document.getElementById("spanBanner"+bannerSpanNum).style.display="";
		} else {
			bannerSpanNum--;
			document.getElementById("spanBanner"+bannerSpanNum).style.display="";
		}
	//}
}
