
// flashWrite(path, width, height, id, backgroundcolor, vars)
function flashWrite(url,w,h,id,bg,vars){
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always'>"+
	"<param name='movie' value='"+url+"'>"+
	"<param name='FlashVars' value='"+vars+"'>"+
	"<param name='menu' value='false'>"+
	"<param name='quality' value='high'>"+
	//"<param name='bgcolor' value='"+bg+"'>"+
	"<param name='wmode' value='transparent'>"+
	"<embed src='"+url+"' FlashVars='"+vars+"' menu='false' quality='high' wmode='transparent' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>"+
	"</object>";
	document.write(flashStr);
}


//bbs1
function bbs1(num) {
	var d=document;
	for ( i=1 ; d.getElementById("bbs1"+i+"_tab") ; i++ ) {
		var dtab=d.getElementById("bbs1"+i+"_tab"),dlist=d.getElementById("bbs1"+i+"_list");
		if ( i == num ) {
			dtab.parentNode.className='on';
			if ( dlist!=null ) dlist.style.left="5px";
		} else {
			dtab.parentNode.className='off';
			if ( dlist!=null ) dlist.style.left="-3000px";
		}
	}
}


//bbs2
function bbs2(num) {
	var d=document;
	for ( i=1 ; d.getElementById("bbs2"+i+"_tab") ; i++ ) {
		var dtab=d.getElementById("bbs2"+i+"_tab"),dlist=d.getElementById("bbs2"+i+"_list");
		if ( i == num ) {
			dtab.parentNode.className='on';
			if ( dlist!=null ) dlist.style.left="5px";
		} else {
			dtab.parentNode.className='off';
			if ( dlist!=null ) dlist.style.left="-3000px";
		}
	}
}


//popupzone
function popupzone(num) {
	var d=document;
	for ( i=1 ; d.getElementById("popupzone_btn_0"+i) ; i++ ) {
		var dimg=d.getElementById("popupzone_img_0"+i),dsub=d.getElementById("popupzone_btn_0"+i);
		if ( i == num ) {
			dsub.src='../images/main/popupzone_btn_on_0'+i+'.gif';
			if ( dimg!=null ) dimg.style.left="10px";
		} else {
			dsub.src='../images/main/popupzone_btn_off_0'+i+'.gif';
			if ( dimg!=null ) dimg.style.left="-3000px";
		}
	}
}


//mov
function mov(num) {
	var d=document;
	for ( i=1 ; d.getElementById("mov_btn_0"+i) ; i++ ) {
		var dbtn=d.getElementById("mov_btn_0"+i),dimg=d.getElementById("mov_img_0"+i);
		if ( i == num ) {
			if ( dbtn!=null ) dbtn.style.display="none";
			if ( dimg!=null ) dimg.style.display="block";
		} else {
			if ( dbtn!=null ) dbtn.style.display="block";
			if ( dimg!=null ) dimg.style.display="none";
		}
	}
}


//poll
function poll(num) {
	var d=document;
	for ( i=1 ; d.getElementById("poll"+i+"_tab") ; i++ ) {
		var dimg=d.getElementById("poll"+i+"_tab"),dlist=d.getElementById("poll"+i+"_list");
		if ( i == num ) {
			dimg.src='../images/main/poll_tab'+ i +'_on.gif';
			if ( dlist!=null ) dlist.style.left="5px";
		} else {
			dimg.src='../images/main/poll_tab'+ i +'_off.gif';
			if ( dlist!=null ) dlist.style.left="-3000px";
		}
	}
}


//edu
function edu(num) {
	var d=document;
	for ( i=1 ; d.getElementById("edu"+i+"_tab") ; i++ ) {
		var dtab=d.getElementById("edu"+i+"_tab"),dlist=d.getElementById("edu"+i+"_list");
		if ( i == num ) {
			dtab.parentNode.className='on';
			if ( dlist!=null ) dlist.style.left="5px";
		} else {
			dtab.parentNode.className='off';
			if ( dlist!=null ) dlist.style.left="-3000px";
		}
	}
}


//info
function info(num) {
	var d=document;
	for ( i=1 ; d.getElementById("info"+i+"_tab") ; i++ ) {
		var dtab=d.getElementById("info"+i+"_tab"),dlist=d.getElementById("info"+i+"_list");
		if ( i == num ) {
			dtab.parentNode.className='on';
			if ( dlist!=null ) dlist.style.left="5px";
		} else {
			dtab.parentNode.className='off';
			if ( dlist!=null ) dlist.style.left="-3000px";
		}
	}
}

/** rollover **/
function rollover_off() { //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 rollover_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;
}

function rollover_on() { //v3.0
  var i,j=0,x,a=rollover_on.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  if ((x=rollover_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
