// JavaScript Document
var f_h,t_h,area_height,area_name,div_running,opened_area='';
//------------------------------------------
function poen_xx_area(area,h) {
if(div_running!=1){
	
  area_height=h;
  area_name=area;
  
	if(document.getElementById(area).style.display != "block"){
	    if(opened_area!=''){
	     document.getElementById(opened_area).style.display = "none";
  	     document.getElementById(opened_area).style.height = "0px";
	     document.getElementById(opened_area+"_bt").style.background = "url(image/index/in-ser1.jpg) no-repeat left bottom"; 
		 
         }
	  div_running=1;
      f_h=0;
      t_h=h;
      run_area = setInterval('run_xx_area()',10);
      document.getElementById(area).style.display = "block";
      document.getElementById(area+"_bt").style.background = "url(image/index/in-ser2.jpg) no-repeat left bottom"; 

	}else{
      div_running=1;
      f_h=h;
      t_h=0;
      run_area = setInterval('run_xx_area()',10);
	  
	  
	}
}

document.getElementById("mm_area_bt").style.background = "url(image/index/in-mm1.jpg) no-repeat left bottom";
document.getElementById("e_area_bt").style.background = "url(image/index/in-e1.jpg) no-repeat left bottom";



}

//------------------------------------------
function poen_xx_area2(area,table) {
if(div_running!=1){
  h = document.getElementById(area).clientHeight;
  area_height=h;
  area_name=area;
  
	if(document.getElementById(area).style.display != "block"){
	    if(opened_area!=''){
	     document.getElementById(opened_area).style.display = "none";
  	     document.getElementById(opened_area).style.height = "0px";
	     document.getElementById(opened_area+"_bt").style.background = "url(image/index/in-mm1.jpg) no-repeat left bottom";
         }
	  document.getElementById(area).style.display = "block";
	  h = document.getElementById(table).clientHeight ;
	  document.getElementById(area).style.display = "none";
      area_height=h;
      area_name=area;

	  div_running=1;
      f_h=0;
      t_h=h;
      run_area = setInterval('run_xx_area()',10);
      document.getElementById(area).style.display = "block";
      document.getElementById(area+"_bt").style.background = "url(image/index/in-mm2.jpg) no-repeat left bottom"; 

	}else{
      div_running=1;
      f_h=h;
      t_h=0;
      run_area = setInterval('run_xx_area()',10);
	}
}
document.getElementById("np_area_bt").style.background = "url(image/index/in-ser1.jpg) no-repeat left bottom";
document.getElementById("e_area_bt").style.background = "url(image/index/in-e1.jpg) no-repeat left bottom";


}
//------------------------------------------
function poen_xx_area3(area,table) {
if(div_running!=1){
  h = document.getElementById(area).clientHeight;
  area_height=h;
  area_name=area;
  
	if(document.getElementById(area).style.display != "block"){
	    if(opened_area!=''){
	     document.getElementById(opened_area).style.display = "none";
  	     document.getElementById(opened_area).style.height = "0px";
         document.getElementById(opened_area+"_bt").style.background = "url(image/index/in-e1.jpg) no-repeat left bottom";	 
         }
	  document.getElementById(area).style.display = "block";
	  h = document.getElementById(table).clientHeight ;
	  document.getElementById(area).style.display = "none";
      area_height=h;
      area_name=area;

	  div_running=1;
      f_h=0;
      t_h=h;
      run_area = setInterval('run_xx_area3()',10);
      document.getElementById(area).style.display = "block";
     document.getElementById(area+"_bt").style.background = "url(image/index/in-e2.jpg) no-repeat left bottom";

	}else{
      div_running=1;
      f_h=h;
      t_h=0;
      run_area = setInterval('run_xx_area3()',10);
	}
}
document.getElementById("np_area_bt").style.background = "url(image/index/in-ser1.jpg) no-repeat left bottom";
document.getElementById("mm_area_bt").style.background = "url(image/index/in-mm1.jpg) no-repeat left bottom";

}

//------------------------------------------
function Close_xx_area() {
if(div_running!=1){
	    if(opened_area!=''){
		 //alert(opened_area);
	     document.getElementById(opened_area).style.display = "none";
  	     document.getElementById(opened_area).style.height = "0px";
	
		 document.getElementById("np_area_bt").style.background = "url(image/index/in-ser1.jpg) no-repeat left bottom";
		 document.getElementById("mm_area_bt").style.background = "url(image/index/in-mm1.jpg) no-repeat left bottom";
		 document.getElementById("e_area_bt").style.background = "url(image/index/in-e1.jpg) no-repeat left bottom";
	
         }
	}
}
//--------------------------------------------
function run_xx_area() {
 f_h = f_h + (t_h-f_h)/3;
 yL = Math.round(f_h);		
 document.getElementById(area_name).style.height = yL+"px";	

  if(yL>(area_height-1)){
	clearTimeout(run_area);
	div_running=0;
	opened_area=area_name;
  }
  if(yL<1){
	clearTimeout(run_area);
	document.getElementById(area_name).style.display = "none";
	
	document.getElementById("np_area_bt").style.background = "url(image/index/in-ser1.jpg) no-repeat left bottom";
	document.getElementById("mm_area_bt").style.background = "url(image/index/in-mm1.jpg) no-repeat left bottom";
    document.getElementById("e_area_bt").style.background = "url(image/index/in-e1.jpg) no-repeat left bottom";
	
	div_running=0;
	opened_area='';
  }	
}

//--------------------------------------------
function run_xx_area2() {
 f_h = f_h + (t_h-f_h)/3;
 yL = Math.round(f_h);		
 document.getElementById(area_name).style.height = yL+"px";	

  if(yL>(area_height-1)){
	clearTimeout(run_area);
	div_running=0;
	opened_area=area_name;
  }
  if(yL<1){
	clearTimeout(run_area);
	document.getElementById(area_name).style.display = "none";
	
	document.getElementById("np_area_bt").style.background = "url(image/index/in-ser1.jpg) no-repeat left bottom";
	document.getElementById("mm_area_bt").style.background = "url(image/index/in-mm1.jpg) no-repeat left bottom";
    document.getElementById("e_area_bt").style.background = "url(image/index/in-e1.jpg) no-repeat left bottom";
	
	div_running=0;
	opened_area='';
  }	
}

//===========================================================================

function run_xx_area3() {
 f_h = f_h + (t_h-f_h)/3;
 yL = Math.round(f_h);		
 document.getElementById(area_name).style.height = yL+"px";	

  if(yL>(area_height-1)){
	clearTimeout(run_area);
	div_running=0;
	opened_area=area_name;
  }
  if(yL<1){
	clearTimeout(run_area);
	document.getElementById(area_name).style.display = "none";
	
	document.getElementById("np_area_bt").style.background = "url(image/index/in-ser1.jpg) no-repeat left bottom";
	document.getElementById("mm_area_bt").style.background = "url(image/index/in-mm1.jpg) no-repeat left bottom";
    document.getElementById("e_area_bt").style.background = "url(image/index/in-e1.jpg) no-repeat left bottom";
	
	div_running=0;
	opened_area='';
  }	
}

//===========================================================================



function Toggle(item) 
{ 
    if (item != '') {
		obj = document.getElementById(item); 
		if(document.getElementById(item)){
			visible = (obj.style.display != "none")
			key = document.getElementById("x" + item); 
			if ( visible ) 
			{ 
				obj.style.display = "none";		
				if(document.getElementById("x" + item))
					{
						key.style.background = "url(i_r.gif) no-repeat 2px 4px"; 
					}
				//a = key.getElementsByTagName('a');
				//a[0].style.color="#808080";
			} 
			else 
			{ 
				obj.style.display = "block"; 
				if(document.getElementById("x" + item))
					{
						key.style.background = "url(i_d.gif) no-repeat 0 5px"; 
					}
				//a = key.getElementsByTagName('a');
				//a[0].style.color="#000";
			}
		}
	}
} 




//==========================================================================
function index_menu(){

//var dmaLi = document.getElementById('index_menu_area');
//var dmaLi_item = dmaLi.getElementsByTagName('li');
//for(i=0; i<dmaLi_item.length ;i++){
  //dmaLi_item[i].style.cursor="pointer";
  /*dmaLi_item[i].onmouseover=chbor2;
  dmaLi_item[i].onmouseout=chbor2;*/
//}

}

function gallery_menu(){
var dmaDiv = document.getElementById('gallery_right_right');
var dmaDiv_item = dmaDiv.getElementsByTagName('div');
for(i=0; i<dmaDiv_item.length ;i++){
  dmaDiv_item[i].style.cursor="pointer";
  dmaDiv_item[i].onmouseover=chbor3;
  dmaDiv_item[i].onmouseout=chbor4;
}
}
//==========================================================================
  function chbor1(){
  this.style.border="1px solid #808080";
  }
  
  function chbor2(){
  this.style.border="1px solid #cecece";
  }
  
  function chbor3(){
  this.style.border="1px solid #666";
  }
  
  function chbor4(){
  this.style.border="1px solid #fff";
  }
  
  function gotourl(goto_url){
  location.href = goto_url;
  }
//==========================================================================
var gus_say_open=0;
function gus_say_area(x){ 
tit_1 = document.getElementById("good_title"); 
txt_1 = document.getElementById("gus_say_txt_1"); 
tit_2 = document.getElementById("gus_say_tit_2"); 
txt_2 = document.getElementById("gus_say_txt_2"); 
tit_3 = document.getElementById("gus_say_tit_3"); 
txt_3 = document.getElementById("gus_say_area_2"); 

if(x==1 && gus_say_open==0){
txt_1.style.display = "block"; 
tit_2.style.display = "block"; 
txt_2.style.display = "none"; 
tit_3.style.display = "block"; 
txt_3.style.display = "none"; 
gus_say_open=1;
}else if(x==2){
txt_1.style.display = "none"; 
tit_2.style.display = "none"; 
txt_2.style.display = "block"; 
tit_3.style.display = "block";	
txt_3.style.display = "none";
}else if(x==3){
txt_1.style.display = "none"; 
tit_2.style.display = "none"; 
txt_2.style.display = "none"; 
tit_3.style.display = "none";	
txt_3.style.display = "block";
}else{
txt_1.style.display = "none"; 
tit_2.style.display = "none"; 
txt_2.style.display = "none"; 
tit_3.style.display = "none";	
txt_3.style.display = "none"; 
gus_say_open=0;
}

if(gus_say_open==0){
tit_1.style.background ="#e6e7e8 url(arrow_6.gif) no-repeat 13px 5px";
}else{
tit_1.style.background ="#e6e7e8 url(arrow_7.gif) no-repeat 11px 8px";	
}


}

//==========================================================================