/** ÇÃ·¡½Ã°ü·Ã */
/**
ÇÃ·¡½Ã ÅÂ±× Ãâ·Â
*/
function flashWrite(swf_name,swf_file,swf_width,swf_height,flash_var) {
	document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" ");
	document.write(" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" ");
	document.write(" width=\""+swf_width+"\" height=\""+swf_height+"\" id=\""+ swf_name +"\" align=\"middle\">");
	if(flash_var != undefined) {
	document.write("<param name=\"flashvars\" value=\"" + flash_var + "\" />");
	}
	document.write("<param name=\"allowScriptAccess\" value=\"always\">");
	document.write("<param name=\"movie\" value=\"" + swf_file +"\">");
	document.write("<param name=\"quality\" value=\"high\">");
	document.write("<param name=\"menu\" value=\"false\">");
	document.write("<param name=\"wmode\" value=\"transparent\">");
	document.write("<embed src=\"" + swf_file +"\" quality=\"high\"");
	document.write(" width=\""+swf_width+"\" height=\""+swf_height+"\" name=\""+ swf_name +"\" align=\"middle\" ");
	if(flash_var != undefined) {
	document.write(" flashvars=\"" + flash_var + "\"");
	}
	document.write(" allowScriptAccess=\"always\" wmode=\"transparent\" menu=\"false\" type=\"application/x-shockwave-flash\" ");
	document.write(" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
	document.write("</object>");
}
/**
	ÇØ´ç xmlId¸¦ °¡Á®¿Â´Ù.
*/
function xmlId() {
	return (menu_xml_id == "undifined")? "07": menu_xml_id;
}

// Flash ExternalInterface Return Value
function swfInit(src) {
	var url;
	switch(src) {
		//-- etc link
		case "link_faq" : url = "/cs/faq.do" ; break;
		case "link_qa" : url = "/cs/qna.do" ; break;
		case "link_guide" : url = "javascript:popup_send_guide();" ; break;
		case "menu_xml" : url = "http://corp.gifticon.com/imgsvr/images/swf/xml/gift_menu.xml"; break;
		case "brand_xml" : url = "http://corp.gifticon.com/imgsvr/images/swf/xml/gift_brand.xml"; break;
		case "intro_xml" : url = "http://corp.gifticon.com/imgsvr/images/swf/xml/gift_intro.xml"; break;
	}
	return url;
}


/** ÇÃ·¡½Ã °ü·Ã */

/**
 ´ë·®¹ß¼Û ¾È³» ÆË¾÷
**/
function popup_send_guide() {
	var url = "/send/guide.do";
	popupCenterWindow(url, "send_guide", 700, 605);
}
/**
 B2C¹Ù·Î°¡±â
**/
function go_b2c(){
	window.open("http://www.gifticon.com","b2c","");
}
/**
´Þ·Âº¸±â
*/
function openCalendar(posY, tmpX) {
	var objCalendar = document.getElementById("calendar");
	posX = (document.documentElement.clientWidth) / 2;
	objCalendar.left = posX + tmpX;
	objCalendar.style.left = objCalendar.left + "px";
	objCalendar.top = posY;
	objCalendar.style.top = objCalendar.top + "px";
	objCalendar.style.display = "block";
}
function closeCalendar() {
	var objCalendar = document.getElementById("calendar");
	objCalendar.style.display = "none";
}


//open popup ; show alert message if popup is denied
function openDenyPopup(url, width, height, scroll, winName){
	var setup = "width=" + width + ",height=" + height + ",toolbar=no,location=no,status=no,menubar=no,top=20,left=20,scrollbars=" + scroll +",resizable=no" ;
	
	if (winName == "" || !winName) winName = "popup"; 
	var win = window.open(url,winName,setup);
	
	if (win == null) alert("Â÷´ÜµÈ ÆË¾÷Ã¢À» Çã¿ëÇØ ÁÖ½Ê½Ã¿À.");
	else win.focus();
}
