ŸÄÏ)
var intRemoveCount = 0; // À̵¿ÇÒ Ç׸ñ¼ö
for( var i=0; i < objOriginal.options.length; i++ )
{
if ( objOriginal.options[i].selected == true )
{
var addText = objOriginal.options[i].text;
var addValue = objOriginal.options[i].value;
objTarget.options[objTarget.options.length] = new Option(addText,addValue);
objOriginal.options[i].selected = false;
++intRemoveCount;
} else {
objOriginal.options[i-intRemoveCount].selected = false;
objOriginal.options[i-intRemoveCount].text = objOriginal.options[i].text;
objOriginal.options[i-intRemoveCount].value = objOriginal.options[i].value;
}
}
// À̵¿ÈÄ ¿øº»¿¡¼ Á¦°Å
var intRemainCount = objOriginal.options.length - intRemoveCount; // À̵¿ÈÄ ³²Àº Ç׸ñ¼ö
for( i=objOriginal.options.length-1; i>=intRemainCount; i-- )
{
objOriginal.options[i] = null;
}
}
/**
* TO DO : ¸ÖƼ¼¿·ºÆ®¹Ú½º¿¡¼ÀÇ Àüü Åä±Û (üũ¹Ú½º»ç¿ë)
* Param : objCheckBox
* Param : strObjName
*
* »ç¿ë¿¹Á¦
*
**/
function setSelectBox_ToggleAll( objCheckBox, strObjName )
{
var objSelect=document.getElementById(strObjName);
if ( objCheckBox.checked )
{
for( var i=0; i
**/
function setSelectBox_AllSelected( strObjName, nBoolean )
{
var bSelected = (nBoolean == 0) ? false : true;
for( var i=0; i
**/
function goPageMoveUrl( cUrl )
{
window.location.href = cUrl;
}
/**
* TO DO : ȸé À̵¿(»õâ)
* Param : cUrl
*
* »ç¿ë¿¹Á¦
*
**/
function goPageOpenUrl( cUrl )
{
window.open(cUrl, "_blank")
}
/**
* TO DO : À̹ÌÁö ÆÄÀÏ Ã¼Å©
* Param : value
*
* »ç¿ë¿¹Á¦
* if ( !uploadImg_Check(form.attachfile.value) ) return;
**/
function uploadImg_Check( value )
{
var src = getFileExtension(value);
if (src == "")
{
alert('¿Ã¹Ù¸¥ ÆÄÀÏÀ» ÀÔ·ÂÇϼ¼¿ä');
return false;
}
else if ( !((src.toLowerCase() == "png") || (src.toLowerCase() == "gif") || (src.toLowerCase() == "jpg") || (src.toLowerCase() == "jpeg") || (src.toLowerCase() == "bmp") ) )
{
alert('png, gif, jpg, bmp ÆÄÀϸ¸ Áö¿øÇÕ´Ï´Ù.');
return false;
}
return true;
}
/**
* TO DO : ¹®¼ ÆÄÀÏ Ã¼Å©
* Param : value
*
* »ç¿ë¿¹Á¦
* if ( !uploadDoc_Check(form.attachfile.value) ) return;
**/
function uploadDoc_Check( value )
{
var src = getFileExtension(value);
if (src == "")
{
alert('¿Ã¹Ù¸¥ ÆÄÀÏÀ» ÀÔ·ÂÇϼ¼¿ä');
return false;
}
else if ( !((src.toLowerCase() == "pdf") || (src.toLowerCase() == "ppt") || (src.toLowerCase() == "pptx") || (src.toLowerCase() == "doc") || (src.toLowerCase() == "hwp") ) )
{
alert('pdf, ppt, pptx, doc, hwp ÆÄÀϸ¸ Áö¿øÇÕ´Ï´Ù.');
return false;
}
return true;
}
/**
* TO DO : ÆÄÀÏ È®ÀåÀÚ ¾Ë¾Æ³»±â
* Param : filePath
*
* »ç¿ë¿¹Á¦
* alert( getFileExtension(form.attachfile.value) );
**/
function getFileExtension( filePath )
{
var lastIndex = -1;
lastIndex = filePath.lastIndexOf('.');
var extension = "";
if ( lastIndex != -1 )
{
extension = filePath.substring( lastIndex+1, filePath.len );
} else {
extension = "";
}
return extension;
}
/**
* TO DO : ÆÄÀÏ ´Ù¿î·Îµå ASP
* Param : filepath
* Param : fileSavename
*
**/
function fileDownAsp(path, save){
var attribute
//var oDiv = document.createElement("");
var oDiv = document.createElement("div");
attribute = document.createAttribute("style");
attribute.nodeValue = "display: none;";
oDiv.setAttributeNode(attribute);
//var oForm = document.createElement("");
//oForm.method = "post";
//oForm.action = "/common/asp/fileDown.asp?";
var oForm = document.createElement("form");
attribute = document.createAttribute("name");
attribute.nodeValue = "fileFomAction";
oForm.setAttributeNode(attribute);
attribute = document.createAttribute("method");
attribute.nodeValue = "post";
oForm.setAttributeNode(attribute);
attribute = document.createAttribute("action");
attribute.nodeValue = "/common/asp/fileDown.asp?";
oForm.setAttributeNode(attribute);
//var oInputHidden = document.createElement("");
//oInputHidden.value = path;
//oForm.appendChild(oInputHidden);
var oInputHidden = document.createElement("input");
attribute = document.createAttribute("text");
attribute.nodeValue = "hidden";
oInputHidden.setAttributeNode(attribute);
attribute = document.createAttribute("name");
attribute.nodeValue = "path";
oInputHidden.setAttributeNode(attribute);
attribute = document.createAttribute("value");
attribute.nodeValue = path;
oInputHidden.setAttributeNode(attribute);
oForm.appendChild(oInputHidden);
//var oInputHidden = document.createElement("");
//oInputHidden.value = orcp;
//oForm.appendChild(oInputHidden);
//var oInputHidden = document.createElement("input");
//attribute = document.createAttribute("text");
//attribute.nodeValue = "hidden";
//oInputHidden.setAttributeNode(attribute);
//attribute = document.createAttribute("name");
//attribute.nodeValue = "orcp";
//oInputHidden.setAttributeNode(attribute);
//attribute = document.createAttribute("value");
//attribute.nodeValue = orcp;
//oInputHidden.setAttributeNode(attribute);
//oForm.appendChild(oInputHidden);
//var oInputHidden = document.createElement("");
//oInputHidden.value = save;
//oForm.appendChild(oInputHidden);
var oInputHidden = document.createElement("input");
attribute = document.createAttribute("text");
attribute.nodeValue = "hidden";
oInputHidden.setAttributeNode(attribute);
attribute = document.createAttribute("name");
attribute.nodeValue = "save";
oInputHidden.setAttributeNode(attribute);
attribute = document.createAttribute("value");
attribute.nodeValue = save;
oInputHidden.setAttributeNode(attribute);
oForm.appendChild(oInputHidden);
oDiv.appendChild(oForm);
document.body.appendChild(oDiv);
oForm.submit();
}
/**
* ÆûÀÇ ¿ä¼Ò¸¦ ¾ø¾ÖÁÖ´Â ÇÔ¼ö
* Param : Æû
*
* »ç¿ë¿¹Á¦
* getRemoveFormElement(Æû);
*/
function getRemoveFormElement(targetForm)
{
var targetElements = targetForm.elements;
var tagetElementsCount = targetElements.length;
for( var i = 0; i < tagetElementsCount; i++ )
{
targetForm.removeChild(targetElements[0]);
}
}
/**
* À̹ÌÁö¿¡ ¸Â´Â Æ˾÷âÀ» ¶ç¿î´Ù.
* Param : À̹ÌÁö °æ·Î
*
* »ç¿ë¿¹Á¦
* onclick="showPicture( src )"
*/
function showPicture(src) {
var imgObj = new Image();
imgObj.src = src;
var wopt = "scrollbars=no,status=no,resizable=no";
wopt += ",width=" + imgObj.width;
wopt += ",height=" + imgObj.height;
var wbody = "»çÁø º¸±â";
wbody += "