document.title = "기아체험 24시간";

var IE = (navigator.appName.indexOf("Microsoft")>-1);
var IE6 = IE&&(navigator.userAgent.indexOf("MSIE 6")>-1);
var IE7 = IE&&(navigator.userAgent.indexOf("MSIE 7")>-1);
var IE8 = IE&&(navigator.userAgent.indexOf("MSIE 8")>-1);
var safari = (navigator.appName.indexOf("Netscape")>-1)&&(navigator.userAgent.indexOf("Safari")>-1);
var opera = (navigator.appName.indexOf("Opera")>-1);


var flaVal;
var urlPre = 'https:' == document.location.protocol ? 'https://' : 'http://'
function mnav() {
	
	var url= '/common/fla/GNB.swf?'+flaVal;
	document.write("\
		<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='"+ urlPre +"fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' width='450' height='60'>\
			<param name='movie' value="+url+" />\
			<param name='wmode' value='transparent' />\
			<param name='bgcolor' value='#ffffff' />\
			<param name='allowScriptAccess' value='always' />\
			<!--[if !IE]> <-->\
			<object data="+url+"  type='application/x-shockwave-flash' width='450' height='60'>\
			<param name='wmode' value='transparent' />\
			<param name='bgcolor' value='#ffffff' />\
			<param name='allowScriptAccess' value='always' />\
			<!--> <![endif]-->\
				<div class='gnb'>\
					<a href='#'>기아체험 소개</a>\
					<a href='#'>참여하기</a>\
					<a href='#'>커뮤니티</a>\
					<a href='#'>자료실</a>\
				</div>\
			<!--[if !IE]> <-->\
			</object>\
			<!--> <![endif]-->\
		</object>\
		");

}

function snav() {	
	var url = '/common/fla/lnb.swf?'+flaVal;
	document.write("\
		<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='"+ urlPre +"fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0' id='lnb'  width='181' height='550'>\
			<param name='movie' value="+url+" />\
			<param name='wmode' value='transparent' />\
			<param name='bgcolor' value='#ffffff' />\
			<param name='allowScriptAccess' value='always' />\
			<!--[if !IE]> <-->\
			<object data="+url+" type='application/x-shockwave-flash' id='lnb'  width='181' height='550'>\
			<param name='wmode' value='transparent' />\
			<param name='bgcolor' value='#ffffff' />\
			<param name='allowScriptAccess' value='always' />\
			<!--> <![endif]-->\
				<div class='gnb'>\
					<a href='#'>기아체험 소개</a>\
					<a href='#'>참여하기</a>\
					<a href='#'>커뮤니티</a>\
					<a href='#'>자료실</a>\
				</div>\
			<!--[if !IE]> <-->\
			</object>\
			<!--> <![endif]-->\
		</object>\
		");
}




function FlashV(url, w, h, val, id){
 
var html;

html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+ urlPre +'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'" id = "'+id+'">';
html += '<param name="movie" value="'+url+'">';
html += '<param name="wmode" value="transparent">';
html += '<param name="scale" value="noscale" /><param name="salign" value="t" />';
html += '<param name="FlashVars" value="'+val+'" />'
html += '<param name="quality" value="high">';
html += '<embed width="'+w+'" height="'+h+'" src="'+url+'" FlashVars="'+val+'" wmode="transparent"></embed>'
html += '</object>'

document.write(html);

}




function FlashVMain(url, w, h, val, id){
 
var html;

html = '<object id="mainFlv" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+ urlPre +'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'" id = "'+id+'">';
html += '<param name="movie" value="'+url+'">';
html += '<param name="wmode" value="transparent">';
html += '<param name="scale" value="noscale" /><param name="salign" value="t" />';
html += '<param name="FlashVars" value="'+val+'" />'
html += '<param name="quality" value="high">';
html += '<embed name="mainFlv" width="'+w+'" height="'+h+'" src="'+url+'" FlashVars="'+val+'" wmode="transparent"></embed>'
html += '</object>'

document.write(html);

}



function FlashVEdu(url, w, h, val, id){
 
var html;

html = '<object id="EduFlv" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+ urlPre +'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'" id = "'+id+'">';
html += '<param name="movie" value="'+url+'">';
html += '<param name="wmode" value="transparent">';
html += '<param name="scale" value="noscale" /><param name="salign" value="t" />';
html += '<param name="FlashVars" value="'+val+'" />'
html += '<param name="quality" value="high">';
html += '<embed name="EduFlv" width="'+w+'" height="'+h+'" src="'+url+'" FlashVars="'+val+'" wmode="transparent"></embed>'
html += '</object>'

document.write(html);

}




// ie6 png 투명 적용 스크립트 및 CSS : 이미지 배경이 아닐경우 
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 '';
}

// 레이어보기 
function showLayer(id) {
	var target = document.getElementById(id);
	target.style.display= (target.style.display=='block') ? 'none' : 'block';
}


function lnb_banner(num){
	switch(num){
		case "1": //기아체험 직접 만들기
			location.href="/participation/famine_make.asp";
		break;
		case "2": //열린 기아체험 참여하기
			location.href="/participation/famine_ing.asp";
		break;
		case "3": //스폰서북 신청하기
			location.href="/participation/famine_sponsor_book.asp";
		break;
	}
}



function showmessagebox(msg){
	
}

function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no, status=no') } //Popup(스크롤바없음)
function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(스크롤바있음)
function newpop(url){ window.open(url) } //Popup(스크롤바있음)

function autoResize(i)
//리사이징
{
	var iframeHeight=
	(i).contentWindow.document.body.scrollHeight;
	(i).height=iframeHeight+20;
}

