// 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 ;
}


function show(url,_width,_height) 
{ 
         if(window.clientInformation.userAgent.indexOf("SV1")>0){        

newWin = window.open(url,"","toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no width=1024 height=768 top=0 left=0");
            newWin.moveTo(0,0);
            left1=(screen.availWidth-1024-5)/2;          
            top1=(screen.availHeight-768-10)/2; 
               newWin.resizeTo(1024,768);
                newWin.moveTo(left1,top1);

    }else{
            if(screen.width==_width&&screen.height==_height) { 
                window.open(url,"","fullscreen"); 
              } else { 
            left1=(screen.availWidth-1024-5)/2; 
            top1=(screen.availHeight-768-10)/2;       
            window.open(url,"","toolbar=no location=no directories=no status=no menubar=no scrollbars=no resizable=no width=1024 height=768 top="+top1+" left="+left1); 
              }
        }
}

