///////////////////////////////////////////////////
//ÀÌ¹ÌÁö È­ÀÏ º¸ÀÌ±â
///////////////////////////////////////////////////
function file_show(file_name){
		url = "/common/file_show/file_show.asp?file_name="+file_name
		var opt = "toolbar=no,resizable=no,scrollbars=yes, location=no,resize=no,menubar=no,directories=no,copyhistory=0,width=300,height=250,top= 0,left = 0"; 	
		open(url,"file_show1",opt);
}


///////////////////////////////////////////////////
// ÀÏ¹ÝÇÃ·¡½Ã
// swfView( °¡·Î, ¼¼·Î, °æ·Î, transparent¸ðµå(Y : »ç¿ë / N : »ç¿ë¾ÈÇÔ) )
///////////////////////////////////////////////////
function swfView(width, height, url, transparent){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
	document.write("		codebase='http://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' /> ");
	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='http://www.macromedia.com/go/getflashplayer' />");
	document.write("</object>");
}



///////////////////////////////////////////////////
// SeeVideo 
///////////////////////////////////////////////////
function seevideoView(server_IP, MediaID, ticket){

	document.write("<OBJECT ID='Fermatedu_VOD' width='640' height='547' CLASSID='CLSID:68253470-5d4f-4cdf-8d9c-353c14a2f013' CODEBASE='http://www.seevideo.co.kr/pub/seevideo2003/SVPorsche.cab#Version=2,5,24,181'>")
	document.write("<PARAM NAME='ServerIP' VALUE='"+ server_IP +"'>")
	document.write("<PARAM NAME='MediaItem' VALUE='"+MediaID +"'>")
	document.write("<PARAM NAME='Level' VALUE='5'>")
	document.write("<PARAM NAME='TicketUUID' VALUE='"+ ticket +"'>")
	document.write("<PARAM NAME='Method' VALUE='1'>")
	document.write("<PARAM NAME='PortNum' VALUE='5400'>")
	document.write("<PARAM NAME='AutoPlay' VALUE='1'>")
	document.write("</OBJECT>")

}



///////////////////////////////////////////////////
///Top ÇÃ·¡½¬ ¸Þ´º ¸µÅ© 
///////////////////////////////////////////////////
function topNavi(m1,m2){
	switch (m1)	{
		case "1":
			document.location.href="/company/com_greeting.asp?main=1&sub=1&mtitle=N&K marine&stitle=´ëÇ¥ÀÌ»ç ÀÎ»ñ¸»"
			break;		
		case "2":
			//document.location.href="/product/sub.asp?code=01030000&PageNum=2"
			document.location.href="/sub_p/sub0103.asp?code=01030000&PageNum=2"
			break;		
		case "3":
			//document.location.href="/product/sub.asp?code=01010000&PageNum=3"
			document.location.href="/sub_p/sub0101.asp?code=01010000&PageNum=3"
			break;		
		case "4":
			//document.location.href="/product/sub.asp?code=01020000&PageNum=4"
			document.location.href="/sub_p/sub0102.asp?code=01020000&PageNum=4"
			break;		
		case "5":
			//document.location.href="/product/sub.asp?code=01040000&PageNum=5"
			document.location.href="/sub_p/sub0104.asp?code=01040000&PageNum=5"
			break;		
		case "6":
			document.location.href="/board/list.asp?code=board5&main=1&sub=1&mtitle=ÀÚ·á½Ç&stitle=º¸Æ®"
			break;		
		case "7":
			window.open("http://www.yamaha-motor.jp")
			break;		
	}

	
	
}

//********************************************
// ¾ÆÀÌÇÁ·¹ÀÓ »çÀÌÁî ÀÚµ¿ Á¶Àý
//********************************************
function resizeFrame(iframeObj){
		var innerBody = iframeObj.contentWindow.document.body;
		oldEvent = innerBody.onclick;
		innerBody.onclick = function(){ resizeFrame(iframeObj, 1);oldEvent; };
		var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
		iframeObj.style.height = innerHeight;
		var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
		iframeObj.style.width = innerWidth;     
		if( !arguments[1] )        /* Æ¯Á¤ ÀÌº¥Æ®·Î ÀÎÇÑ È£Ãâ½Ã ½ºÅ©·ÑÀ» ±×³É µÐ´Ù. */
				this.scrollTo(1,1);		
}

/*-------------------------------------------------------------------------------------
ÀÌ¹ÌÁö Ã¼Å©
--------------------------------------------------------------------------------------*/
function checkImgFormat(imgPath)
	{
		tmpArr = imgPath.split(".")
		exeKind = tmpArr[tmpArr.length - 1].toLowerCase()
        if ( exeKind == "jpg" || 
			 exeKind == "gif" || 
			 exeKind == "pdf" || 
			 exeKind == "png" || 
			 exeKind == "bmp" || 
			 exeKind == "wav" || 
			 exeKind == "avi" || 
			 exeKind == "asf" || 
			 exeKind == "wmv" || 
			 exeKind == "mpg" || 
			 exeKind == "swf" || 
			 exeKind == "zip" || 
			 exeKind == "mpeg" )
        {
            document.frm.img_file.value="YesImg"

        }else{
			//document.form1.img_file.value="YesImg"
			document.frm.img_file.value="NotImg"
            if ( imgPath != "" ){
				alert("Áö¿øÇÏÁö ¾Ê´Â ÆÄÀÏÀÔ´Ï´Ù.");
			}
        }
	}
	
/*-------------------------------------------------------------------------------------
 °Ô½ÃÆÇ ÆÄÀÏ Ãß°¡
--------------------------------------------------------------------------------------*/
var uf = ''; 
function sw_file_add(size, ext) 
{ 
	if(document.frm.file_count.value<9) { 
		//document.form1.file_count.value  = Number(document.form1.file_count.value)   +  1
		eval('sw_file_add_form' + uf).innerHTML += "<input type=file name=p_image " + size + " " + ext + "  onpropertychange=checkImgFormat(this.value);><div id='sw_file_add_form" + (uf+1) + "'></div>"; 
		uf++; 
		document.frm.file_count.value = uf+1
	}
	else {
		alert("ÀÌ¹ÌÁö´Â 9°³±îÁö¸¸ µî·Ï °¡´ÉÇÕ´Ï´Ù.")
	}
}

//********************************************
// ¼ýÀÚ Ã¼Å©
//ÁÖ¹Îµî·Ï¹øÈ£µî ¼ýÀÚ¸¸ ÀÔ·ÂÇÏ°ÔÇÏ´Â ÇÔ¼ö(¹é½ºÆäÀÌ½º:8,ÅÇ:9,¿ÞÈ­»ì:37,¿À¸¥È­»ì:39,Del:46,¼ýÀÚ:47-57,³Ñ·°¼ýÀÚ:96-105,¸¶ÀÌ³Ê½ººÎÈ£:109/189,Á¡:110/190) -- ¸Ç¾ÕºÎºÐ¿¡¸¸ ¸¶ÀÌ³Ê½º ºÎÈ£°¡ ºÙÀ»¼ö ÀÖµµ·Ï Á¦¾î
//********************************************
function number_check(f){
		
		if((event.keyCode<8)||(event.keyCode>9 && event.keyCode<13)||(event.keyCode>13 && event.keyCode<37)||(event.keyCode>37 && event.keyCode<39)||(event.keyCode>39 && event.keyCode<46)||(event.keyCode>57 && event.keyCode<96)||(event.keyCode>105 && event.keyCode<109)||(event.keyCode>110 && event.keyCode<189)||(event.keyCode>190)){
			event.returnValue=false;			
		}
}

		
