/*
 * @(#)common.js
 *
 * @version 1.0
 * @since 1.0 - 2011. 3.
 * @author kevin (cavinu@yourbiz.co.kr)
 * @package YourBiz
 * @copyright Copyright (c) 2011 YourBiz Interactive. All rights reserved.
 *
 */

/* 상단 네비게이션  링크 */
function flink(oneDepth, twoDepth){
    var link_url = "/";
    
    oneDepth = parseInt(oneDepth);
    twoDepth = parseInt(twoDepth);
    
    switch(oneDepth){
        case 1:
            switch(twoDepth){
                case 0: link_url="/about/overview.php"; break;
                case 1: link_url="/about/overview.php"; break;
                case 2: link_url="/about/history.php"; break;
                case 3: link_url="/about/organization.php"; break;
                case 4: link_url="/about/vision.php"; break;
                case 5: link_url="/about/contactUs.php"; break;
                case 6: link_url="/about/notice.php"; break;
            }
            break;
        case 2:
            switch(twoDepth){
                case 0: link_url="/business/accountExecutive.php"; break;
                case 1: link_url="/business/accountExecutive.php"; break;
                case 2: link_url="/business/EBMConsulting.php"; break;
				case 3: link_url="/business/Advertising.php"; break;
            }
            break;
        case 3:
            switch(twoDepth){
                case 0: link_url="/creative/creative.php"; break;
                case 1: link_url="/creative/creative.php"; break;
            }
            break;
        case 4:
            switch(twoDepth){
                case 0: link_url="/recruit/recruit.php"; break;
                case 1: link_url="/recruit/recruit.php"; break;
            }
            break;
    }

    if(link_url==""){
        link_url = "/";
    }
    location.href=link_url;
}

function view_div(b, divId) {
	var dhtml = DhtmlUtil;
	if($("formOverlay") == undefined) {
		var objBody = $$("body")[0];
		objBody.appendChild(Builder.node("div",{id:"formOverlay"}));
		dhtml.fullSize("formOverlay");
		$("formOverlay").hide();
	}
	if(b) {
		if($(divId) != undefined) {
			$(divId).show();
		}
		dhtml.fullSizeCenter(divId, "formOverlay");
	} else {
		if($(divId) != undefined) {
			$(divId).hide();
		}
		$("formOverlay").hide();
	}
}

function email_change(value) {
	if(value=="" || value=="direct"){
		$("email2").value = "";
		$("email2").focus();
	} else {
		$("email2").value = value;
	}
}

//EOF 
