/**********************************************************************************************************
'*	ÇÁ·Î±×·¥¸í : cledorFunction.js
'*	±â´É : ²ø·¹µµ¸£ »çÀÌÆ®¿¡¼­¸¸ »ç¿ëÇÏ´Â ÀÚ¹Ù½ºÅ©¸³Æ®
'*  ¸¸µç³¯Â¥ : 2004-11-05
'*	¸¶Áö¸· ¼öÁ¤ÀÏ : 
'*	¸¶Áö¸· ¼öÁ¤ÀÚ : 
'*	¹öÁ¯ : 1.0
'*	±âÅ¸ »çÇ× : 
'*				1. ±âÁ¸ÀÇ formCheck_function.jsÀÇ ÇÔ¼ö¸¦ Á¤¸®
'*********************************************************************************************************/

// ¸Þ´º ¸µÅ©¸¦ À§ÇÑ URL Á¤ÀÇ

// var SSL_URL_cledorFunction = ""; // SSL Àû¿ëÀü 2007-10-17 À±Á¾Çõ Ãß°¡ 
var SSL_URL_cledorFunction = "https://member.bing.co.kr/cledor";

var CONST_SITE = "http://cledor.co.kr";

//var CONST_SITE = "http://cledor.lhsoft.co.kr";

// È¸¿øÁ¤º¸
function memberInfo(mem_uid){
	//alert(mem_uid);
	if(String(document.location).substring(0, 14) == 'http://wjadmin'){
		window.open('/community/member/memberInfo.asp?mem_uid='+mem_uid, 'memInfo', 'width=600, height=420, top=100, left=300, scrollbars=yes');
	}else{
		window.open('/community/member/memberInfo.asp?mem_uid='+mem_uid, 'memInfo', 'width=600, height=420, top=100, left=300, scrollbars=yes');	
	}
	return;
}

// »õÃ¢À¸·Î ÀÌ¹ÌÁö º¸±â
function windowResize(path){
	window.open('/library/common/windowResize.asp?pic_path='+path, 'img', 'top=200,left=200,status=no,toolbar=no,menubar=no,location=no,scrollbars=no')
}

// ·Î±×ÀÎ ¿©ºÎ¸¦ ¹¯´Â´Ù
function confirmLogin(site, isLogin){
	if(isLogin=='False'){
		var url = getLoginUrl(site);

		if(confirm("È¸¿ø¸¸ÀÌ ÀÌ¿ë°¡´ÉÇÕ´Ï´Ù.\n\n·Î±×ÀÎ ÇÏ½Ã°Ú½À´Ï±î?")){
			location.href = url;
		}else{
			return;
		}
	}
}

//°æ°í ÈÄ ·Î±×ÀÎ ÆäÀÌÁö·Î ÀÌµ¿
function AlertGoLogin()
{
	alert("·Î±×ÀÎÀ» ÇØÁÖ¼¼¿ä.");
	//location.href = SSL_URL_cledorFunction + "/member/login.asp?goURL="  + escape(location.href);	
	location.href = "/members/login.asp?goURL="  + escape(location.href);
}

function AlertMan()
{
	if(confirm("ÅõÇ¥ÇØ ÁÖ¼Å¼­ °¨»çÇÕ´Ï´Ù.\nÁö±Ý ²ø·¹µµ¸£ÀÇ »óÅ­¸¸¸¸¿¡ Âü¿©ÇÏ½Ã°Ú½À´Ï±î?"))
	{
		window.open("http://www.cledor.co.kr/comm/");
		self.close();
	}
	else
	{
	}
}

//ÀÌ¹ÌÁö »çÀÌÁî Á¶Á¤
function getSize(target_img, maxWidth, maxHeight) {
	
	var gwidth = 0;		// º¯°æÀü ÀÌ¹ÌÁö °¡·ÎÅ©±â
	var gheight = 0;	// º¯°æÀü ÀÌ¹ÌÁö ¼¼·ÎÅ©±â
	var swidth = 0;		// º¯°æÈÄ ÀÌ¹ÌÁö °¡·ÎÅ©±â
	var sheight = 0;	// º¯°æÈÄ ÀÌ¹ÌÁö ¼¼·ÎÅ©±â
	var vwidth = maxWidth;	// Ãâ·ÂÇÒ È­¸é °¡·ÎÅ©±â
	var v_height = maxHeight;	// Ãâ·ÂÇÒ È­¸é ¼¼·ÎÅ©±â
	imgname = new Image();
	imgname.src = target_img.src;
//		alert(imgname.width+","+imgname.height);
	gwidth = imgname.width;
	gheight = imgname.height;

	if (gwidth <= vwidth) {
		if (gheight <= v_height) {
			swidth = gwidth;
			sheight = gheight;
		} else {
			swidth = parseInt((v_height*gwidth)/gheight);
			sheight = v_height;
		}
	} else {
		if (gheight <= v_height) {
			swidth = vwidth;
			sheight = parseInt((vwidth*gheight)/gwidth);
		} else {
			if (parseFloat(v_height/vwidth) <= parseFloat(gheight/gwidth)) {
				swidth = parseInt((v_height*gwidth)/gheight);
				sheight = v_height;
			} else {
				swidth = vwidth;
				sheight = parseInt((vwidth*gheight)/gwidth);
			}
		}
	}
	//eval("document." + nn).width = swidth;
	//eval("document." + nn).height = sheight;
	//	alert(swidth+","+sheight);
	target_img.onload = null;
	target_img.src = imgname.src;
	target_img.width = swidth;
	target_img.height = sheight;
}

//ifram ¸®»çÀÌÁî
function doResize(name)
{
	try
	{
		var oBody   = document.frames(name).document.body;
		var oIFrame = document.all(name);
		var frmWidth  = oBody.scrollWidth;
		var frmHeight = oBody.scrollHeight;

		if(frmHeight ==0){
			//alert("ÇÁ·¹ÀÓÀÇ »çÀÌÁî Á¶ÀýÁßÀÔ´Ï´Ù.");			
			frmWidth  = oBody.scrollWidth;
			frmHeight = oBody.scrollHeight;			
		}
		
		oIFrame.style.height = frmHeight;
		oIFrame.style.width = frmWidth;
	}
	catch (e)
	{
		window.status = "IFrame Resize Error";
	}
}

//¹Ìµð¾î ¿ÀºêÁ§Æ® »ý¼º
function callMedia(){
	document.write ("<OBJECT ID=\"MediaPlayer1\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95\" STANDBY=\"Loading Windows Media layer components...\" TYPE=\"application/x-oleobject\">");
	document.write ("<PARAM NAME=\"FileName\" VALUE=\"\">");
	document.write ("<PARAM NAME=\"ShowControls\" VALUE=\"False\">");
	document.write ("<PARAM NAME=\"AutoRewind\" VALUE=\"True\">");
	document.write ("<PARAM NAME=\"AutoStart\" VALUE=\"False\">");
	document.write ("<PARAM NAME=\"Volume\" VALUE=\"-1\">");
	document.write ("<PARAM NAME=\"Volume\" VALUE=\"-1\">");
	document.write ("<PARAM NAME=\"AllowScan\" VALUE=\"True\">");
	document.write ("<PARAM NAME=\"AudioStream\" VALUE=\"-1\">");
	document.write ("<PARAM NAME=\"BufferingTime\" VALUE=\"8\">");
	
	document.write ("</OBJECT>");
}

//»õÃ¢¶ì¿ì±â µå¸²À§¹ö ¼Ò½º
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

