// Copyright 1999 Macromedia, Inc. All rights reserved.

//---------------   GLOBAL VARIABLES   ---------------

var helpDoc = MM.HELP_objScript;

//---------------     API FUNCTIONS    ---------------

function isDOMRequired() { 
	// Return false, indicating that this object is available in code view.
	return false;
}

function isAsset() {
	return true;
}

function objectTag(assetArgs) {
// If we're an asset tag, then just set the src of the script tag
// to the parameter passed in and return
  if (assetArgs)
  	return '<script src="' + assetArgs + '"><\/script>';

// Return the html tag that should be inserted
  var len = document.forms[0].script.value.length;
  var selInd = document.forms[0].Language.selectedIndex;
  var scriptLang = document.forms[0].Language.options[selInd].text
  
  if (len > 0 && document.forms[0].script.value.charAt(len - 1) != '\n')
    document.forms[0].script.value = document.forms[0].script.value + '\n';
	
  return '<script language="' + scriptLang + '">\n' + document.forms[0].script.value + '<\/script>';
}
