//-----------------------------------------------------------------------------
//
//public Methods 
//
//-----------------------------------------------------------------------------
//최종 해당 태그의 값을 반환 
function getXmlNodeValue(xmlElement, tag){
	if(xmlElement.getElementsByTagName(tag).length == 0 )
		return "";	
	return xmlElement.getElementsByTagName(tag)[0].firstChild.nodeValue;	
}

//-----------------------------------------------------------------------------
//
// Class 
//
//-----------------------------------------------------------------------------
//-------------------------------------------
// FileVo
//-------------------------------------------
FileVoClass  = function(){
	this.xmlElement 			= null;
	this.file_no;
	this.file_fk;
	this.file_section_cd;
	this.file_cd;
	this.org_file_nm;
	this.save_file_nm;
	this.file_content_type;
	this.file_size;
	this.crt_dt;
};
FileVoClass.prototype.setXmlElement = function(xmlElement){
	this.xmlElement 		= xmlElement;
	
	this.file_no			= getXmlNodeValue(this.xmlElement, "file_no");
	this.file_fk			= getXmlNodeValue(this.xmlElement, "file_fk"); 
	this.file_section_cd 	= getXmlNodeValue(this.xmlElement, "file_section_cd");
	this.file_cd			= getXmlNodeValue(this.xmlElement, "file_cd");
	this.org_file_nm		= getXmlNodeValue(this.xmlElement, "org_file_nm");	
	this.save_file_nm		= getXmlNodeValue(this.xmlElement, "save_file_nm");
	this.file_content_type	= getXmlNodeValue(this.xmlElement, "file_content_type");
	this.file_size			= getXmlNodeValue(this.xmlElement, "file_size");
	this.crt_dt				= getXmlNodeValue(this.xmlElement, "crt_dt");
};

//-------------------------------------------
//BbsVo
//-------------------------------------------
BbsVoClass  = function(){
	this.xmlElement 			= null;
	
	this.bbs_no;							
	this.bbs_section_cd;					
	this.lang_cd;						
	this.bbs_option_cd;				
	this.expo_id;					
	this.company_no;					
	this.option1;				
	this.option2;				
	this.bbs_pw;					
	this.writer;					
	this.email;					
	this.department;				
	this.phone_no1;				
	this.phone_no2;
	this.http_url;				
	this.title;					
	this.contents;				
	this.html_yn;				
	this.del_yn;					
	this.display_yn;				
	this.display_start_dt;		
	this.display_end_dt;			
	this.event_start_dt;			
	this.event_end_dt;			
	this.thumb_orgfile;			
	this.thumb_savefile;			
	this.hit_cnt;				
	this.client_ip;				
	this.crt_dt;					
	this.crt_user_no;			
	this.udt_dt;					
	this.udt_user_no;			
	this.bbsFileVo;

};
BbsVoClass.prototype.setXmlElement = function(xmlElement){
	this.xmlElement 		= xmlElement;
	
	this.bbs_no					= getXmlNodeValue(this.xmlElement, "bbs_no");		
	this.bbs_section_cd			= getXmlNodeValue(this.xmlElement, "bbs_section_cd");		
	this.lang_cd				= getXmlNodeValue(this.xmlElement, "lang_cd");		
	this.bbs_option_cd			= getXmlNodeValue(this.xmlElement, "bbs_option_cd");	
	this.expo_id				= getXmlNodeValue(this.xmlElement, "expo_id");	
	this.company_no				= getXmlNodeValue(this.xmlElement, "company_no");	
	this.option1				= getXmlNodeValue(this.xmlElement, "option1");
	this.option2				= getXmlNodeValue(this.xmlElement, "option2");
	this.bbs_pw					= getXmlNodeValue(this.xmlElement, "bbs_pw");
	this.writer					= getXmlNodeValue(this.xmlElement, "writer");
	this.email					= getXmlNodeValue(this.xmlElement, "email");
	this.department				= getXmlNodeValue(this.xmlElement, "department");
	this.phone_no1				= getXmlNodeValue(this.xmlElement, "phone_no1");
	this.phone_no2				= getXmlNodeValue(this.xmlElement, "phone_no2");
	this.http_url				= getXmlNodeValue(this.xmlElement, "http_url");
	this.title					= getXmlNodeValue(this.xmlElement, "title");
	this.contents				= getXmlNodeValue(this.xmlElement, "contents");
	this.html_yn				= getXmlNodeValue(this.xmlElement, "html_yn");
	this.del_yn					= getXmlNodeValue(this.xmlElement, "del_yn");
	this.display_yn				= getXmlNodeValue(this.xmlElement, "display_yn");
	this.display_start_dt		= getXmlNodeValue(this.xmlElement, "display_start_dt");
	this.display_end_dt			= getXmlNodeValue(this.xmlElement, "display_end_dt");
	this.event_start_dt			= getXmlNodeValue(this.xmlElement, "event_start_dt");
	this.event_end_dt			= getXmlNodeValue(this.xmlElement, "event_end_dt");
	this.thumb_orgfile			= getXmlNodeValue(this.xmlElement, "thumb_orgfile");
	this.thumb_savefile			= getXmlNodeValue(this.xmlElement, "thumb_savefile");
	this.hit_cnt				= getXmlNodeValue(this.xmlElement, "hit_cnt");
	this.client_ip				= getXmlNodeValue(this.xmlElement, "client_ip");
	this.crt_dt					= getXmlNodeValue(this.xmlElement, "crt_dt");
	this.crt_user_no			= getXmlNodeValue(this.xmlElement, "crt_user_no");
	this.udt_dt					= getXmlNodeValue(this.xmlElement, "udt_dt");
	this.udt_user_no			= getXmlNodeValue(this.xmlElement, "udt_user_no");
	this.bbsFileVo				= getXmlNodeValue(this.xmlElement, "bbsFileVo");
	
	if(this.xmlElement.getElementsByTagName("bbsFileVo").length > 0){
		if(this.bbsFileVo == null)
			this.bbsFileVo	= new BbsFileVoClass();
		this.bbsFileVo.setXmlElement(this.xmlElement.getElementsByTagName("bbsFileVo")[0]);
	}
};

//-------------------------------------------
//BbsFileVo
//-------------------------------------------
BbsFileVoClass  = function(){
	this.xmlElement 			= null;
	
	this.bbs_file_no;					//첨부파일번호
	this.bbs_no;						//게시물번호
	this.file_type_cd;					//파일종류코드
	this.orgfile;						//첨부파일명
	this.savefile;						//저장파일명
	this.mime_type;						//컨텐츠 타입
	this.file_size;						//파일크기
	this.crt_dt;						//등록일
};

BbsFileVoClass.prototype.setXmlElement = function(xmlElement){
	this.xmlElement 		= xmlElement;
	
	this.bbs_file_no				= getXmlNodeValue(this.xmlElement, "bbs_file_no");
	this.bbs_no						= getXmlNodeValue(this.xmlElement, "bbs_no");
	this.file_type_cd				= getXmlNodeValue(this.xmlElement, "file_type_cd");
	this.orgfile					= getXmlNodeValue(this.xmlElement, "orgfile");
	this.savefile					= getXmlNodeValue(this.xmlElement, "savefile");
	this.mime_type					= getXmlNodeValue(this.xmlElement, "mime_type");
	this.file_size					= getXmlNodeValue(this.xmlElement, "file_size");
	this.crt_dt						= getXmlNodeValue(this.xmlElement, "crt_dt");
};

