var layerRef='document.all';
var	styleRef='.style.';

function toggleLayer(lname)	
{
	var cnt = document.cnt.tcnt.value;
	var	layerName =	"opinion"+lname;

	if (document.all["opinion"+lname].style.display	== "none") {
		showLayer(layerName);
	} else if (document.all["opinion"+lname].style.display == "block") {
		hideLayer(layerName);
	}
			
			for(i=0; i<cnt; i++)
			{
				if (lname != i) {
				hideLayer("opinion"+i);
				}
			}				
				
}

function showLayer(lname) {
		eval(layerRef+'["'+lname+'"]'+styleRef+'display="block"');
}

function hideLayer(lname) {
		eval(layerRef+'["'+lname+'"]'+styleRef+'display="none"');
}

/*-------------------------------------------------------------------------------------
//¶ó¿îµù »ç¶÷µî·Ï
--------------------------------------------------------------------------------------*/
function peopleadd(obj) {
		
		var people = opener.document.form1.people.value;
		opener.document.form1.people.value = people +obj+ ";"
}


/*-------------------------------------------------------------------------------------
//ÆË¾÷Ã¢ °¡¿îµ¥·Î ¶ç¿ì±â 
--------------------------------------------------------------------------------------*/
var win_center = null;
function winopen_center(mypage,myname,w,h,h1,scroll)
{
			
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	
		if (h1 == ""){
			TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		}
		else{
			TopPosition = (screen.height) ? ((screen.height-h)/2)-h1 : 0;
		}
	
		settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no,menubars=no'
		
		if (win_center == null){
			win_center = window.open(mypage,myname,settings);
		}
		else{
	
//			win_center.close();
			win_center = window.open(mypage,myname,settings);	
		}

		if (win_center == null) { 
			alert(" ¡Ø À©µµ¿ì XP SP2 ¶Ç´Â ÀÎÅÍ³Ý ÀÍ½ºÇÃ·Î·¯ 7 »ç¿ëÀÚÀÏ °æ¿ì¿¡´Â \n    È­¸é »ó´Ü¿¡ ÀÖ´Â ÆË¾÷ Â÷´Ü ¾Ë¸²ÁÙÀ» Å¬¸¯ÇÏ¿© ÆË¾÷À» Çã¿ëÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù. \n\n¡Ø MSN,¾ßÈÄ,±¸±Û ÆË¾÷ Â÷´Ü Åø¹Ù°¡ ¼³Ä¡µÈ °æ¿ì ÆË¾÷Çã¿ëÀ» ÇØÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
        }
				
}


//==================================================================
// ÀÏ¹ÝÇÃ·¡½Ã
// swfView( °¡·Î, ¼¼·Î, °æ·Î, transparent¸ðµå(Y : »ç¿ë / N : »ç¿ë¾ÈÇÔ) )
//==================================================================
function swfView(width, height, url, transparent){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write("		codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' ");
	document.write("		width='"+width+"' height='"+height+"'>");
	document.write("	<param name='movie' value='"+url+"' /> ");
	document.write("	<param name='quality' value='high' /> ");
	document.write("	<param name='menu' value='false' /> ");
	if (transparent == "Y")
		document.write("	<param name='wmode' value='transparent'> ");
	document.write("	<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' ");
	document.write("		type='application/x-shockwave-flash' ");
	document.write("		pluginspage='https://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

//==================================================================
// ÆÄ¶ó¸ÞÅ¸(¸Þ´º) ÀÖ´Â ÇÃ·¡½Ã
//==================================================================
function swfViewMenu(width, height, url, menunum){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write("		codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' ");
	document.write("		width='"+width+"' height='"+height+"'>");
	document.write("	<param name='movie' value='"+url+"' /> ");
	document.write("	<param name='quality' value='high' /> ");
	document.write("	<param name='wmode' value='transparent'> ");
	document.write("	<param name='menu' value='false' /> ");
	if (menunum != "")
		document.write("	<param name='flashvars' value='menunum="+ menunum +"'> ");
	document.write("	<embed src='"+url+"' quality='high' width='"+width+"' height='"+height+"' ");
	document.write("		type='application/x-shockwave-flash' ");
	document.write("		pluginspage='https://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}

function cutLeft(str, n) {
	if (n <= 0) {
	   return "";
	} else if (n > String(str).length) {
	   return str;
	} else {
	   return String(str).substring(0,n);
	}
}

function cutRight(str, n) {
	if (n <= 0) {
		return "";
	} else if (n > String(str).length) {
		return str;
	} else {
		var iLen = String(str).length;
		return String(str).substring(iLen, iLen - n);
	}
}

function trim(value) {
	return value.replace(/^\s+|\s+$/g,"");
}

function ltrim(value) {
	return value.replace(/^\s+/,"");
}

function rtrim(value) {
	return value.replace(/\s+$/,"");
}

var stmnLEFT = 1000;
var stmnGAP1 = 0;
var stmnGAP2 = 140;				// ½ºÅ©·Ñ½Ã ºê¶ó¿ìÀú »ó´Ü°ú ¾à°£ ¶ç¿ò. ÇÊ¿ä¾øÀ¸¸é 0À¸·Î Á¶Á¤ÇÏ¼¼¿ä
var stmnBASE = 140;				// ½ºÅ©·Ñ¸Þ´º ÃÊ±â ½ÃÀÛÀ§Ä¡ 
var stmnActivateSpeed = 200;	// ¿òÁ÷ÀÓÀ» °¨ÁöÇÏ´Â ¼Óµµ (¼ýÀÚ°¡ Å¬¼ö·Ï ´À¸®´Ù)
var stmnScrollSpeed = 10;		// ½ºÅ©·ÑµÇ´Â ¼Óµµ (Å¬¼ö·Ï ´À¸²)
var stmnTimer;
function RefreshStaticMenu() {
	var stmnStartPoint, stmnEndPoint, stmnRefreshTimer;
	stmnStartPoint = parseInt(STATICMENU.style.top, 10);
	stmnEndPoint = document.body.scrollTop + stmnGAP2;
	if (stmnEndPoint < stmnGAP1) stmnEndPoint = stmnGAP1;
	stmnRefreshTimer = stmnActivateSpeed;

	if ( stmnStartPoint != stmnEndPoint ) {
		stmnScrollAmount = Math.ceil( Math.abs( stmnEndPoint - stmnStartPoint ) / 15 );
		STATICMENU.style.top = parseInt(STATICMENU.style.top, 10) + ( ( stmnEndPoint<stmnStartPoint ) ? -stmnScrollAmount : stmnScrollAmount );
		stmnRefreshTimer = stmnScrollSpeed;
	}
	stmnTimer = setTimeout ("RefreshStaticMenu();", stmnRefreshTimer);
}
function InitializeStaticMenu() {
	STATICMENU.style.left = stmnLEFT;
	STATICMENU.style.top = document.body.scrollTop + stmnBASE;
	RefreshStaticMenu();
}

function goTopFocus() {
	document.getElementById('divMenu').focus();
}

function movPlay(strCode) {
	winopen_center('/qiCommon/popPlayer.asp?strCode=' + strCode, 'popPalyer', 500,430, '', 'N');
}
/*
function clickIE4(){
	if (event.button==2){
		return false;
	}
}

function clickNS4(e){
	if (document.layers||document.getElementById&&!document.all){
		if (e.which==2||e.which==3){
			return false;
		}
	}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown = clickNS4;
} else if (document.all && !document.getElementById) {
	document.onmousedown = clickIE4;
}
document.oncontextmenu = new Function("return false")
document.ondragstart = new Function("return false")

function disableselect(e) {
	return false 
}

function reEnable() {
	return true 
}
document.onselectstart = new Function("return false") 
if (window.sidebar) {
	document.onmousedown = disableselect 
	document.onclick = reEnable 
}
*/
