// JavaScript Document

//var root = "http://" + document.location.host;
var exe  = ".do";
var root = "";


function logo(){
	location.href = root + "/kor/";
}

/*---------------------------------------------------------------------------------------------*/

// 특구소식 //

function sub01_1(){
	location.href = root + "news" + exe + "?p.pP=bl&p.pBID=c4ca4238a0b923820dcc509a6f75849b";
}

function sub01_2(){
	location.href = root + "news" + exe + "?p.pP=bl&p.pBID=c81e728d9d4c2f636f067f89cc14862c";
}

function sub01_3(){
	location.href = root + "news" + exe + "?p.pP=bl&p.pBID=1679091c5a880faf6fb5e6087eb1b2dc";
}

function sub01_4(){
	location.href = root + "news" + exe + "?p.pP=bl&p.pBID=8f14e45fceea167a5a36dedd4bea2543";
}

function sub01_5(){
	location.href = root + "news" + exe + "?p.pP=bl&p.pBID=c9f0f895fb98ab9159f51fd0297e236d&p.pCATE=Season2";
}

function sub01_6(){
	location.href = root + "news" + exe + "?p.pP=bl&p.pBID=6512bd43d9caa6e02c990b0a82652dca";
}




// 특구기술 //

function sub02_1(){
	location.href = root + "technology_1" + exe;
}

function sub02_2(){
	location.href = root + "technology_2_1" + exe;
}

function sub02_3(){
	location.href = root + "technology_3" + exe;
}

function sub02_4(){
	location.href = root + "technology_4_1" + exe;
}

function sub02_5(){
	location.href = root + "technology_5_1" + exe;
}




// 공유/참여 //

function sub03_1(){
	location.href = root + "community" + exe + "?p.pP=bl&p.pBID=c51ce410c124a10e0db5e4b97fc2af39";
}

function sub03_2(){
	location.href = root + "community" + exe + "?p.pP=bl&p.pBID=aab3238922bcc25a6f606eb525ffdc56";
}

function sub03_3(){
	location.href = root + "community" + exe + "?p.pP=bl&p.pBID=9bf31c7ff062936a96d3c8bd1f8f2ff3";
}

function sub03_4(){
	location.href = root + "poll" + exe;
}

function sub03_5(){
	location.href = root + "community_5_1" + exe;
}

function sub03_6(){
	location.href = root + "community" + exe + "?p.pP=bl&p.pBID=a1d0c6e83f027327d8461063f4ac58a6";
}

function sub03_7(){
	location.href = root + "community_7" + exe;
}


// 주요행사 //

function sub04_1(){
	location.href = root + "event" + exe + "?p.pP=bl&p.pBID=c74d97b01eae257e44aa9d5bade97baf";
	//location.href = root + "event_1" + exe;
}

function sub04_2(){
	location.href = root + "event" + exe + "?p.pP=bl&p.pBID=c74d97b01eae257e44aa9d5bade97baf";
}

function sub04_3(){
	location.href = root + "event" + exe + "?p.pP=bl&p.pBID=70efdf2ec9b086079795c442636b55fb";
}

function sub04_4(){
	location.href = root + "#";
}

function sub04_5(){
	location.href = root + "event" + exe + "?p.pP=bl&p.pBID=1f0e3dad99908345f7439f8ffabdffc4";
}

function sub04_6(){
	location.href = root + "event_6" + exe;
}




//  문화/생활 //

function sub05_1(){
	location.href = root + "living_1" + exe;
}

function sub05_2(){
	location.href = root + "living_2_1_1" + exe;
}

function sub05_3(){
	location.href = root + "living_3_1" + exe;
}

function sub05_4(){
	location.href = root + "living_4_1" + exe;
}




// 대덕R&D특구 //

function sub06_1(){
	location.href = root + "rnd_1_1" + exe;
}

function sub06_2(){
	location.href = root + "rnd_2_1" + exe;
}

function sub06_3(){
	location.href = root + "rnd_3_1" + exe;
}

function sub06_4(){
	location.href = root + "rnd_4_1" + exe;
}

function sub06_5(){
	location.href = root + "rnd_5" + exe;
}

function sub06_6(){
 window.open("/kor/innomap","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=1000,height=638,left=20,top=20"); 
}




// 대덕특구본부 //

function sub07_1(){
	location.href = root + "Introducing_2_1" + exe;
}

function sub07_2(){
	location.href = root + "Introducing_2_1" + exe;
}

function sub07_3(){
	location.href = root + "Introducing_3_1" + exe;
}

function sub07_4(){
	location.href = root + "Introducing" + exe + "?p.pP=bl&p.pBID=3c59dc048e8850243be8079a5c74d079";
}

function sub07_5(){
	location.href = root + "Introducing" + exe + "?p.pP=bl&p.pBID=98f13708210194c475687be6106a3b84";
}

function sub07_6(){
	location.href = root + "/kor/07_Introducing/07_Introducing_sub6.jsp";
}



//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


// 하단 메뉴 보임 / 숨김
function footerShow(num){
	if(num == "1"){
		document.getElementById('footer_open').style.display = "none";
		document.getElementById('footer_close').style.display = "block";
	}else{
		document.getElementById('footer_open').style.display = "block";
		document.getElementById('footer_close').style.display = "none";			
	}
}

// 경영공시
function announce(){
 window.open("/kor/public_n/01_general/01_general.jsp","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=900,height=700,left=20,top=20"); 
} 

// e클린신고
function eClean(){
 window.open("/kor/public/statement_sub1_1.jsp","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=920,height=700,left=20,top=20"); 
} 

// e신문고
function eReport(){
 window.open("/kor/public/statement_sub2_1.jsp","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=920,height=700,left=20,top=20"); 
} 

// 특구맵 링크	
function ddMap()
{
 window.open("/kor/innomap","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=1000,height=638,left=20,top=20"); 
} 

// 새창
function goWindowOpen(url){
	if(url == ""){
		alert("선택해주십시요.");
	}else{
		window.open(url);
	}
}

// 대덕R&D특구 > 특구관리체계 > 법령체계법령
function statute1(){
 window.open("http://minwon.ddinnopolis.or.kr/ServiceSVL?svc=law.userview&sn=1","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=720,height=600,left=20,top=20"); 
} 
function statute2(){
 window.open("http://minwon.ddinnopolis.or.kr/ServiceSVL?svc=law.userview&sn=2","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=720,height=600,left=20,top=20"); 
} 
function statute3(){
 window.open("http://minwon.ddinnopolis.or.kr/ServiceSVL?svc=law.userview&sn=3","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=720,height=600,left=20,top=20"); 
} 
function statute4(){
 window.open("http://minwon.ddinnopolis.or.kr/ServiceSVL?svc=law.userview&sn=4","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=720,height=600,left=20,top=20"); 
} 
function statute5(){
 window.open("http://minwon.ddinnopolis.or.kr/ServiceSVL?svc=law.userview&sn=5","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=720,height=600,left=20,top=20"); 
} 
function statute6(){
 window.open("http://minwon.ddinnopolis.or.kr/ServiceSVL?svc=law.userview&sn=6","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=720,height=600,left=20,top=20"); 
} 
function statute7(){
 window.open("http://minwon.ddinnopolis.or.kr/ServiceSVL?svc=law.userview&sn=7","new", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=720,height=600,left=20,top=20"); 
} 

// 대덕특구본부 > 본부소개 > 회의실 이용안내 tabmenu
// 참고사항 : 엘리먼트의 id를 접근할때 IE에서는 name_1.style 로 접근해도 접근이 되지만 
//          파이어폭스에선 getElementById 메소드를 써줘야 접근한다.
function news(num) {
	if ( num == "1" ) {
		document.getElementById('news_1').style.display = 'block';
		document.getElementById('news_2').style.display = 'none';
		document.getElementById('news_3').style.display = 'none';
		document.getElementById('news_4').style.display = 'none';
		document.getElementById('news_5').style.display = 'none';
	} else if ( num == "2" ) {
		document.getElementById('news_1').style.display = 'none';
		document.getElementById('news_2').style.display = 'block';
		document.getElementById('news_3').style.display = 'none';
		document.getElementById('news_4').style.display = 'none';
		document.getElementById('news_5').style.display = 'none';
	} else if ( num == "3" ) {
		document.getElementById('news_1').style.display = 'none';
		document.getElementById('news_2').style.display = 'none';
		document.getElementById('news_3').style.display = 'block';
		document.getElementById('news_4').style.display = 'none';
		document.getElementById('news_5').style.display = 'none';
	} else if ( num == "4" ) {
		document.getElementById('news_1').style.display = 'none';
		document.getElementById('news_2').style.display = 'none';
		document.getElementById('news_3').style.display = 'none';
		document.getElementById('news_4').style.display = 'block';
		document.getElementById('news_5').style.display = 'none';
	} else if ( num == "5" ) {
		document.getElementById('news_1').style.display = 'none';
		document.getElementById('news_2').style.display = 'none';
		document.getElementById('news_3').style.display = 'none';
		document.getElementById('news_4').style.display = 'none';
		document.getElementById('news_5').style.display = 'block';
		} 
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// content print
function conprint(){
 window.print(); 
} 

// 함수 : 문자열 치환
String.prototype.replaceAll = function( searchStr, replaceStr ){
	var temp = this;
	while( temp.indexOf( searchStr ) != -1 ){
		temp = temp.replace( searchStr, replaceStr );
	}
		return temp;
}

// 함수 : 이메일 인증 레이어 보임
function show_pic2(email,rand) {
		document.getElementById("Layer3").style.display	= "";
		var email = email;
		email = email.replaceAll("Δ","a");email = email.replaceAll("Ε","b");email = email.replaceAll("Θ","c");email = email.replaceAll("Ξ","d");
		email = email.replaceAll("φ","e");email = email.replaceAll("ψ","f");email = email.replaceAll("χ","g");email = email.replaceAll("σ","h");
		email = email.replaceAll("ξ","i");email = email.replaceAll("τ","j");email = email.replaceAll("π","k");email = email.replaceAll("∇","l");
		email = email.replaceAll("Ω","m");email = email.replaceAll("γ","n");email = email.replaceAll("÷","o");email = email.replaceAll("γ","p");
		email = email.replaceAll("∮","q");email = email.replaceAll("∀","r");email = email.replaceAll("⇔","s");email = email.replaceAll("∩","t");
		email = email.replaceAll("∪","u");email = email.replaceAll("∋","v");email = email.replaceAll("∃","w");email = email.replaceAll("∫","x");
		email = email.replaceAll("∬","y");email = email.replaceAll("∈","z");email = email.replaceAll("≒","@");
		document.getElementById("email").value = email;
		document.getElementById("rand1").value = rand;
}

// 함수 : 이메일 인증번호 체크
function ch_email(){
	if(document.getElementById("rand1").value == document.getElementById("rand2").value){
		document.getElementById("msg").innerHTML = "<font size='3' color=000000><b><a href=mailto:"+document.getElementById("email").value+">"+document.getElementById("email").value+"</a></font>";
	}else{
		alert("숫자가 일치하지 않습니다");
	}
}

// 함수 : 이메일 인증 레이어 닫기
function close(){
	document.getElementById("email").value		= "";
	document.getElementById("rand2").value		= "";
	document.getElementById("msg").innerHTML	= "";
	document.getElementById("Layer3").style.display	= "none";
}