/*----------------------------------------------------------------------------------------
			 NAME: 	 playmovie
			 DESCRIPTION: Call when a video file is played on an index page.
			 PURPOSE: 	The author of the page has the option  of using 
			 		the default height and width for the video player,
			 		which is set by default when a video component
			 		is created, or they can specify their own. In the
			 		event that the author enters a non-numeric value
			 		into either the width field, the height field, or both,
			 		the default size will be used instread.
			----------------------------------------------------------------------------------------*/
			function playmovie(URL,W,H)
			{
			var str;     //Create variable to hold a string
			var testWidth=isNaN(W);     //Create variable to test the  width value and see if it is a number
			var testHeight=isNaN(H);    //Create variable to test the  height value and see if it is a number
			var theURL = "http://www.cmich.edu/" + URL;
			
			if(testWidth==true || testHeight==true){     //If the specified height and width is not a number, use the default window size
				str += "'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no";     //Build the string
				str+=",width=320";
				str+=",height=254";
				str+=",left=350,top=275,dependent=yes','replace=true'";

				window.open(theURL,'_blank',str);     //Open new window with default dimensions if user enters text rather than a number in the text boxes for width and height.
				}
			
			else{     //If the speicifed height and width is a number, use those values.
				str += "'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no";     //Build the string
				str+=",width=" + W;
				str+=",height=" + H;
				str+=",left=350,top=275,dependent=yes','replace=true'";
			
				window.open(theURL,'_blank',str);     //Open new window with user defined dimensions.
				}
			}			
