//
// culture-mood (c)
// Created by Carlos D. Correa
// http://www.caip.rutgers.edu/~cdcorrea
// 2004
//

//var image = "cmood/ouatitw.jpg";
//var cmood = new Array(4);
//cmood[0] = new CMoodItem(
//	"Soundtrack",
//	"Once upon a time in the west. Ennio Morricone, 1968",
//	"http://www.amazon.com/exec/obidos/tg/detail/-/B000002W71/104-1607961-3213529?v=glance"
//);
//
//cmood[1] = new CMoodItem(
//	"Movie",
//	"Kill Bill Vol. 2, 2004",
//	"http://www.imdb.com/title/tt0378194/"
//);
//
//cmood[2] = new CMoodItem(
//	"Book (Literature)",
//	"The Illiad, Homer",
//	"http://www.google.com/search?sourceid=navclient&ie=UTF-8&q=The+Illiad%2C+Homer"
//);
//
//cmood[3] = new CMoodItem(
//	"Book (Scientific)",
//	"Graph Theory with Applications",
//	"http://www.ecp6.jussieu.fr/pageperso/bondy/books/gtwa/gtwa.html"
//);
var image = "cmood/napoleon.jpg";
var cmood = new Array(4);
cmood[0] = new CMoodItem(
	"Symphony",
	"Eroica: No.3, Beethoven",
	"http://classicalmusic.about.com/od/symphonies/a/aaeroica.htm"
);

cmood[1] = new CMoodItem(
	"Gadget",
	"Still my iPod mini",
	"http://www.apple.com/ipodmini"
);

cmood[2] = new CMoodItem(
	"Book",
	"Foucault's Pendulum, Umberto Eco",
	"http://www.amazon.com/exec/obidos/tg/detail/-/0345368754?v=glance"
);

//cmood[2] = new CMoodItem(
//	"Star",
//	"Polaris",
//	"http://www.google.com/search?sourceid=navclient&ie=UTF-8&q=Polaris+north+star"
//);

cmood[3] = new CMoodItem(
	"Movie",
	"Anything by Hayao Miyazaki",
	"http://www.imdb.com/name/nm594503/"
);

//var image = "cmood/ipod.jpg";
//var cmood = new Array(4);
//cmood[0] = new CMoodItem(
//	"Song",
//	"All that fit in my new iPod :)",
//	"http://www.apple.com/ipodmini/"
//);

//cmood[1] = new CMoodItem(
//	"Movie",
//	"The Good, The Bad and The Ugly",
//	"http://www.imdb.com/title/tt0060196/"
//);

//cmood[2] = new CMoodItem(
//	"Book (Literature)",
//	"The Illiad, Homer",
//	"http://www.google.com/search?sourceid=navclient&ie=UTF-8&q=The+Illiad%2C+Homer"
//);

//cmood[3] = new CMoodItem(
//	"Soundtrack",
//	"Once upon a time in the west. Ennio Morricone, 1968",
//	"http://www.amazon.com/exec/obidos/tg/detail/-/B000002W71/104-1607961-3213529?v=glance"
//);


function CMoodItem_Print() {
	var temp="";
	temp += "<td>";
	temp += "	"+this.category + " : "+ this.name;
	temp += "</td>";
	temp += "<td>";
	temp += (this.link!="")? "	<a href=\""+ this.link + "\" class=\"symbol\">>></a>": "&nbsp;";
	temp += "</td>";
	window.document.write(temp);
}

function CMoodItem(Category, Name, Link) {
	this.category = Category;
	this.name = Name;
	this.link = Link;
	this.print = CMoodItem_Print;
}


function cosmoWhod() {
	
	window.document.open();
	showCmoodHeader();
	
	for(var i=0;i<cmood.length;i++) {
		var style = (i%2==0)? "row1": "row2";
		window.document.write("<tr class=\""+style+"\">");
		cmood[i].print();
		
		window.document.write("</tr>");
	}
	showCmoodFooter();
	window.document.close();
}


function showCmoodHeader() {
    window.document.write("\
	<fieldset width=100% title=\"To find out what's this, click on link in the bottom right corner\">\
		<legend>Your Modem-Cult</legend>\
		<table id=\"cultureMood\" class=\"cultureMood\" cellspacing=2>\
			<tr>\
				<td>\
					<img src=\"" + image + " \" width=64 height=64 border=1>\
				</td>\
				<td>\
					<table>\
    ");
}

function showCmoodFooter() {
    window.document.write("\
    					</table>\
    				</td>\
    			</tr>\
    			<tr>\
				<td class=\"details\" colspan=2>\
					<a href=\"http://www.caip.rutgers.edu/~cdcorrea/cmood.html\" class=\"details\">What M-Cult Use or Do?</a>\
				</td>\
			</tr>\
			<tr>\
				<td colspan=2>\
					<a href=\"http://www.caip.rutgers.edu/~mariacv\" class=\"details\">Maria's cmood</a> | \
					<a href=\"http://www.scils.rutgers.edu/~aleksarc\" class=\"details\">Aleksandra's cmood</a>\
				</td>\
			<tr>\
		</table>\
	</fieldset>\
    ");
}
