// JavaScript Document
function o(obj){return document.getElementById(obj);}
var scrollCon,w=0;
  function goLeft(){
    o("scrollImg").scrollLeft-=1;
	if(o("scrollImg").scrollLeft==0){
	  o("nowLeft").className="nowLeftGray";
	  o("nowLeft").onmouseover=function(){return false;};
	  o("nowRight").className="nowRight";
	}
  }
  function goRight(){
    o("scrollImg").scrollLeft+=1;
	if(o("scrollImg").scrollLeft>=(o("imgsdiv").offsetWidth-o("scrollImg").offsetWidth)){
	  o("nowLeft").className="nowLeft";	
	  o("nowRight").className="nowRightGray";
	  o("nowRight").onmouseover=function(){return false;};
	}
  }
  function getleftover(){
    scrollCon=window.setInterval(goLeft,1);
	o("nowRight").className="nowRight";
	o("nowRight").onmouseover=getrightover;
  }
  function getleftout(){
    window.clearInterval(scrollCon);
  }
  function getrightover(){
    scrollCon=window.setInterval(goRight,1);
	o("nowLeft").className="nowLeft";	
	o("nowLeft").onmouseover=getleftover;
  }
  function getrightout(){
    window.clearInterval(scrollCon);
  }
  window.onload=function(){
if(o("wfc_Center_default")&&o("wfc_Right_default")){
	if(o("wfc_Center_default").offsetHeight>=o("wfc_Right_default").offsetHeight){
	  o("wfc_Right_default").style.height=o("wfc_Center_default").offsetHeight+"px";
	}else{
	  o("wfc_Center_default").style.height=o("wfc_Right_default").offsetHeight+"px";
	} 
}
    o("nowLeft").onmouseover=getleftover;
	o("nowLeft").onmouseout=getleftout;
	o("nowLeft").innerHTML="";
	o("nowRight").onmouseover=getrightover;
	o("nowRight").onmouseout=getrightout;
	o("nowRight").innerHTML="";	  
    var p = o("imgsdiv").getElementsByTagName('li');
    for (var i=0; i<p.length; i++) {
        w += parseInt(p[i].offsetWidth)+4;
    }
    o("imgsdiv").style.width = parseInt(w) + 'px';
	//alert(p.length);
  }
  function dremp(){
	location.href='MapPage.jsp';
  }

