﻿// JavaScript Document
var animations= new Array("animation1.jpg","NB_Taggers_intro_web.mov");
var artwork= new Array("Art1.jpg","Art2.jpg","Art3.jpg","Art4.jpg","Art5.jpg","Art6.jpg","Art7.jpg","Art8.jpg","Art9.jpg","Art10.jpg","Art11.jpg","Logos1.jpg","Logos2.jpg","Logos3.jpg");
var collaboration= new Array("collab10.jpg","collab9.jpg","collab8.jpg","collab7.jpg","collab6.jpg","collab5.jpg","collab4.jpg","collab3.jpg","collab2.jpg","collab1.jpg");
var customs= new Array("Custom1.jpg","Custom2.jpg","Custom3.jpg","Custom4.jpg","Custom5.jpg","Custom6.jpg","Custom7.jpg","Custom8.jpg");
var misc= new Array("misc1.jpg","misc2.jpg","misc3.jpg","misc4.jpg");
var shows= new Array("shows9.jpg","shows8.jpg","shows7.gif","shows1.jpg","shows2.jpg","shows4.jpg","shows5.jpg","shows6.jpg");
var sightings= new Array("sightings1.jpg","sightings2.jpg","sightings3.jpg","sightings4.jpg","sightings5.jpg","sightings6.jpg","sightings7.jpg","sightings8.jpg");
var sketches= new Array("sketch1.jpg","sketch2.jpg","sketch3.jpg","sketch4.jpg","sketch5.jpg","sketch6.jpg","sketch7.jpg","sketch8.jpg","sketch9.jpg","sketch10.jpg","sketch11.jpg","sketch12.jpg","sketch13.jpg","sketch14.jpg");
var mentions= new Array("Mention1.jpg","Mention2.jpg");
var tips= new Array("Tips1.php","Tips2.php");
var links= new Array("Links1.php");
//
var sections= new Array("Sketches", "Artwork", "Customs", "Collaboration", "Shows", "Sightings","Animations", "Mentions", "Misc" , "Tips", "Links");
var arrays = new Array(sketches,artwork,customs,collaboration,shows,sightings,animations,mentions,misc,tips,links);
//
//
var changeBack='';
var returnCode='';
//
function changeTitle(curTitle){
	currentSection=sections[curTitle];
	currentSection=currentSection.toLowerCase();
	if(currentSection=='animations'){
		currentSection='animation';
	}
	innerCode=currentSection;
	function stiff(){
		curBtn=innerCode+'_btn';
		document.getElementById(curBtn).src="../assets/images/nice_things/assets/"+curBtn+"_red.gif";
	}
	document.getElementById(currentSection).onmouseout=stiff;
	changeBack=currentSection+"_btn";
	returnCode=currentSection;
}

function returnTitle(changeBack,returnCode){
if(changeBack==''){
}else{
	document.getElementById(changeBack).src="../assets/images/nice_things/assets/"+changeBack+".gif";
		function unstiff(){
		document.getElementById(changeBack).src="../assets/images/nice_things/assets/"+changeBack+".gif";
	}
	document.getElementById(returnCode).onmouseout=unstiff;
	}
}

function hideMore(key,loader){
if (loader=="tips"){
size=tips.length;	
}else if (loader=="links"){
size=links.length;		
}

if (loader=="default"){
document.getElementById(key).style.display = "none";	
}else if (size==1){
document.getElementById(key).style.display = "none";	
}else {
document.getElementById(key).style.display = "inline";	
}
}
//
var current=0;
var currentPic=0;
var gallery;
function changeGallery(changeCode){
returnTitle(changeBack,returnCode);
changeTitle(changeCode);
curGallery=sections[changeCode];
gallery=curGallery;
curArray=arrays[changeCode];
var currentFile=curArray[0];
var filetype=currentFile.charAt(currentFile.length - 3);
if (filetype=="j"||filetype=="g"){
document.getElementById('gallery').innerHTML = "<img src='../assets/images/nice_things/galleries/"+curGallery+"/"+curArray[0]+"' border=0 />";
}else if (filetype=="m"){
document.getElementById('gallery').innerHTML = "<OBJECT classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width='320' height='255' codebase='http://www.apple.com/qtactivex/qtplugin.cab'> <param name='src' value='../assets/images/nice_things/galleries/"+curGallery+"/"+curArray[0]+"'><param name='autoplay' value='true'><param name='controller' value='true'><param name='loop' value='false'><EMBED src='../assets/images/nice_things/galleries/"+curGallery+"/"+curArray[0]+"' width='320' height='255' autoplay='true' controller='true' loop='false' pluginspage='http://www.apple.com/quicktime/download/'></EMBED></OBJECT>";
}else if (filetype=="p"){
document.getElementById('gallery').innerHTML ="";
document.getElementById('gallery').innerHTML = "<iframe id='"+gallery+"' name='"+gallery+"' src='../assets/images/nice_things/galleries/"+curGallery+"/"+curArray[0]+"' frameborder='0' width='400px' height='394px'><\/iframe>";
}

if(curArray.length<=1){
	document.getElementById('more_shell').style.display = "none";
}else{
	document.getElementById('more_shell').style.display = "inline";
}
}
//
//
function changeDisplay(key){
if(key==1){
currentPic++;
}else {
currentPic--;
}
if(currentPic>curArray.length-1){
currentPic=0;
}
else if(currentPic<0){
currentPic=curArray.length-1;
}else{
currentPic=currentPic;
}
var currentFile=curArray[currentPic];
var filetype=currentFile.charAt(currentFile.length - 3);
if (filetype=="j"||filetype=="g"){
document.getElementById('gallery').innerHTML = "<img src='../assets/images/nice_things/galleries/"+curGallery+"/"+curArray[currentPic]+"' border=0 />";
}else if (filetype=="m"){
document.getElementById('gallery').innerHTML = "<OBJECT classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' width='320' height='255' codebase='http://www.apple.com/qtactivex/qtplugin.cab'> <param name='src' value='../assets/images/nice_things/galleries/"+curGallery+"/"+curArray[currentPic]+"'><param name='autoplay' value='true'><param name='controller' value='true'><param name='loop' value='false'><EMBED src='../assets/images/nice_things/galleries/"+curGallery+"/"+curArray[currentPic]+"' width='320' height='255' autoplay='true' controller='true' loop='false' pluginspage='http://www.apple.com/quicktime/download/'></EMBED></OBJECT>";
}else if (filetype=="p"){
document.getElementById('gallery').innerHTML = "<iframe id='"+gallery+"new"+currentPic+"' name='"+gallery+"new"+currentPic+"' src='../assets/images/nice_things/galleries/"+curGallery+"/"+curArray[currentPic]+"' frameborder='0' width='400px' height='394px'></iframe>";
}
}


