﻿// JScript File

function menuHandler(sItem)
{
	var item = document.getElementById(sItem);
	
	if (item.style.display == "none")
	{
		item.style.display = "";
	}
	else
	{
		item.style.display = "none";
	}
}

/**
* Short cut for getting the element by id
* @param anon the string of the element id
*/
function $() {
	var elements = new Array();
	for (var i = 0; i < arguments.length; i++) {
		var element = arguments[i];
		if (typeof element == 'string')
			element = document.getElementById(element);
		if (arguments.length == 1)
			return element;
		elements.push(element);
	}
	return elements;
}//end $
/**
* This method is used to get around the "new feature"
* in IE for embedding content in websites
* @param container element id of the container
* @param movie the url of the movie
* @param width the width
* @para, height the height
*/
function showFlash(container, movie, width, height) {                                   
    var output = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width='"+width+"' height='"+height+"' id='myflash'>";
    output += "<param name='allowScriptAccess' value='sameDomain' />";
    output += "<param name='movie' value='" + movie + "' />";
    output += "<param name='quality' value='high' />";
    output += "<embed src='" + movie + "' quality='high' width='"+width+"' height='"+height+"' name='mymovie' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />";
    output += "</object>"; 
    $(container).innerHTML = output;
}//end showFlash 

						