function formPromptfaq(){
	var req;
	var imageshow = new Element('div').setProperty();
	   imageshow.setStyles({
			 'display': 'block'
		}).injectInside(document.body);
	   
	 if(window.XMLHttpRequest) req = new XMLHttpRequest();
		 else if(window.ActiveXObject) req = new ActiveXObject("Microsoft.XMLHTTP");
		 else { alert("Browser Error"); return false; }
		 req.onreadystatechange = function(){
		 	if(req.readyState==4){
			imageshow.innerHTML = req.responseText;
			}
		 }
	var str = Math.random();
	var query = "../enews/enews.php"; //alert(query);
		req.open("GET",query,true);
		req.send(null);
		// ???????? MooPrompt ??? webengine/lib ???????????? Prompt
		 boxH = new MooPrompt('',imageshow, {
					//buttons: 0, horizontal: 'center', vertical: 'middle', effect:'slide',width:620,height:600
					buttons: 0, horizontal: 'center', vertical: 'middle', width:375,height:225
				});
		
}
// JavaScript Document
function formEnews(){
	var req;
	var imageshow = new Element('div').setProperty();
	   imageshow.setStyles({
			 'display': 'block'
		}).injectInside(document.body);
	   
	 if(window.XMLHttpRequest) req = new XMLHttpRequest();
		 else if(window.ActiveXObject) req = new ActiveXObject("Microsoft.XMLHTTP");
		 else { alert("Browser Error"); return false; }
		 req.onreadystatechange = function(){
		 	if(req.readyState==4){
			imageshow.innerHTML = req.responseText;
			}
		 }
	var str = Math.random();
	var query = "../enews/enews.php"; //alert(query);
		req.open("GET",query,true);
		req.send(null);
		// ???????? MooPrompt ??? webengine/lib ???????????? Prompt
		 boxH = new MooPrompt('',imageshow, {
					//buttons: 0, horizontal: 'center', vertical: 'middle', effect:'slide',width:620,height:600
					buttons: 0, horizontal: 'center', vertical: 'middle', width:420,height:225
				});
		
}
function formPrompt(id){
	var req;
	var imageshow = new Element('div').setProperty();
	   imageshow.setStyles({
			 'display': 'block'
		}).injectInside(document.body);
	   
	 if(window.XMLHttpRequest) req = new XMLHttpRequest();
		 else if(window.ActiveXObject) req = new ActiveXObject("Microsoft.XMLHTTP");
		 else { alert("Browser Error"); return false; }
		 req.onreadystatechange = function(){
		 	if(req.readyState==4){
			imageshow.innerHTML = req.responseText;
			}
		 }
	var str = Math.random();
	var query = "../vote/result.php?VoteID="+id; //alert(query);
		req.open("GET",query,true);
		req.send(null);
		// ???????? MooPrompt ??? webengine/lib ???????????? Prompt
		 boxH = new MooPrompt('',imageshow, {
					//buttons: 0, horizontal: 'center', vertical: 'middle', effect:'slide',width:620,height:600
					buttons: 0, horizontal: 'center', vertical: 'middle', width:860,height:605
				});
		
}

function getRequestBody( pForm ) {//??? formname
     var nParams = new Array();
     for ( var n = 0 ; n < pForm.elements.length ; n++ )
     {
          if ( ( pForm.elements[n].checked == true & pForm.elements[n].type == "radio" )  // ??????? element radio ??? ????????????????
               || ( pForm.elements[n].checked == true & pForm.elements[n].type == "checkbox" ) // ??????? element checkbox ??? ????????????????
               || ( pForm.elements[n].type != "radio" & pForm.elements[n].type != "checkbox" ) ) //element ?????
          {
               var pParam = encodeURIComponent( pForm.elements[n].name );
               pParam += "=";
               pParam += encodeURIComponent( pForm.elements[n].value );
               nParams.push( pParam ); //??????? Array
          }
     }
     return nParams.join( "&" ); //??? Array ??????? String
}

function submit_form( frm )
{
		 var query = getRequestBody( frm );
		 var url = "../enews/enews.php?"+query; //alert(url);
		 $('ActionView').style.display='none';
		 $('load-image').style.display='';
		 new ajax(url,{
				  method:'get',
				  onComplete:function(){
					  $('ActionSave').style.display='';
					  $('load-image').style.display='none';
					  var str = this.transport.responseText;
					  $("ActionSave").setHTML(str);
				  }
				  }).request();
}
