/******************************************************************************/
/* popup
/******************************************************************************/
/* window_open 스크롤이 없을 때 */
function popWin(url, target, intwidth, intheight) {
	window.open(url, target , "width="+intwidth+", height="+intheight+", resizable=0,scrollbars=0");
}

/* window_open 스크롤이 있을 때 */
function popWinS(url, target, intwidth, intheight) {
	window.open(url, target , "width="+intwidth+",height="+intheight+",resizable=0,scrollbars=1");
}

/* window_close */
function popClose() {
	window.close();
}


/******************************************************************************/

/******************************************************************************/
// png24
function setPng24(obj) {
    obj.width=obj.height=1;
    obj.className=obj.className.replace(/\bpng24\b/i,'');
    obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');"
    obj.src='';
    return '';
}


/* image rollover */
function rollOver(imgEl) {
	imgEl.src = imgEl.src.replace("off.gif", "on.gif");
}

function rollOut(imgEl) {
	imgEl.src = imgEl.src.replace("on.gif", "off.gif");
}


// flash height
function menu(flag){
	if ( flag == "on"){
		document.getElementById("bizNaviWrap").style.height = "251px";
		document.getElementById("footerWrap").style.height = "309px";
	} else if ( flag == "off"){
		document.getElementById("bizNaviWrap").style.height = "45px";
		document.getElementById("footerWrap").style.height = "103px";
		document.getElementById("bizNaviWrap").style.overflow = "hidden";
	}
}

function menu1(flag1){
	if ( flag1 == "on"){
		document.getElementById("footerWrap").style.height = "309px";
		document.getElementById("bizNaviWrap").style.height = "251px";
		document.getElementById("familyWrap").style.zIndex = "1000";
	} else if ( flag1 == "off"){
		document.getElementById("footerWrap").style.height = "103px";
		document.getElementById("bizNaviWrap").style.height = "45px";
		document.getElementById("familyWrap").style.zIndex = "90";
	}
}



// target at strict mode
function externalLinks(){
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}

window.onload = function(){
	externalLinks();
}



function showTab(flag2){
	if ( flag2 == "tab1" ) {
	document.getElementById("mBoard1").style.display ="block";
	document.getElementById('tabBoard1').className = 'selected';
	document.getElementById('tabBoard2').className = '';
	 document.getElementById("mBoard2").style.display ="none";
	} else if ( flag2 == "tab2" ){
	document.getElementById("mBoard1").style.display ="none";
	document.getElementById("mBoard2").style.display ="block";
	document.getElementById('tabBoard2').className = 'selected';
	document.getElementById('tabBoard1').className = '';
	}
}



$(document).ready(function(){
	var currentPosition = parseInt($("#heightgrid #quickMn").css("top"));
	$(window).scroll(function() {
		if($(window).scrollTop()<5000){
			var position = $(window).scrollTop(); // 현재 스크롤바의 위치값을 반환합니다.
		}else{
			var position=600;
		}
		$("#heightgrid #quickMn").stop().animate({"top":position+currentPosition+"px"},300);
	});

	$('#heightgrid').scroll(function() {
		if($('#heightgrid').scrollTop()<5000){
			var position = $('#heightgrid').scrollTop(); // 현재 스크롤바의 위치값을 반환합니다.
		}else{
			var position=600;
		}
		$("#heightgrid #quickMn").stop().animate({"top":position+currentPosition+"px"},300);
	});

});




  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20111069-1']);
  _gaq.push(['_setDomainName', 'none']);
  _gaq.push(['_setAllowLinker', true]);
  _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);
	//alert(ga.src)
  })();


