// JavaScript Document

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
			document.write('<script language=\"VBScript\"\>\n');
			document.write('On Error Resume Next\n');
			document.write('Sub myGallery_FSCommand(ByVal command, ByVal args)\n');
			document.write('	Call myGallery_DoFSCommand(command, args)\n');
			document.write('End Sub\n');
			document.write('</script\>\n');
		}
	function headerText(aHeader) {
		var theQuotes=new Array;
		theQuotes[0]="I'm Crucified, Crucified, like my saviour";
		theQuotes[1]="Ha, sukka.";
		theQuotes[2]="Saturday night Dance I like the way you move";
		theQuotes[3]="The smell of food. The smell of rain. I'm not immune - I love this tune.";
		theQuotes[4]="I'll take you home and make it easy. Love more.";
		theQuotes[5]="I was born an original sinner I was born from original sin and if I had a dollar bill for all the sins i've done there'd be a money pile up to my chin";
		theQuotes[6]="Fire in the disco";
		theQuotes[7]="Tu mens tout le temps et c'est la seule vérité. Mais ça m'est égal. Oh baby, j'ai pas peur.";
		theQuotes[8]="Si j'étais toi, si j'étais toi, je ne me traiterais pas comme tu le fais.";
		theQuotes[9]="I lost my heart to a starship trooper.";
		theQuotes[10]="Your black eyed soul, you should know, that there's nowhere else to go. my black eyed boy.";	
		theQuotes[11]="Tank fly boss walk jam nitty gritty You're listening to the boy from the big bad city This is jam hot.";	
		theQuotes[12]="You know, Loud's my diagnosis, cause i believe in miracles words in heavy doses.";
		theQuotes[13]="You're gonna cry 96 tears.";
		theQuotes[13]="You're a mighty fine woman but I have to say, I'm sorry, I just don't swing that way.";
		theQuotes[14]="We don't really need a crowd to have a party just a funky beat and you to get it started and, oh, we'll dance the night away.";
		theQuotes[15]="Keep Control, of me.";
		theQuotes[16]="But now i'm not an artist i'm a fucking work of art.";
		theQuotes[17]="Exterminate";
		theQuotes[18]="You'll be surprised to what you might find.";
		theQuotes[19]="Simply irresistible.";
		theQuotes[20]="Higher state of consciousness";
		theQuotes[21]="Your hair is beautiful, oh tonight. Atomic.";
		theQuotes[22]="I'm too sexy for your party, the way you're disco dancing.";
		theQuotes[23]="Yes Sir, I can boogie, but I need a certain song.";
		theQuotes[24]="I'm a highschool lover and you're my favourite flavor, love is all, all my soul, you're my playground love.";

		var randomNumber=Math.floor(Math.random()*theQuotes.length);
		return seeOptions('zitats')||(aHeader=='homeHeader')?theQuotes[randomNumber]:"";
	}
	
	function init(aHeader) {
		var theHeader=document.getElementById(aHeader);
		var theImages=new Array;
		theImages[0]="berlinZoo.jpg";
		theImages[1]="berlinGate.jpg";
		theImages[2]="berlinGoat.jpg";
		theImages[3]="berlinPing.jpg";
		theImages[4]="berlinRussia.jpg";
		theImages[5]="berlinSaule.jpg";
		theImages[6]="berlinMarx.jpg";
		theImages[7]="berlinPergamon.jpg";
		theImages[8]="berlinReichstag.jpg";	
		theImages[9]="berlinIce.jpg";
		theImages[10]="berlinMill.jpg";	
		theImages[11]="berlinPlatz.jpg";	
		theImages[12]="berlinTrees.jpg";	
		theImages[13]="berlinHall.jpg";	
		theImages[14]="berlinTurm.jpg";	
		var randomNumber=(seeOptions('myPic')>-1 && seeOptions('myPic')!=true) ? seeOptions('myPic') : Math.floor(Math.random()*theImages.length);
		theHeader.style.background=seeOptions('backs')?"red url('images/banner/"+theImages[randomNumber]+"')":"red";
	}
	
	function createCookie(name,value,days) {
		  if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		  }
		  else expires = "";
		  document.cookie = name+"="+value+expires+"; path=/";
		}
		
	function readCookie(name) {
	  var nameEQ = name + "=";
	  var ca = document.cookie.split(';');
	  for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	  }
	  return null;
	}
	
	window.onload = function(e) {
	//  var cookie = readCookie("style");
	// var title = cookie ? cookie : getPreferredStyleSheet();
	//  setActiveStyleSheet(title);
	}
	
	window.onunload = function(e) {
	//  var title = getActiveStyleSheet();
	//  createCookie("style", title, 365);
	}
	
	function setOptions(theCookie,theValue) {
		createCookie(theCookie, theValue, 365);
	}
	
	function seeOptions(theCookie) {
		var cookie = readCookie(theCookie);
		cookie = cookie ? cookie : true;
		return cookie=="true" ? true : cookie=="false" ? false : cookie;
	}
