/**
===============================================================================
ÇÁ·Î±×·¥  ¸í  : IBSheet ±âº» È¯°æ ¼³Á¤ Javascript
ÇÁ·Î±×·¥°³¿ä  : IBSheetÀÇ È¯°æÀ» ¼³Á¤ÇÑ´Ù.
                ¾Æ·¡ ÇÔ¼ö´Â IBSheet ±âº» ¼Ó¼ºÀ» ¼³Á¤ÇÏ±â Àü¿¡ È£ÃâÇÏ¿© »ç¿ëÇÑ´Ù.
                ¾Æ·¡ ÇÔ¼ö´Â ConfigXmlÀÇ ºñÈ®Àå¼ºÀ» º¸¿ÏÇÏ±â À§ÇØ »ç¿ëÇÑ´Ù.
ÀÛ   ¼º   ÀÚ  : ¾ÆÀÌºñ ¸®´õ½º ÀÌ°æÈñ
ÀÛ   ¼º   ÀÏ  : 2004.05.17
===============================================================================
¼öÁ¤ÀÚ/¼öÁ¤ÀÏ :  ±è »ó Çö(»ùÇÃ µðÀÚÀÎ  º¯°æ µû¶ó ±âº» µðÀÚÀÎ º¯°æ)
¼öÁ¤»çÀ¯/³»¿ª : 2006.03.06
===============================================================================
*/

/**
 * ¸ÞÀÎ IBSheetÀÇ È¯°æÀ» ¼³Á¤ÇÑ´Ù.
 * param : sheet_obj IBSheet Object ID
 * return : ¾øÀ½
 */
function init_sheet(sheet_obj)
{
  with (sheet_obj)
  {
    HeadBackColor         = RgbColor(236,240,250);  //ÇØ´õÇà ¹è°æ»ö
    DataBackColor         = RgbColor(255,255,255);  //µ¥ÀÌÅÍÇà ¹è°æ»ö(È¦¼ö)
    SubSumBackColor       = RgbColor(219,239,242);  //¼Ò°èÇà ¹è°æ»ö
    CumulateBackColor     = RgbColor(219,239,242);  //´©°èÇà ¹è°æ»ö
    SumBackColor          = RgbColor(220,237,238);  //ÇÕ°èÇà ¹è°æ»ö

    HeadFontColor         = RgbColor(056,87,138);  //ÇØ´õÇà ±ÛÀÚ»ö
    DataFontColor         = RgbColor(85,85,85);     //µ¥ÀÌÅÍÇà ±ÛÀÚ»ö
    SumFontColor          = RgbColor(100,100,100);  //ÇÕ°èÇà ±ÛÀÚ»ö

    //InLineColor           = RgbColor(140,180,197);  //¾ÈÂÊ¼±»ö
    //OutLineColor          = RgbColor(180,220,237);  //¹Ù±ùÂÊ¼±»ö
    InLineColor           = RgbColor(211,211,210);  //¾ÈÂÊ¼±»ö
    OutLineColor          = RgbColor(148,158,189);  //¹Ù±ùÂÊ¼±»ö

    //DataAltanateBackColor = RgbColor(240,245,251);  //µ¥ÀÌÅÍÇà ¹è°æ»ö(Â¦¼ö)
    //SelectBackColor       = RgbColor(240,255,255);  //¼±ÅÃÇà ¹è°æ»ö
    //EditableColor         = RgbColor(255,255,255);    //Default:255,255,255, Èò»ö Edit °¡´É µ¥ÀÌÅÍ ¹è°æ»ö
    UnEditableColor       = RgbColor(243,243,243);   //Default:239,235,239, È¸»ö Edit ºÒ°¡´É µ¥ÀÌÅÍ ¹è°æ»ö
    CountPosition         = 2;

		DataBackColor 				 = RgbColor(243,243,243);
		SelectBackColor 			 = RgbColor(230,214,255);


    EditableColorDiff     = true;
    DateFormatChar        = "-";
		FormatFix							= true; //DateFormatChar °ªÀ» °°ÀÌ ÀúÀåÇÏ´ÂÁö ¿©ºÎ
    ScrollTrack           = true;
    ShowSortArrow         = true;

		HeadFlat							= true;
		Head3D								= false;

    KeyFieldImage         = "/images/sheet/ess2.gif";
    PopupImage            = "/images/sheet/ic_popup1.gif";
    SearchingImage        = "/images/sheet/grid_search2.gif";
    SavingImage           = "/images/sheet/grid_save2.gif";
    DownLoadImage         = "/images/sheet/grid_waitmage.gif";
    UpLoadImage           = "/images/sheet/grid_waitmage.gif";

    HeadHeight            = 22;

    ClipPasteMode         = 1;

		CountPosition					= 4; //Ä«¿îÆ® À§Ä¡(¿ìÃø ÇÏ´Ü)

		MessageText("ConfirmTitle") = "È®ÀÎ";
		MessageText("WarningTitle") = "¿¡·¯";
		AutoRowHeight					= false; // ÀÚµ¿ÁÙ¹Ù²Þ (¾øÀ½)
  }
}


//MS IE ¼³°èº¯°æ¿¡ µû¸¥ ½ÃÆ® Ãß°¡ ¸Þ¼­µå
function MakeIBSheetObject(id)
{
  document.write('<OBJECT ID="'+id+'" ');
  document.write(' CLASSID="CLSID:C838E9DA-1625-4E14-8B37-C6706B43C423" ');
  document.write(' CODEBASE="/sheet/IBSheet.CAB#version=3,0,0,0"> ');
  document.write(' <param name="Visible" value="false"> ');
  document.write('</OBJECT> ');
}

function MakeIBSheetObject4Utf8(id)
{
  document.write('<OBJECT ID="'+id+'" ');
  document.write(' CLASSID="CLSID:C838E9DA-1625-4E14-8B37-C6706B43C423" ');
  document.write(' CODEBASE="/sheet/IBSheet.CAB#version=2,0,0,2"> ');
  document.write(' <param name="UseUTF8" value="true">  ');
  document.write(' <param name="Visible" value="false"> ');
  document.write('</OBJECT> ');
}

function MakeIBTreeObject(id)
{
	document.write('<OBJECT ID="'+id+'" WIDTH="200" HEIGHT="512" ');
	document.write('	CLASSID="CLSID:322B4C50-03FF-4B21-A7E1-7076E7EA9B7A" ');
	document.write('	CODEBASE="/sheet/IBTree.CAB#Vertion=1,5,0,0"> ');
	document.write('	<PARAM name="UseImage" value="1"> ');
	document.write('	<PARAM name="BackColor" value="255,255,255"> ');
	document.write('	<PARAM name="SingleExpand" value="true"> ');
	document.write('</OBJECT> ');
}


/**
 * IBMultiCombo °³Ã¼¸¦ »ý¼ºÇÑ´Ù.
 * param : id        - ComboÀÇ ID¸¦ ¹®ÀÚ¿­·Î ¼³Á¤ÇÑ´Ù.
 * param : width     - ³Êºñ ¼³Á¤, ¹ÌÁöÁ¤½Ã 150À» ±âº»À¸·Î ÇÑ´Ù.
 * param : usecode   - ÄÚµå »ç¿ë¿©ºÎ
 * param : colcnt    - ÄÃ·³°³¼ö
 * param : showcol   - ´ÙÁßÄÃ·³ÀÎ °æ¿ì ¼±ÅÃ½Ã º¸¿©Á®¾ßÇÒ °ªÀÇ ÄÃ·³ ÀÎµ¦½º¸¦ ¼³Á¤ÇÑ´Ù
 * param : stylenm   - ½ºÅ¸ÀÏ ÀÌ¸§
 * return : ¾øÀ½
 * example : 
 *     <script language="javascript">MakeMultiCombo('myCombo');</script>
 *     <script language="javascript">MakeMultiCombo('myCombo', 2, 0);</script>
 */
function MakeMultiCombo(sId, iwidth, usecode, colcnt, showcol, multiselect) {
  var sTag = "";
  var sStyle = "";

  if (iwidth == null) iwidth = 150;

  sTag += "<OBJECT ID='"+sId+"' Width='"+iwidth+"' HEIGHT='21' align='absmiddle'" ;
  sTag += "  CLASSID='CLSID:0B0683AE-1FB7-438f-AA3C-087E11C8AE2D' \n";
  sTag += "  CODEBASE='../controls/IBCombo(MFC)/IBMultiCombo.CAB#version=1,4,0,1' > \n";
  if (usecode != null) sTag += "  <param name='UseCode' value='" + usecode + "'> \n";
  if (colcnt != null)  sTag += "  <param name='ColCnt' value='" + colcnt + "'> \n";
  if (showcol != null) sTag += "  <param name='ShowCol' value='" + showcol + "'> \n";
  if (multiselect != null) sTag += "  <param name='MultiSelect' value='" + multiselect + "'> \n";
  sTag += "  <param name='Style' value='1'> \n";
  sTag += "</OBJECT> \n";
  document.write(sTag);
}


function MakeTab(objId, sWidth, sHeight) {
  var sTag = "";
  sTag += '<OBJECT ID="'+objId+'" WIDTH="'+sWidth+'" HEIGHT="'+sHeight+'" \n';
  sTag += '        CLASSID="CLSID:B4019746-931F-4116-912C-8A11406BDE80"  \n';
  sTag += '        CODEBASE="/sheet/IBTab.CAB#Version=1,1,0,5">  \n';
	sTag += '<param name="BaseColor"" value="#FFFFFF">  \n';
	sTag += '</OBJECT> \n';

  document.write(sTag);
}
