/*CORE SCRIPT*/
	/*Dynamic Form Create*/
	function fn_create_form(str_name,str_method,str_action)
	{
		var objF = document.createElement("form");
		if(str_name != '')
		{
			objF.setAttribute("id",str_name);
			objF.setAttribute("name",str_name);
		}
		objF.setAttribute("method",str_method);
		objF.setAttribute("action",str_action);		
		return objF;
	}
	
	function fn_create_hidden(strName,strValue)
	{
		var objTinput = document.createElement("input");
		objTinput.setAttribute("type","hidden");
		if(strName != null)objTinput.setAttribute("name",strName);
		if(strValue != null)objTinput.setAttribute("value",strValue);
		return objTinput;
	}
	
	/*
	*fn_ajax_redirect
	*action_url : ÀÌµ¿ÇÒ url °æ·Î
	*tarFunc : ÇÔ¼ö¸í
	*action_urlÀ» ÀÔ·Â ¹Þ¾Æ¼­, µ¿ÀûÀ¸·Î ´ë»ó ÆûÀ» »ý¼ºÇÏ¿© tarFunc·Î ³Ñ±ä´Ù.
	*usage : fn_ajax_redirect_body(sub.js)
	*/
	function fn_ajax_redirect(action_url,tarFunc)
	{
		var f = fn_create_form('','post',action_url);
		tarFunc(f);	
	}
	/*
	*fn_get_random_int
	*function for Get Random Integer
	*usage : fn_set_history(js_rsh.php3)
	*/
	function fn_get_random_int(int_min,int_max)
	{
		var int_rnd = (parseInt(Math.random() * int_max + int_min));
		return int_rnd;
	}
	/*
	*print popup
	*
	*/
	function fn_popup_print(fobj,popstyle)
	{
		if(!fobj)return;
		var pop = window.open('','popPrint',popstyle);
		fobj.action='/pages/common/print/printAction.php3';
		fobj.target = 'popPrint';
		fobj.submit();
	}
	
	/*
	*Page Alias
	*ccd_alias
	*/
	function fn_post_alias(ccd_alias)
	{
		var f = fn_create_form("aliasF","post","/pages/common/query/aliasAction.php3");
		
		var hdnAlias = document.createElement("input");
		hdnAlias.setAttribute("type","hidden");
		hdnAlias.setAttribute("name","ccd_alias");
		hdnAlias.setAttribute("value",ccd_alias);
		
		f.appendChild(hdnAlias);
		
		ajaxSubmit(f,"fn_post_alias_out");
	}

	function fn_post_alias_out(responseText)
	{
		var ven_idx = responseText;
		if(ven_idx<=0)return;
		
		//fn_post_ven(ven_idx); //2008.05.30 by Sam,Kim  - ajax request
		fn_post_pool(ven_idx);
	}

	function fn_set_font(strMsg, strStyle)
	{
		if(strStyle==null)strStyle="";
		if(strMsg==null)strMsg="";
		return fn_set_tag('font',strMsg,strStyle);	
	}

	function fn_set_tag(strTag, strMsg, strStyle)
	{
		if(strTag == null)return;
		if(strMsg == null)strMSg = "";
		if(strStyle==null)strStyle = "";
		
		var str = "<" + strTag + " ";
		if(strStyle != "")str = str + " " + strStyle + " ";
		
		str = str + ">";
		str = str + strMsg + "</" + strTag + ">";

		return str;		
	}
	
	function fn_open_progress()
	{
		totalTime = 4*10;
		barSize =0 ;
		var prog	= document.getElementById('progress');
		if(!prog)return;
		prog.style.top	= event.clientY-50;
		prog.style.left = event.clientX-50;
		prog.style.display	= 'block';
		var progBar = document.getElementById('progressBar');
		if(!progBar)return;
		//progBar.style.border = '1 solid black';
		progBar.style.height = 3;
		moveNow = setInterval("growUp()",totalTime);
	}
	
	function fn_close_progress()
	{
		var progBar = document.getElementById('progressBar');
		clearInterval(moveNow);
		var prog	= document.getElementById('progress');
		if(!prog)return;
		prog.style.display	= 'none';
		progBar.style.width = 0;
	}
	
	function growUp()
	{
		barSize += eval(8);
		var progBar = document.getElementById('progressBar');
		if(!progBar)return;
		progBar.style.width = barSize;
		if(barSize >= 400)
		{
			clearInterval(moveNow);
		}
	}
	
	
	
	
	
	
	
	
	
	
	
	
