function render() {
	// VIDEO DETAILS ///////////////////////////////////////////////////
	var file = videofile;
	var playlist = "none";
	var streamer = "";
	
	switch (type) {
		// FLASH VIDEO
		case "FLV" :
			if (grouping == "IND") {
				if (connection == "STR") {
					var info_arr = file.split("/");
					streamer = "rtmp://flashcommunication.smartpros.com/40530/" + info_arr[0];
					file = info_arr[1];
				} else if (connection == "FAUX") {
					file = "http://progressive.smartpros.com/videostream.php?p=40530/streams/" + file;
				} else if (connection == "DIR") {
					file = globalroot + "/videos/" + file;
				}
			} else if (grouping == "MULTI") {
				file = "playlists/" + file;
				playlist = "bottom";
			}
			break;
			
		// WINDOWS MEDIA VIDEO
		case "WMV" :
			if (grouping == "IND") {
				if (connection == "STR") {
					file = "http://windowsmedia.smartpros.com/" + file;
				} else if (connection == "DIR") {
					file = globalroot + "/videos/" + file;
				}
			} else if (grouping == "MULTI") {
				file = "playlists/" + file;
			}
			break
		
		// QUICKTIME VIDEO
		case "QT" :
			if (grouping == "IND") {
				if (connection == "STR") {
					// file = "http://quicktime.smartpros.com/" + file;
				} else if (connection == "DIR") {
					file = globalroot + "/videos/" + file;
				}
			} else if (grouping == "MULTI") {
				// file = "playlists/" + file + ".asx";
			}
			break;
	}
	
	var vp = new VideoPlayer(type);
	vp.setFile(file);
	vp.setPlaylist(playlist);
	vp.setStreamer(streamer);
	vp.setSize(320, 240);
	vp.write("player");
	
	// BACKGROUND DETAILS //////////////////////////////////////////////
	var bgwidth;
	var bgheight;
	var bgsrc;
	var txtheight;
	
	switch (type) {
		// FLASH VIDEO
		case "FLV" :
			if (playlist == "bottom") {
				if (txt) {
					bgwidth = 810;
					bgheight = 610;
					bgsrc = "flv_playlist_wide.swf";
					txtheight = 485;
				 } else {
					bgwidth = 420;
					bgheight = 610;
					bgsrc = "flv_playlist.swf";
					txtheight = 365;
				}
			} else {
				if (txt) {
					bgwidth = 810;
					bgheight = 490;
					bgsrc = "flv_wide.swf";
					txtheight = 365;
				 } else {
					bgwidth = 420;
					bgheight = 490;
					bgsrc = "flv.swf";
					txtheight = 365;
				}
			}
			break;
			
		// WINDOWS MEDIA VIDEO
		case "WMV" :
			if (globalplatform == "MacIntel" || globalplatform == "MacPPC") {
				if (txt) {
					bgwidth = 810;
					bgheight = 480;
					bgsrc = "qt_wide.swf";
					txtheight = 355;
				 } else {
					bgwidth = 420;
					bgheight = 480;
					bgsrc = "qt.swf";
					txtheight = 355;
				}
			} else {
				if (txt) {
					bgwidth = 810;
					bgheight = 600;
					bgsrc = "wmv_wide.swf";
					txtheight = 475;
				 } else {
					bgwidth = 420;
					bgheight = 600;
					bgsrc = "wmv.swf";
					txtheight = 475;
				}
			}
			break;
			
		// QUICKTIME VIDEO
		case "QT" :
			if (txt) {
				bgwidth = 810;
				bgheight = 480;
				bgsrc = "qt_wide.swf";
				txtheight = 355;
			 } else {
				bgwidth = 420;
				bgheight = 480;
				bgsrc = "qt.swf";
				txtheight = 355;
			}
			break;
		default :
			bgwidth = 420;
			bgheight = 490;
			bgsrc = "flv.swf";
			txtheight = 365;
			break;
	}
	
	document.getElementById('ui').style.width = bgwidth;
	document.getElementById('ui').style.height = bgheight;
	
	if (navigator.appName == "Microsoft Internet Explorer") {
		document.getElementById('extratext').style.height = (txtheight + 25);
		document.getElementById('extratext').style.width = "360px";
	} else {
		document.getElementById('extratext').style.height = txtheight;
	}
	
	if (txt) {
		document.getElementById('extratext').innerHTML = txt;
		document.getElementById('extratext').style.display = "block";
	}
	
	var s1 = new SWFObject("flash/bg/" + bgsrc,"playerbg_id",bgwidth,bgheight,"9","#FFFFFF");
	s1.addParam("allowfullscreen","false");
	s1.addParam("allowscriptaccess","always");
	s1.addParam("wmode","transparent");
	s1.write("playerbg");
	
	// PLAYER LOGO /////////////////////////////////////////////////////
	if (playerlogo) {
		document.getElementById('playerlogo').innerHTML = "<img src='logos/" + playerlogo + "'>";
	} else {
		document.getElementById('playerlogo').innerHTML = "<img src='logos/_vplayer.gif'>";
	}
}