/****************************************************************************
'-- 
'-- Java script 
'---------------------------------------------------------------------------
'-- ۼ : 2007/10/25
'-- ۼ : Ӱ(kaeun@sol-itech.com)
'****************************************************************************/

/*1.******************************** ÷  ũƮ ***************************/
function ActiveX(objects){
	var objects = document.getElementById(objects);
	if(navigator.appName == "Microsoft Internet Explorer"){
		document.write(objects.text);
		objects.id = "";
	}
}
/******************************** ÷  ũƮ ***************************/


/*2.******************************** IMAGE_ROLLOVER ũƮ ***************************/
function menuOn(imgEl)
{
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}

function menuOut(imgEl)
{
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}
function menuOnjpg(imgEl)
{
	imgEl.src = imgEl.src.replace(".jpg", "_on.jpg");
}

function menuOut(imgEl)
{
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}
function menuOutjpg(imgEl)
{
	imgEl.src = imgEl.src.replace("_on.jpg", ".jpg");
}
/********************************* IMAGE_ROLLOVER ũƮ ***************************/

/********************************* moving banner ũƮ ***************************/
function Move_Banner(obj,t_position){
	var	speed = 25; 
	document.getElementById(obj).style.top = parseInt(document.getElementById(obj).style.top)+((document.body.scrollTop+t_position)-parseInt(document.getElementById(obj).style.top))/speed;
}
/********************************* moving banner ũƮ// ***************************/

/********************************* png̹ ó ũƮ ***************************/
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 ''; 
}
/********************************* png̹ ó ũƮ// ***************************/

/***********************  ˾  **************************/
function resize_pop(){
	w = document.getElementById('table').clientWidth;
	h = document.getElementById('table').clientHeight;
	resizeTo(w+10,h+55);
}
/***********************  ˾ // **************************/


/***********************  ˾ **************************/
function getCookie(name) {
   var prefix = name + "=";
   var cookieStartIndex = document.cookie.indexOf(prefix);
   if(cookieStartIndex == -1)
	  return null;
   var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
   if(cookieEndIndex == -1)
	  cookieEndIndex = document.cookie.length;
   return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}


function pop_open(p_src,pname)
{
	window.open(p_src, pname, 'toolbar=no, scrollbars=no, menubars=no, width=100, height=100, left=0, top=0');
	return;
}
/***********************  ˾// **************************/


function flash_position(){
	try{
		var body_obj = document.body;
		var cont_obj = document.getElementById('content');
		var flash_obj = document.getElementById('back_flash');
		var foot_obj = document.getElementById('foot');
		if ( body_obj.clientHeight <= cont_obj.clientHeight ){
			flash_obj.height = cont_obj.clientHeight;
			foot_obj.style.top = (cont_obj.clientHeight - foot_obj.clientHeight);
		}else{
			flash_obj.height = "100%";
			foot_obj.style.top = (document.body.clientHeight - foot_obj.clientHeight);
		}
	}catch(e){
	
	}
	
}

function playnstop(playstate){
	if(playstate == 1){
		document.getElementById('mplayer').stop();
	}else{
		document.getElementById('mplayer').play();
	}
	
}

state = true;
function setMute(){
if(state){
 mplayer.mute = true;
 document.getElementById('btn_mute').src = "/images/support/sound_dim.gif";
 }else{
 mplayer.mute = false;
 document.getElementById('btn_mute').src = "/images/support/sound.gif";
 }
 state = state ? false : true;	 
}

function movie_full(obj){
	document.getElementById(obj).displaySize = 3;
}


window.onload = function(){
	flash_position();
	try{
		rolling_list();
	}catch(e){
	
	}
	
}
window.onresize = function(){
	flash_position();
}


/***********************  Ʈڽ **************************/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function open_url_sea1()
{
	var n = document.gosite.sea1.selectedIndex;
	var selval;

	selval = document.gosite.sea1.options[n].value;

	if (selval == "no") {
		alert("Ȯ  ּ");
		return false;
	}

	window.open(document.gosite.sea1.options[n].value,"","");
}

function open_url_sea2()
{
	var n = document.gosite2.sea2.selectedIndex;
	var selval;

	selval = document.gosite2.sea2.options[n].value;

	if (selval == "no") {
		alert("Ȯ  ּ");
		return false;
	}

	window.open(document.gosite2.sea2.options[n].value,"","");
}
/***********************  ķ۽ȳ ڼ **************************/
function detail_view() { window.open('../wsu_map/wsu_map.html','wsu','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1024,height=720,top=0,left=0');
}
function detail_view2() { window.open('http://www.wsu.ac.kr/space/notice/07data/070823_01.html','wsu','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1107,height=810,top=0,left=0');
}
// > ϴ / Ȱ ġȳ
/************************ ķ۽ ȯ ********************************/
function cam_bus() { window.open('./cam_bus.html','wsu','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=1014,height=606,top=0,left=0');
}
/***********************   Ƽ > лȰٹ ױ **************************/
function sel_chg()
{
	var n = document.goalum.alb.selectedIndex;
	var selval;
	selval = document.goalum.alb.options[n].value;
	if (selval == "no") {
		alert("Ȯ  ּ");
		return false;
		}
		location.href=document.goalum.alb.options[n].value;
		}


/***********************  лȰ > /Ȱȳ > ϴ(FAQ) **************************/
function ViewAns(smenuid, si) 
{
	if(eval("document.all." + smenuid + ".style.display == 'none'")) 
	{
		eval("document.all." + smenuid + ".style.display = '';"); 
	} 
	else 
	{
		eval("document.all." + smenuid + ".style.display = 'none';"); 
	}	
}


/***********************  лȰ > лռ > ȳ **************************/
function byungsa() {
 window.open('http://www.mma.go.kr/www_mma3/mmadoumi/doumi_intro.htm','mma','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=850,height=650,top=0,left=0');

}