var m_oStatus;
function myTestFunction(param1, param2)
{			
	alert('The following js function was called: myTestFunction \n params: (' + param1 + ', ' + param2 + ')');
	return confirm('Do wish to continue?');
}

function myJSExtFunction(sKey)
{
	alert('You clicked on a file with a .js extension: ' + sKey); 
	return confirm('Do wish to continue?');
}

function myJSNavFunction(sKey)
{
	return confirm('This will navigate the IFRAME to the following page: ' + sKey + '\nDo you wish to Continue?');
}

function __dnn_ClientAPIEnabled()
{
	return typeof(dnn) != 'undefined';
}

function writeStatus(s)
{
	if (m_oStatus == null)
		m_oStatus = document.Form1.txtStatus;
	
	m_oStatus.value = s + ' (' + new Date().getMinutes() + ':' + new Date().getSeconds() + ')\n' + m_oStatus.value;
}
function callbackStatus(result, ctx)
{
	if (isNaN(result))
		writeStatus('Callback Status: Complete - Payload Size=' + result.length);
	else 	
		writeStatus('Callback Status: ' + result);
}

function init()
{
	if (__dnn_ClientAPIEnabled())
	{
		if (dnn.xml != null)
			writeStatus('XML Parser: ' + dnn.xml.parserName);
		else
			writeStatus('XML Parser: N/A');
		
		if (dnn.xmlhttp != null)
			writeStatus('XMLHTTP Transport: ' + dnn.xmlhttp.parserName);
		else
			writeStatus('XMLHTTP Parser: N/A');
	}
	else
		writeStatus('DownLevel Rendering');
		
}

function promptForSave(evt, ctl)
{
	//return confirm('Are you sure you wish to save this text?\n' + ctl.editWrapper.getText());
	return true;
}
