							function getParameter(parameterName) {  
							  var queryString = window.location.search.substring(1);
							  var parameters = new Array();  
							  var theval = null;
							  parameters = queryString.split('&');
							  for(var i=0; i < parameters.length; i++) {
							    if (parameters[i].indexOf(parameterName)>=0) {  
							      var parameterValue = new Array();  
							      parameterValue = parameters[i].split('=');  
							      theval = parameterValue[1];  
							    }  
							  }
							  return theval;  
							}
							function noNullStr(someVal){
								if (someVal != null) {
									return String(someVal);
								} else {
									return "";
								}
							}
							function noNullInt(someVal){
								if (someVal != null) {
									return parseInt(someVal);
								} else {
									return 0;
								}
							}
							function getTopOf(d) {
								var theTop = d.offsetTop;
								if (d.offsetParent) {
									while (d = d.offsetParent) {
										theTop += d.offsetTop;
									}
								}
								return theTop;
							}
							function _gel(d) {
								return document.getElementById(d);
							}
							function moveToDiv(d) {
								window.scrollTo(0,getTopOf(_gel(d)));
							}
							
							
							var idCounter = 0;
							var bFirstVideo = true;
							
 							// array for videos / flash things
							var vidArray = new Array();
							var va_section = 0;
							var va_enabled = 1;
							var va_title = 2;
							var va_id = 3;
							var va_thumbImage = 4;
							var va_headline = 5;
							var va_duration = 6;
							var va_description = 7;
							var va_swfLoc = 8;
							var va_swfStartImage = 9;
							var va_swfEndImage = 10;
							var va_swfEndImageLink = 11;
							var va_swfReplaceImage = 12;
							var va_swfShowContextMenu = 13;
 
/* 
These are the items in the vidArray to customize for each video item
  0. section heading text (things with the same heading text will be grouped together)
  1. Enabled (0 shows the coming soon, 1 leaves as normal)
  2. title to show on top of thumbnail
	3. id by which you can call the video directly
	4. thumbnail graphic location
	5. Title
	6. Duration of video
	7. Description
	8. URL of the FLV file
	9. start image
	10. end image
	11. end image link (URL that it goes to)
	12. Replacement Image (in case the user doesn't have flash player installed) - we can usually leave this blank
	13. Whether to hide "More Resources" or not (true means to hide it)
*/
vidArray[vidArray.length] = [0,1,"","","","What is DLP","","","http://dl-www.ti.com/lit/ml/dlpc041/dlpc041.flv","/video/thumb/thumb_tech.jpg","","","","true"];
vidArray[vidArray.length] = [0,1,"","","","3D DLP for Education","","","http://dl-www.ti.com/lit/ml/dlpc008/dlpc008.flv","/video/thumb/thumb_3d_dlp_480x360.jpg","","","","true"];
vidArray[vidArray.length] = [0,1,"","","","Latest innovations in DLP Projector technology","","","http://dl-www.ti.com/lit/ml/dlpc016/dlpc016.flv","/video/thumb/thumb_brilliantcolor_280.jpg","","","","true"];
vidArray[vidArray.length] = [0,1,"","","","PISD testimonial","","","http://dl-www.ti.com/lit/ml/dlpc037/dlpc037.flv","","","","","true"];
vidArray[vidArray.length] = [0,1,"","","","Pico projector phone","","","http://dl-www.ti.com/lit/ml/dlpc039/dlpc039.flv","","","","","true"];;
							
							function writeThumbs(sect) {
								for (var i=0;i<vidArray.length;i++) { 
									if (vidArray[i][va_section] == sect) {
									document.write("<li id=\"vidBtn_" + i + "\" class=\"off\"><a href=\"javascript:setNewMovie(" + i + ")\">" + vidArray[i][va_headline] + "</a></li>");

									}
								}
							}
							function getIndexForMovieId(strId) {
								var resultI = 0;
								for (var i=0;i<vidArray.length;i++) { 

									if (vidArray[i][va_id] == strId) { 
										resultI = i; 
									} 
								} 
								return resultI; 
							} 
							function setNewMovie(iVaId) { 
								var vaId = 0; 
								if (typeof iVaId == "string") { 
									vaId = getIndexForMovieId(iVaId);	
								} else { 
									if (noNullInt(iVaId) != NaN) { 
										vaId = noNullInt(iVaId); 
									} 
								} 

							  var fo = new FlashObject("/video/DLP_video_component_AS3.swf","vid_"+vaId,"180","180","8","#fff", vidArray[vaId][va_swfReplaceImage]);
							  if (vidArray[vaId][va_swfShowContextMenu] == "true") {
							  	fo.addVariable("hideresources","true");
							  }
							  if (vidArray[vaId][va_swfStartImage]) {
							  fo.addVariable("startimage",vidArray[vaId][va_swfStartImage]);
							  }
							  if (vidArray[vaId][va_swfEndImage]) {
							  fo.addVariable("endimage",vidArray[vaId][va_swfEndImage]);
							  }
							  if (vidArray[vaId][va_swfEndImageLink]) {
							  	//fo.addVariable("endlink",vidArray[vaId][va_swfEndImageLink]);
							  }
								fo.addVariable("flvfile",vidArray[vaId][va_swfLoc]);
								if (!bFirstVideo) {
						  		fo.addVariable("autoplay","true");
						  	}					
							// make sure that bFirstVideo is false for the next video we show
							bFirstVideo = false;
						  	//fo.addVariable("autoplay","false"); 
						  	fo.addVariable("dotracking","true");
							fo.addVariable("track","true");
   						  	fo.addParam("wmode","transparent"); 
							document.getElementById("movieplayer").innerHTML = fo.getHTML(); 
							//document.getElementById("abtthisvid").innerHTML = "<h2>About this Video<\/h2><h3>" + vidArray[vaId][va_headline] + "<\/h3>";
							//document.getElementById("videodesc").innerHTML = vidArray[vaId][va_description];
							  
							  // turn off all the highlights
							  for (var i=0;i<vidArray.length;i++) { 
							  	var tmpObj = document.getElementById("vidBtn_" + i); 
							  	if (tmpObj) { 
								  	tmpObj.className = "off"; 
								  } 
							  }							  					  	
							  document.getElementById("vidBtn_" + vaId).className = "on"; 
							}