// JScript source code



//		ÇÃ·¡½¬ ÄÚµå 

function fla(swf_file, swf_width, swf_height, swf_param)

{

	var scnt = cnt_string(swf_param,",") ;

	var split_str = swf_param.split(",") ;



	document.writeln("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+swf_width+"' height='"+swf_height+"' ID='Shockwaveflash1' VIEWASTEXT>") ;

	for (i=0;i<=scnt;i++)

	{

//		alert("<param name='"+split_str[i].split("@")[0]+"' value='"+split_str[i].split("@")[1]+"'>") ;

		document.writeln("<param name='"+split_str[i].split("@")[0]+"' value='"+split_str[i].split("@")[1]+"'>") ;

	}

	document.writeln("<embed src='"+swf_file+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+swf_width+"' height='"+swf_height+"'></embed></object>") ;

}





//		¾ÖÇÃ¸´ ÄÚµå 

function get_applet(apt_codebase, apt_code, apt_arch, apt_width, apt_height, apt_param)

{

	var scnt = cnt_string(apt_param,",") ;

	var split_str = apt_param.split(",") ;



	document.writeln("<applet codebase='"+apt_codebase+"' code='"+apt_code+"' archive='"+apt_arch+"' width='"+apt_width+"' height='"+apt_height+"' name='IpixViewer' viewastext id=Applet1>") ;

	for (i=0;i<=scnt;i++)

	{

//		alert("<param name='"+split_str[i].split("@")[0]+"' value='"+split_str[i].split("@")[1]+"'>") ;

		document.writeln("<param name='"+split_str[i].split("@")[0]+"' value='"+split_str[i].split("@")[1]+"'>") ;

	}

	document.writeln("</applet>") ;

}





//	¹®ÀÚ¿­³»ÀÇ ÄÄ¸¶ ¼ö¸¦ Ã¼Å©ÇÏ´Â ÇÔ¼ö

function cnt_string(ostring, chkstr)

{

	var lngPos = 1 ;

	var lngCount = 0 ;



	do

	{

		lngPos = ostring.indexOf(chkstr) ;



		if (lngPos>0)

		{

         lngCount = lngCount + 1 ;

         ostring = ostring.substring(lngPos+chkstr.length, ostring.length) ;

		}

	}

	while (lngPos>0)



	return lngCount ;

}
