// 2006-2010 (c) Risujin.org


// tabs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

function tabs(i) {

	// hide tabs
	window.document.getElementById("see").style.display="none";
	window.document.getElementById("fly").style.display="none";
	window.document.getElementById("now").style.display="none";
	window.document.getElementById("new").style.display="none";
	window.document.getElementById("old").style.display="none";

	// deselect links
	window.document.getElementById("see_link").className="";
	window.document.getElementById("fly_link").className="";
	window.document.getElementById("now_link").className="";
	window.document.getElementById("new_link").className="";
	window.document.getElementById("old_link").className="";

	// show target tab and select target link
	window.document.getElementById(i).style.display="block";
	window.document.getElementById(i + "_link").className="viewing";
}


// view - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

var last_a_tag;

function show(tag, pic, date, desc) {
	if (last_a_tag)
		last_a_tag.className = '';
	tag = document.getElementById(tag);
	last_a_tag = tag;
	tag.className = 'on';
	images = pic.split(";");
	html = "";
	for (var i = 0; i < images.length; i++)
		html += "<img src=\"" + images[i] + "\" />";
	document.getElementById('content').innerHTML = html;
	document.getElementById('tooltip').innerHTML = "<strong>" + date + " ( </strong> " + desc + " <strong>)</strong>" ;
}

function showFlash(tag, flash, width, height, date, desc) {
	if (last_a_tag)
		last_a_tag.className = '';
	tag = document.getElementById(tag);
	last_a_tag = tag;
	tag.className = 'on';
	document.getElementById('content').innerHTML=
		"<br/>"+
		"<object width=\""+width+"\" height=\""+height+"\" id=\""+flash+"\" />"+
		"<param name=\"allowScriptAccess\" value=\"sameDomain\" />"+
		"<param name=\"movie\" value=\""+flash+".swf\" />"+
		"<param name=\"loop\" value=\"true\" />"+
		"<param name=\"quality\" value=\"high\" />"+
		"<param name=\"scale\" value=\"exactfit\" />"+
		"<embed src=\""+flash+".swf\" loop=\"true\" quality=\"high\" scale=\"exactfit\""+
		" width=\""+width+"\" height=\""+height+"\" name=\""+flash+"\" allowScriptAccess=\"sameDomain\""+
		" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />"+
		"</object>"+
		"<br/>";
	document.getElementById('tooltip').innerHTML = "<br/><br/><strong>" + date + " ( </strong> " + desc + " <strong>)</strong>" ;
}