
// flashWrite(파일경로, 가로, 세로, 아이디, 배경색, 변수)
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='wmode' value='transparent' />"+
    "<embed src='"+url+"' FlashVars='"+vars+"' wmode='transparent' menu='false' quality='high' width='"+w+"' height='"+h+"' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
    "</object>";

 

    // 플래시 코드 출력
    document.write(flashStr);

 

}



function LogoutConfirm() {
	if(confirm('로그아웃 하시겠습니까?')==1) {
		location.href="../green_board/member/logout.php?return_url1=<?=urlencode($_SERVER['PHP_SELF'])?>&return_url2=<?=urlencode($_SERVER['QUERY_STRING'])?>";
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


	/**** 프린트 페이지 ****/
	/**** frame ID로 PrintTempArea가 있어야 하며 DIV ID로 PrintArea를 지정해야 함 **/
	function PrintPage(){
		PA = document.getElementById("PrintArea");
		PTA = document.frames("PrintTempArea").document;

		PTA.open();
		PTA.writeln("<html><head><title>.....</title><meta http-equiv='Content-Type' content='text/html; charset=utf-8'></head><body ><link href=/font.css rel=stylesheet type=text/css>"); //스타일등을 지정
		PTA.writeln("<table width=670 align=center><tr><td>"); // 본문 출력
		PTA.writeln(PA.innerHTML); // 본문 출력
		PTA.writeln("</td></tr></table></body></html>");
		PTA.close();
		PTA.execCommand('Print');
	}





  
  
  // 미디어 플레이어 볼륨 제어
var nVolLeftPosition = 0;							// 볼륨 바 배경 시작점
		var nVolStartPosition = 0;							// 볼륨 바 시작 점
		var nVolEndPosition = 86;							// 볼륨 바 끝 점
		var nVolume = 75;									// 볼륨 초기 값
		var nPrevVol;										// 볼륨이 변경되기 전의 값
		var bIsVolumeSet		= false;						// 볼륨바 드래그 여부
		var nZoomed			= 0;							// 기본값 1 : 줌됨,   0 : 축소됨

		function killErr(){return true;}

		function setVolumeBar(){
			nPrevVol = event.clientX;
			nVolLeftPosition = sound.style.pixelLeft;

			bIsVolumeSet = true;
			document.onmousemove=drag_dropie;
			if (document.all){document.onmouseup=endVolume;}
		}

		function drag_dropie(){
			if (bIsVolumeSet==true){
				var mov = nVolLeftPosition+event.clientX-nPrevVol;
				if ((mov >= nVolStartPosition)  && (mov < nVolEndPosition)){
					cutpoint=nVolEndPosition-sound.style.pixelLeft;
					document.all.soundbg.style.pixelWidth=58-cutpoint;
					//document.all.sbg.width = 58-cutpoint;
					sound.style.pixelLeft=nVolLeftPosition+event.clientX-nPrevVol;
					mplayer.Volume = -2500*(cutpoint/56);
					nVolume=sound.style.pixelLeft
					nVolume1=document.all.sbg.width;
					mplayer.Mute=false;
				}
				return false;
			}
		}

		function endVolume(){
			bIsVolumeSet=false;
		}

		function ris(name, nsdoc)
		{
			var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
			if (name == '') return;
			if (img && img.altsrc) {
				img.src    = img.altsrc;
				img.altsrc = null;
			}
		}

		function cis(name, nsdoc, rpath, preload)
		{ 
			var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
			if (name == '')	return;
			if (img) {
				img.altsrc = img.src;
				img.src    = rpath;
			}
		}


function view(what) { 
var imgwin = window.open("",'WIN','scrollbars=yes,status=no,toolbar=no,resizable=no,location=no,menu=no,left=425, top=0,width=10,height=10'); 
imgwin.focus(); 
imgwin.document.open(); 
imgwin.document.write("<html>\n"); 
imgwin.document.write("<head>\n"); 
imgwin.document.write("<title>:::::: Zoom :::::</title>\n"); 
imgwin.document.write("<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>\n"); 

imgwin.document.write("<sc"+"ript>\n"); 
imgwin.document.write("function resize() {\n"); 
imgwin.document.write("pic = document.il;\n"); 
//imgwin.document.write("alert(eval(pic).height);\n"); 
imgwin.document.write("if (eval(pic).height) { var name = navigator.appName\n"); 
imgwin.document.write("  if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 40; myWidth = eval(pic).width + 30;\n"); 
imgwin.document.write("  } else { myHeight = eval(pic).height + 40; myWidth = eval(pic).width; }\n"); 
imgwin.document.write("  clearTimeout();\n"); 
imgwin.document.write("  var height = screen.height;\n"); 
imgwin.document.write("  var width = screen.width;\n"); 
imgwin.document.write("  var leftpos = width / 2 - myWidth / 2;\n"); 
imgwin.document.write("  var toppos = 0; \n"); 
imgwin.document.write("  self.moveTo(leftpos, toppos);\n"); 
imgwin.document.write("  self.resizeTo(myWidth, myHeight);\n"); 
imgwin.document.write("}else setTimeOut(resize(), 100);}\n"); 
imgwin.document.write("</sc"+"ript>\n"); 

imgwin.document.write("</head>\n"); 
imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0"  bgcolor="#FFFFFF" onload="resize();">\n'); 
imgwin.document.write('<a href="javascript:window.close()">\n'); 
imgwin.document.write("<img border=0 src="+what+" xwidth=100 xheight=9 name=il onload='resize();'>\n"); 
imgwin.document.write('</a>\n'); 
imgwin.document.write("</body>\n"); 
imgwin.document.close(); 

} 


