var httpRequest = null;

function getXMLHttpRequest()
{
  if (window.ActiveXObject)
  {
	  try
	  {
		return new ActiveXObject("Msxml2.XMLHTTP");
	  }
	  catch (e)
	  {
		  try
		  {
			return new ActiveXObject("Microsoft.XMLHTTP");
		  }
		  catch (e)
		  {
			  return null;
		  }
	  }
  } 
  else if (window.XMLHttpRequest)
  {
	  return new XMLHttpRequest();
  } else {
	  return null;
  }
}

//index.swf ÆÄÀÏ Å×µÎ¸® ¾ø¾Ö´Â ½ºÅ©¸³Æ®
function makeSWF(url, width, height)
{
	//document.write('<embed src=' + url + ' width=' + width + ' height=' + height + ' wmode="transparent" type=application/x-shockwave-flash autostart=true loop=true>');
	
	document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+ width +'" height="'+ height +'">');
	document.write('	<param name="movie" value="'+ url +'">');
	document.write('	<param name="quality" value="high">');
	document.write('    <param name="wmode" value="transparent">');
	document.write('	<embed src="'+ url +'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+ width +'" height="'+ height +'"></embed>');
	document.write('</object>');
	
}

function makeSWF2(url, width, height, ver, idx)
{
	document.write('<object id="'+ idx +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ width +'" height="'+ height +'">');
	document.write('	<param name="movie" value="'+ url +'">');
	document.write('    <param name="quality" value="high">');
	//document.write('    <param name="wmode" value="opaque">');
	document.write('    <param name="wmode" value="transparent">');
	document.write('	<param name="swfversion" value="'+ ver +'">');
	document.write('	<param name="expressinstall" value="Scripts/expressInstall.swf">');
	document.write('	<object type="application/x-shockwave-flash" data="'+ url +'" width="'+ width +'" height="'+ height +'">');
	document.write('		<param name="quality" value="high">');
	//document.write('		<param name="wmode" value="opaque">');
	document.write('		<param name="wmode" value="transparent">');
	document.write('		<param name="swfversion" value="'+ ver +'">');
	document.write('		<param name="expressinstall" value="Scripts/expressInstall.swf">');
	document.write('		<div>');
	document.write('		<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>');
	document.write('		<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>');
	document.write('		</div>');
	document.write('	</object>');
	document.write('</object>');
}


function Family_Site()
{
	var html = document.getElementById("family");
	var txt = "";

	txt = "<select name='select2' style='font-size:11px; color:#9F9B9B;' onChange='Family_Link();'>";
	txt = txt + "  <option value='0' selected>Family site</option>";
	txt = txt + "  <option value='1'>¿ÂÅ¸¿î</option>";
	txt = txt + "  <option value='2'>¾¾³×È£ÅÚ</option>";
	txt = txt + "  <option value='3'>¿Í¿ì½Ã³×</option>";
	txt = txt + "  <option value='4'>ÄÝ¸¶³Ê</option>";
	txt = txt + "  <option value='5'>¼¿·±</option>";
	txt = txt + "  <option value='6'>Æ¼Áö¿¡³ÊÁö</option>";
	txt = txt + "  <option value='7'>¾ÆÀÌµð¾¾ÅØ</option>";
	txt = txt + "  <option value='8'>Æ¼ÄÄÅ×Å©³î·ÎÁö</option>";
	txt = txt + "  <option value='9'>TG»ïº¸ÄÄÇ»ÅÍ</option>";
	txt = txt + "  <option value='10'>ÇÑ±Û°úÄÄÇ»ÅÍ</option>";
	txt = txt + "</select>";

	html.innerHTML = txt;
}

function Family_SiteDesign()
{
	var html = document.getElementById("family");
	var txt = "";

	txt = "<select name='select2' class='select1' setColor='gray,white,gray,#e1e0e0,#d3d3d3,#d3d3d3' style='font-size:11px; color:#9F9B9B;' onChange='Family_Link();'>";
	txt = txt + "  <option value='0' selected>Family site</option>";
	txt = txt + "  <option value='1'>¿ÂÅ¸¿î</option>";
	txt = txt + "  <option value='2'>¾¾³×È£ÅÚ</option>";
	txt = txt + "  <option value='3'>¿Í¿ì½Ã³×</option>";
	txt = txt + "  <option value='4'>ÄÝ¸¶³Ê</option>";
	txt = txt + "  <option value='5'>¼¿·±</option>";
	txt = txt + "  <option value='6'>Æ¼Áö¿¡³ÊÁö</option>";
	txt = txt + "  <option value='7'>¾ÆÀÌµð¾¾ÅØ</option>";
	txt = txt + "  <option value='8'>Æ¼ÄÄÅ×Å©³î·ÎÁö</option>";
	txt = txt + "  <option value='9'>TG»ïº¸ÄÄÇ»ÅÍ</option>";
	txt = txt + "  <option value='10'>ÇÑ±Û°úÄÄÇ»ÅÍ</option>";
	txt = txt + "</select>";

	html.innerHTML = txt;
}

function Family_SiteDesign2()
{
	var html = document.getElementById("family");
	var txt = "";

	txt = "<select name='select2' class='select2' setColor='gray,white,gray,#e1e0e0,#d3d3d3,#d3d3d3' style='font-size:11px; color:#9F9B9B;' onChange='Family_Link();'>";
	txt = txt + "  <option value='0' selected>Family site</option>";
	txt = txt + "  <option value='1'>¿ÂÅ¸¿î</option>";
	txt = txt + "  <option value='2'>¾¾³×È£ÅÚ</option>";
	txt = txt + "  <option value='3'>¿Í¿ì½Ã³×</option>";
	txt = txt + "  <option value='4'>ÄÝ¸¶³Ê</option>";
	txt = txt + "  <option value='5'>¼¿·±</option>";
	txt = txt + "  <option value='6'>Æ¼Áö¿¡³ÊÁö</option>";
	txt = txt + "  <option value='7'>¾ÆÀÌµð¾¾ÅØ</option>";
	txt = txt + "  <option value='8'>Æ¼ÄÄÅ×Å©³î·ÎÁö</option>";
	txt = txt + "  <option value='9'>TG»ïº¸ÄÄÇ»ÅÍ</option>";
	txt = txt + "  <option value='10'>ÇÑ±Û°úÄÄÇ»ÅÍ</option>";
	txt = txt + "</select>";

	html.innerHTML = txt;
}

function Family_Link()
{
	var flag = document.getElementById("select2").value;
	var url_link = "";
	
	if (flag == "1")		//¿ÂÅ¸¿î
	{
		url_link = "http://www.ontown.co.kr";
	}
	else if (flag == "2")	//¾¾³×È£ÅÚ
	{
		url_link = "http://www.cinehotel.co.kr";
	}
	else if (flag == "3")	//¿Í¿ì½Ã³×
	{
		url_link = "http://www.wowcine.net";
	}
	else if (flag == "4")	//ÄÝ¸¶³Ê
	{
		url_link = "http://www.callmaner.co.kr";
	}
	else if (flag == "5")	//¼¿·±
	{
		url_link = "http://www.celrun.com";
	}
	else if (flag == "6")	//ÇÁ¸®»û
	{
		url_link = "http://www.freesat.co.kr";
	}
	else if (flag == "7")	//¾ÆÀÌµð¾¾ÅØ
	{
		url_link = "http://www.idc.co.kr";
	}
	else if (flag == "8")	//Æ¼ÄÄÅ×Å©³î·ÎÁö
	{
		url_link = "http://www.tcomtech.com";
	}
	else if (flag == "9")	//TG»ïº¸ÄÄÇ»ÅÍ
	{
		url_link = "http://www.trigem.co.kr";
	}
	else if (flag == "10")	//ÇÑ±Û°úÄÄÇ»ÅÍ
	{
		url_link = "http://haansoft.co.kr";
	}

	if (url_link != "")
	{
		window.open(url_link);
	}
}

function Left_Menu()
{
	var html = document.getElementById("div_left01");
	var txt = "";

	txt = txt + "<table width='100%' border='0' cellspacing='0' cellpadding='0'>";
	txt = txt + "  <tr>";
	txt = txt + "    <td style='padding:0 0 6 0'><img src='../images/left_common1.gif' alt='´º½º' width='179' height='33' border='0' onClick=menu_click('50'); style='cursor:pointer;'></td>";
	txt = txt + "  </tr>";
	txt = txt + "  <tr>";
	txt = txt + "    <td style='padding:0 0 6 0'><img src='../images/left_common2.gif' alt='»ç¾÷Á¦ÈÞ¹®ÀÇ' width='179' height='33' border='0' onClick=menu_click('42'); style='cursor:pointer;'></td>";
	txt = txt + "  </tr>";
	txt = txt + "  <tr>";
	txt = txt + "    <td><img src='../images/left_common3.gif' alt='IR¹®ÀÇ' width='179' height='33' border='0' onClick=menu_click('55'); style='cursor:pointer;'></td>";
	txt = txt + "  </tr>";
	txt = txt + "</table>";

	html.innerHTML = txt;
}

function DocumentPrint()
{
	window.print();
}

function EmailCheck()
{
	var MList = document.getElementById("email2").value;
	
	if (MList == "etc")
	{
		document.getElementById("hddeml").value = "";
		document.getElementById("hddeml").style.display = "";
	}
	else
	{
		document.getElementById("hddeml").value = "";
		document.getElementById("hddeml").style.display = "none";
	}
}
