//The JavaScript library cmsplugin.js is needed for IE browser

function initializeCMSPlugin()
{
var plugin_to_load = '<OBJECT ID="cpnmcontrol2" CLASSID="CLSID:BA3619B7-A0E5-43F0-A015-77411B1592F8" '
		   + 'width="1" height="1">'
		   + '<PARAM NAME="ApplicationTarget" VALUE="' + buildApplicationTarget() +'">'
		   + '<PARAM NAME="LaunchCms" VALUE="FALSE">'
		   + '<h3>Cisco CPNM Plugin is not installed</h3>'
		   + '</OBJECT>';
		
//only invoke the loadCMS from the Switch Home Page where cms_plugin_paragraph is a defined tag
if( (document.all.cms_plugin_paragraph != null) && (document.all.cms_plugin_paragraph.innerHTML != null) )
	document.all.cms_plugin_paragraph.innerHTML = plugin_to_load;	
/*
document.write('<OBJECT ID="cpnmcontrol2" CLASSID="CLSID:BA3619B7-A0E5-43F0-A015-77411B1592F8" ');
document.write('width="400" height="40">');
document.write('<PARAM NAME="ApplicationTarget" VALUE="' + buildApplicationTarget() +'">');
document.write('<PARAM NAME="LaunchCMS" VALUE="FALSE">');
document.write('</OBJECT>');
*/
}


function isCMSPluginSupported()
{
	try
	{
	var xObj = new ActiveXObject("CPNM2.cpnmcontrol2");
	if(xObj)
		return true;  
	}
	catch(er)
	{
		return false;
	}
		return false;

}


