
<!--
var g_bMyExternal = 0;

function IsMyExternal()
{   
	if( g_bMyExternal ==0 )
	{
		g_bMyExternal = -1;
		
		var userAgent = navigator.userAgent;
				
		if( userAgent.indexOf("MSIE")>=1 )
		{
			if(external.CB_IsOurCustomBrowser != null)
				g_bMyExternal=1;
		}
	}	
  return (g_bMyExternal >0) ;
}
function IsMacHost()
{
	return (navigator.userAgent == "ArcSoft PrintCreations Mac Host" );			
}

function My_GetCurUrPath()
{
	var newUrl =  window.location.href;
	var iPos = newUrl.lastIndexOf( "/" );
	newUrl = newUrl.substring(0,iPos+1 );
	
	return newUrl;
}

function MyMM_openBrWindow(theURL,winName,features) 
{ //v2.0
	if( IsMyExternal() )//PC host
	{
		theURL = My_GetCurUrPath() + theURL;
		external.open(theURL,winName,features);
	}
	else if( IsMacHost() )//mac host
	{
		theURL = My_GetCurUrPath() + theURL;		
		alert("OPEN_WND" + theURL);//mac 上可以截获alert函数
	}
	else//default browser
	{		
		window.open(theURL,winName,features);
	}
}

function DownloadContents( theUrl, N)
{   		
	//alert(theUrl);
	if( IsMyExternal() )//pc host
	{	
		//theUrl = My_GetCurUrPath() + theUrl;
		if( theUrl.indexOf("http:")>=0 )
		{
			theUrl = theUrl;
		}
		else
		{
			theUrl = My_GetCurUrPath() + theUrl;
		}
		//external.DownloadContent2( theUrl,N);
		external.DownloadContent( theUrl,N);		
		//external.DownloadContent2( theUrl,N);
		/*if(SUCCEEDED(external.DownloadContent))
    {
       external.DownloadContent( theUrl,N);
    }
   else if(succeeded(external.DownloadContent2))
	{
		external.DownloadContent2( theUrl,N);
	}*/
		
	}/*// mac的下载不支持重定向，这里的url是有重定向的
	else if( IsMacHost() )
	{
		theUrl = My_GetCurUrPath() + theUrl;
		alert( "DNDL_CON" + theUrl );
	}*/
	else
	{
		if( theUrl.indexOf("http:")>=0 )
		{
			theUrl = theUrl;
		}
		else
		{
			theUrl = My_GetCurUrPath() + theUrl;
		}
		//alert(theUrl);页面上面执行到此处
		window.open( theUrl, "_self"); 		
	}
}
-->

