var videos = new Array(14);

videos[0] = new Video(
	"Volume Reconstruction for Dosimetry Simulations",
	"3AQsqj3OuNA",
	"http://www.caip.rutgers.edu/vizlab_group_files/silver/AIRFORCE/"
);

videos[1] = new Video(
	"Volume Deformation of CT Head",
	"HEMsx94P-Cs",
	"feature/index.html"
);

videos[2] = new Video(
        "Dataset Traversal",
        "ZEhxV404L3w",
        "traversal/index.html"
);

videos[3] = new Video(
	"Discontinuous Displacement Mapping",
	"BoIoZ82K0tE",
	"displacement/index.html"
);

videos[4] = new Video(
        "Dissection of Volumetric Objects",
        "8PZ_LcwI07s",
        "feature/index.html"
);

videos[5] = new Video(
        "Traversal Volumetric Lens (Losbter)",
        "Kuw2ljG4xGI",
        "traversal/index.html"
);

videos[6] = new Video(
        "Traversal Volumetric Lens (Neck)",
        "-v7zEs0YCV8",
        "traversal/index.html"
);

videos[7] = new Video(
        "Feature Aligned Volume Manipulation",
        "gsf3PzOfA1s",
        "feature/index.html"
);
videos[8] = new Video(
        "Deformation Rendering on the GPU",
        "SxWSvMDqCW4",
        "deforender/index.html"
);

videos[9] = new Video(
        "Visualizing Collision Effects I : Bouncing",
        "B0T2za7FR0Y",
        "collision/index.html"
);


videos[10] = new Video(
        "Visualizing Collision Effects II : Sculpting",
        "vaX6GR9vC0Y",
        "collision/index.html"
);


videos[11] = new Video(
        "Visualizing Collision Effects III : Cutting",
        "srWP9dMymGA",
        "collision/index.html"
);

videos[12] = new Video(
        "Volume Deformation via Scattered Data Interpolation",
        "gPIn0iGfGVk",
        "scattered/index.html"
);

videos[13] = new Video(
	"Illustrative Deformation for Data Exploration",
	"m2dy3CVCIxI",
	"deformation/index.html"
);



function Video_Print() {
	var temp="";
	temp += "<a href='seevid.html?v="+this.id + "' target='vidframe'>"+this.name+"</a>";
	window.document.write(temp);
}

function Video(Name, Id, Link) {
	this.name = Name;
	this.id = Id;
	this.link = Link;
	this.print = Video_Print;
}

function getTitle(id) {
	var titlestr="";
	for(var i=0;i<videos.length;i++) {
		if(videos[i].id==id) {
		   titlestr=""+videos[i].name + " | <a href='"+videos[i].link+"' target = 'top'>More</a>";
		}		
	}
	return titlestr;
}

function numVideos() {
	window.document.open();
	window.document.write("("+videos.length+ " videos)");
	window.document.close();
}

function showVideo() {
	
	window.document.open();
	window.document.write("<ul>");
	
	for(var i=0;i<videos.length;i++) {
		var style = (i%2==0)? "row1": "row2";
		window.document.write("<li class=\""+style+"\">");
		videos[i].print();
		
		window.document.write("</li>");
	}
	window.document.write("</ul>");
	window.document.close();
}
