// Hide And Show Toggle
var menu_on_off = false;
function Main_All_Menu() {
	if( menu_on_off == false ){
		Main_All_Menu_Show();
		menu_on_off = true;
	}else{
		Main_All_Menu_Hide();
		menu_on_off = false;
	}
}

function Main_All_Menu_Show() {
	jQuery("#main_menu_disp1").hide();
//	jQuery("#main_menu_disp2").fadeIn("slow");
	jQuery("#main_menu_disp2").fadeIn("slow");
}

function Main_All_Menu_Hide() {
	jQuery("#main_menu_disp1").show();
	jQuery("#main_menu_disp2").hide();
//	jQuery("#main_menu_disp1").fadeIn("slow");
}

var cc=0
function hideShow(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="none";
    } else {
        cc=0
        document.getElementById(id).style.display="block";
    }
}

// Show And Hide Toggle
var cc=0
function showHide(id) {
    if (cc==0) {
        cc=1
        document.getElementById(id).style.display="block";
    } else {
        cc=0
        document.getElementById(id).style.display="none";
    }
}

// Local Navigation Toggle
function lnbToggle(id) {
	for(num=1; num<=3; num++) document.getElementById('D3MG'+num).style.display='none'; //D4MG1~D4MG3 까지 숨긴 다음
	document.getElementById(id).style.display='block'; //해당 ID만 보임
}

// IS
function chkIsKind(key, value) {
    showHide('selectOrder');
    xGetElementById('search_target'+key).checked = true;
    xInnerHtml('search_target_label', value);
}

//플래쉬 소스
function flash(width,height,flash_name) {
 var flash_tag = "";
 flash_tag = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
 flash_tag +='codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" ';
 flash_tag +='WIDTH="'+width+'" HEIGHT="'+height+'" >';
 flash_tag +='<param name="movie" value="'+flash_name+'">';
 flash_tag +='<param name="quality" value="high">';

 flash_tag +='	<param name="wmode" value="transparent">';
 flash_tag +='<embed src="'+flash_name+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent"';
 flash_tag +='type="application/x-shockwave-flash"  WIDTH="'+width+'" HEIGHT="'+height+'"></embed></object>'
 document.write(flash_tag);
}

//swfobject 플래쉬 소스
function swfobject_flash(f_width,f_height,filepath) {

    var flash_tag = "";

    flash_tag = '<div id="swfobject_flash">';
    flash_tag += '	<p>In order to view this object you need Flash Player 9+ support!</p>';
    flash_tag += '	<a href="http://www.adobe.com/go/getflashplayer" target="_blank">';
    flash_tag += '		<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/>';
    flash_tag += '	</a>';
    flash_tag += '</div>';
    document.write(flash_tag);

    // JAVASCRIPT VARS
    // cache buster
    var cacheBuster = "?t=" + Date.parse(new Date());

    // stage dimensions		
    var stageW = f_width; //"100%";
    var stageH = f_height; //"100%";

    // PARAMS
    var params = {};
    params.bgcolor = "#ffffff";
    params.menu = "false";
    params.scale = 'noScale';
    params.wmode = "opaque";
    params.allowfullscreen = "true";
    params.allowScriptAccess = "always";			
    
    // FLASH VARS
    var flashvars = {};
    
    // if commented / delete these lines, the component will take the stage dimensions defined 
    // above in "JAVASCRIPT SECTIONS" section or those defined in the settings xml
    flashvars.componentWidth = stageW;
    flashvars.componentHeight = stageH;
    
    // path to the content folder(where the xml files, images or video are nested)
    // if you want to use absolute paths(like "http://domain.com/images/....") then leave it empty("")			
    flashvars.pathToFiles = "http://saepusan.co.kr/banner/"+filepath+"/";

    // path to content XML
    flashvars.xmlPath = flashvars.pathToFiles+"xml/banner.xml";

    // EMBED THE SWF
    swfobject.embedSWF("http://saepusan.co.kr/banner/banner.swf"+cacheBuster, "swfobject_flash", stageW, stageH, "9.0.124", "", flashvars, params, {});
}


var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-29271725-1']);
_gaq.push(['_setDomainName', 'saepusan.co.kr']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

