function flashToPage(shortName, pageURL)
{
	document.location.href = pageURL + "&sc=FlashPromo_" + shortName;
}
 
function flashOpenWindow(pageURL) 
{
	popup=window.open(pageURL,"External","width=800,height=575,resizable=yes,status=yes,toolbar=yes,directories=no,menubar=yes,scrollbars=yes,location=yes");
}

function flashSDCTrack(shortName, event) 
{

	// Tell the breadcrumb we are tracking the flash theather
	flashMetaData("DCSext.mct_1","Flash Theater");

	// short name of movie being tracked
	flashMetaData("DCSext.mct_2",shortName);

	// valid event values include (Passive, Action, or Target)
	flashMetaData("DCSext.mct_3",event);


	// valid event values include (Passive, Action, or Target)
	flashMetaData("DCSext.mct_a","Home/Flash Theater/" + shortName + "/" + event);

	//call out to SDC
	dcsMeta();
	dcsMultiTrack();
	
}

function flashMetaData (name, content)
{

	// first try to update an existing tag
	if (flashUpdateMetaData(name, content) == false) {
		// Add new tag becuase the tag does not exist
		flashAddMetaData (name, content)
	}
}





function flashAddMetaData (name, content)
{
	if (document.createElement &&
		(meta = document.createElement('meta'))) {

	// set properties
	meta.name = name;
	meta.content = content;

	// now add the meta element to the head
	document.getElementsByTagName('head').item(0).appendChild(meta);
	}
}


function flashUpdateMetaData (name, content)
{
	if (document.getElementsByTagName) {
		metaNodes = document.getElementsByTagName("meta");
		var nameValue;
		for(i = 0; i < metaNodes.length; i++) {
			nameValue = metaNodes[i].getAttribute('name');
			if (nameValue == name) {
				metaNodes[i].setAttribute('content', content);
				return true;
			}
		}		

	}
return false;
}

