/*Insert Flash Movie code
	For insertion of object code into the DOM
		swfName: location and name of swf '/videos/mymovie.swf'
		swfID: give the object an ID 'studentgallery' ****important that it is unique so it doesn't conflict with other elements on the page
		w: width '500'
		h: height '400'
		elemID: selector where flash object is being inserted '#elementID' or '#elementID div'
*/

function insertSWF(swfName,swfID,w,h,elemID) {
	/*Create flash object*/
	var objString = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+w+"\" height=\""+h+"\" id=\""+swfID+"\" title=\"cont\">" +
	"\n<param name=\"movie\" value=\""+swfName+"\" />" +
	"\n<param name=\"quality\" value=\"high\" />" +
	"\n<param name=\"wmode\" value=\"opaque\" />" +
	"\n<param name=\"swfversion\" value=\"6.0.65.0\" />" +
	"\n<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don\'t want users to see the prompt. -->" +
	"\n<param name=\"expressinstall\" value=\"/Scripts/expressInstall.swf\" />" +
	"\n<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->" +
	"\n<!--[if !IE]>-->" +
	"\n	<object type=\"application/x-shockwave-flash\" data=\""+swfName+"\" width=\""+w+"\" height=\""+h+"\">" +
	"\n<!--<![endif]-->"+
	"\n<param name=\"quality\" value=\"high\" />" +
	"\n<param name=\"wmode\" value=\"opaque\" />" +
	"\n<param name=\"swfversion\" value=\"6.0.65.0\" />" +
	"\n<param name=\"expressinstall\" value=\"/Scripts/expressInstall.swf\" />" +
	"\n<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->" +
	"\n<div>" +
	"\n<h4>Content on this page requires a newer version of Adobe Flash Player.</h4>" +
	"\n<p><a href=\"http://www.adobe.com/go/getflashplayer\"><img src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" width=\"112\" height=\"33\" /></a></p>" +
	"\n</div>" +
	"\n<!--[if !IE]>-->" +
	"\n</object>" +
	"\n<!--<![endif]-->" +
	"\n</object>";
	
	/*Add inside of element*/
	$(elemID).append(objString);
	}

	/*Insert Flash Masthead code
	For insertion of object code into the masthead chunk
	swfName: location and name of swf '/videos/mymovie.swf'
	swfID: give the object an ID 'studentgallery' ****important that it is unique so it doesn't conflict with other elements on the page
    imgName: Alternative image, if user does not have flash
    imgAlt: Alt text for the alternative image, description of image
	w: width '500'
	h: height '400'
	elemID: selector where flash object is being inserted '#elementID' or '#elementID div'
	*/

	function insertSWFMast(swfName, swfID, imgName, imgAlt, w, h, elemID) {
	    /*Create flash object*/
	    var objString = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\"" + w + "\" height=\"" + h + "\" id=\"" + swfID + "\" title=\"cont\">" +
	"\n<param name=\"movie\" value=\"" + swfName + "\" />" +
	"\n<param name=\"quality\" value=\"high\" />" +
	"\n<param name=\"wmode\" value=\"opaque\" />" +
	"\n<param name=\"swfversion\" value=\"6.0.65.0\" />" +
	"\n<!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don\'t want users to see the prompt. -->" +
	"\n<param name=\"expressinstall\" value=\"/Scripts/expressInstall.swf\" />" +
	"\n<!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->" +
	"\n<!--[if !IE]>-->" +
	"\n	<object type=\"application/x-shockwave-flash\" data=\"" + swfName + "\" width=\"" + w + "\" height=\"" + h + "\">" +
	"\n<!--<![endif]-->" +
	"\n<param name=\"quality\" value=\"high\" />" +
	"\n<param name=\"wmode\" value=\"opaque\" />" +
	"\n<param name=\"swfversion\" value=\"6.0.65.0\" />" +
	"\n<param name=\"expressinstall\" value=\"/Scripts/expressInstall.swf\" />" +
	"\n<!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->" +
    "\n<img src=\"" + imgName + "\" alt=\"" + imgAlt + "\" />" +
	"\n<!--[if !IE]>-->" +
	"\n</object>" +
	"\n<!--<![endif]-->" +
	"\n</object>";

	    /*Add inside of element*/
	    $(elemID).append(objString);
	}

