<!--
//// JavaScript Document //////////////////////
// Written by Jungmok Chae, Feb 25, 2004
////////////////////////////////////////////////
function loadPage(obj)
{
	var newWin = window.open(obj.value,'new','');
}

// This brings up the new message window for php contents
function showDBContents(html)
{
	var Mssg = window.open(html, 'msg','width=400, height=400, resizable=no, menubar=no, statusbar=no, scrollbars=yes');
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

// this is a flag variable. It is checking whether the dropdown box is open or not.
var isBoxOpen = false;
var leftOfBox = 0;			// for calculating the left space of the drop box menu

// check the screen size
function checkScreenSize(){

	var isAvailWidth;
	if(document.all)
	{
		isAvailWidth = document.body.offsetWidth - 40;
	}
	else
	{
		isAvailWidth = window.innerWidth - 40;		
	}
	leftOfBox = (isAvailWidth/2) - 240;
}

// When the cursor is over the dropdown box, set isBoxOpen variable as true;
function setBoxOpen(flag){
	isBoxOpen = flag;																							
}

// close menu which is open now after given time is gone
function closeDrpMenu(){
	isBoxOpen = true;
	setTimeout("autoHidingMenu()",3000);
}

// parameter is the duration value
function autoHidingMenu(){
	if(isBoxOpen == true)
	{
		hideMenu('prog','orga');
		isBoxOpen = false;
	}
}

// create it by 
function showMenu(){
	divObj = arguments[0];

	if((a=MM_findObj(divObj))!= null){
		dd = (document.layers)?a:a.style;
		dd.left = leftOfBox;
		dd.visibility="visible";
		isBoxOpen = false;		// set it as false to give time space before close the menu box
	}
}

// hide all menu windows
function hideMenu(){
	args = hideMenu.arguments;

	for(k=0; k<args.length; k++)
	{
		oo = MM_findObj(args[k]);
		o = (document.layers)?oo:oo.style;
		o.visibility = "hidden";
	}
}

//////////////// scrolling message box .Ver 0.1 ////////////////////
//   		Written by Jungmok Chae,   March 04, 2004
/////////////////////////////////////////////////////////////////////
var waitingTime = 50;
var top1 = 0, top2 =100;		// first and second box starting points
var msg = new Array();		// message contents are followings:
msg[0] = "Welcome to CSC Webpage.<br><br> This is the new webpage.<br><Br>";
msg[1] = "It's still under development.<br><br> This will be rotating messge box.<br><br>";

function rollingOver(){
	o1 = MM_findObj('first');   // find div object
	o2 = MM_findObj('second');
	
	oo1 = (document.layers)?o1:o1.style;
	oo2 = (document.layers)?o2:o2.style;
	top1 = parseInt(oo1.top);			// take integer only
	top2 = parseInt(oo2.top);
	
	if (top1 < -100)
		top1 = 100;
	else if (top2 < -100)
		top2 = 100;
	else {
		top1 --;
		top2 --;
	}
	
	oo1.top = top1;
	oo2.top = top2;
	
	setTimeout('rollingOver()',waitingTime);
}

function showContents(){
	divContents = "<div class='msgBox' id='first' style='position:absolute; height:100; width:164; left:3; top:0;'>"+ msg[0]+"</div>";
	divContents += "<div class='msgBox' id='second' style='position:absolute; height:100; width:164; left:3; top:100;'>"+ msg[1]+"</div>";
	document.write(divContents);
	setTimeout('rollingOver()',1000);
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
-->