function Get_Cookie( name ) {
	
var start = document.cookie.indexOf( name + "=" );
var len = start + name.length + 1;
if ( ( !start ) &&
( name != document.cookie.substring( 0, name.length ) ) )
{
return null;
}
if ( start == -1 ) return null;
var end = document.cookie.indexOf( ";", len );
if ( end == -1 ) end = document.cookie.length;
return unescape( document.cookie.substring( len, end ) );
}


function Set_Cookie( name, value, expires, path, domain, secure ) 
{
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct 
expires time, the current script below will set 
it for x number of days, to make it for hours, 
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60;
//expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
( ( path ) ? ";path=" + path : "" ) + 
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}

function Change_Theme(value)
{
    Set_Cookie("theme", value, 1, '/', '', '');

    if(value == 'symbols') day = 0;
    if(value == 'galaxy') day = 1;
    if(value == 'flowers') day = 2;
    if(value == 'nature') day = 3;
    if(value == 'happy') day = 4;
    if(value == 'person') day = 5;
    if(value == 'abstract') day = 6;
    if(value == 'todays') day = today.getDay();

    theme = the[day];
    fname = the[day];
    theight = themeheight[day];
    twidth = themewidth[day];
	//pheight = picheight[day];
	//pwidth = picwidth[day];

    //window.location.reload();
    if(value != 'person')
	{
      map = 'personmap';
	  pwidth = 125;
	  pheight = 85;
	} 
    else
	{
      map = 'mainmap';
	  pwidth = 128;
	  pheight = 100;
	}  

    for(i = 1; i < 13;i++)
	{
	  x = 100+i;
	  xs = x + "";
	  xs = xs.substr(1,2);
	  ////document.getElementById('main'+xs).innerHTML = "<img src='images/" + theme  + "/" + theme + xs + ".jpg' width=" + pwidth + " height=" + pheight + " alt='Pictures of " + theme+ "' style='border-style:none' />";
	}  
    //document.getElementById('logoimage').innerHTML = "<img src=/images/main/" + lname + " height=" + lheight + " width=" + lwidth + " border=0 alt='" + ltext + "'>";
    Change_ThemeString(value);
	window.location.reload();
}

function Change_ThemeString(worktheme)
{
  todayhref = "<a class=nolink href=javascript:Change_Theme('todays');>";
  symbolhref = "<a class=nolink href=javascript:Change_Theme('symbols');>";
  galaxyhref = "<a class=nolink href=javascript:Change_Theme('galaxy');>";
  flowerhref = "<a class=nolink href=javascript:Change_Theme('flowers');>";
  naturehref = "<a class=nolink href=javascript:Change_Theme('nature');>";
  happyhref = "<a class=nolink href=javascript:Change_Theme('happy');>";
  personhref = "<a class=nolink href=javascript:Change_Theme('person');>";
  abstracthref = "<a class=nolink href=javascript:Change_Theme('abstract');>";

  todayhrefe = "</a>";
  symbolhrefe = "</a>";
  galaxyhrefe = "</a>";
  flowerhrefe = "</a>";
  naturehrefe = "</a>";
  happyhrefe = "</a>";
  personhrefe = "</a>";
  abstracthrefe = "</a>";

  todayimg = "tab_todays.gif";
  symbolimg = "tab_symbols.gif";
  galaxyimg = "tab_universe.gif";
  flowerimg = "tab_flowers.gif";
  natureimg = "tab_nature.gif";
  happyimg = "tab_children.gif";
  personimg = "tab_persons.gif";
  abstractimg = "tab_abstract.gif";


  if (worktheme != null)
   {
     if(worktheme == 'symbols'){symbolhref = ""; symbolhrefe = ""; symbolimg = "tabs_symbols.gif";}
     if(worktheme == 'galaxy'){galaxyhref = ""; galaxyhrefe = ""; galaxyimg = "tabs_universe.gif";}
     if(worktheme == 'flowers'){flowerhref = ""; flowerhrefe = ""; flowerimg = "tabs_flowers.gif";}
     if(worktheme == 'nature'){naturehref = ""; naturehrefe = ""; natureimg = "tabs_nature.gif";}
     if(worktheme == 'happy'){happyhref = ""; happyhrefe = ""; happyimg = "tabs_children.gif";}
     if(worktheme == 'person'){personhref = ""; personhrefe = ""; personimg = "tabs_persons.gif";}
     if(worktheme == 'abstract'){abstracthref = ""; abstracthrefe = ""; abstractimg = "tabs_abstract.gif";}
   }

   document.getElementById('themestring').innerHTML = 
            "<span class=smallfont>Theme: " + symbolhref + "Symbols" + symbolhrefe + "&nbsp;" + galaxyhref + "Universe" + galaxyhrefe + "&nbsp;" + flowerhref + "Flowers" + flowerhrefe + "&nbsp;" + naturehref + "Nature" + naturehrefe + "&nbsp;" + happyhref + "Children" + happyhrefe + "&nbsp;" + personhref + "Persons" + personhrefe + "&nbsp;" + abstracthref + "Abstract" + abstracthrefe +
            "&nbsp;&nbsp;";
}

 
theme = "symbols";
fname = "symbols";

today = new Date();
hr = today.getHours();
hr++;

th = new Array(24);

th[01] = "symbols";
th[02] = "flowers";
th[03] = "galaxy";
th[04] = "symbols";
th[05] = "nature";
th[06] = "happy";
th[07] = "symbols";
th[08] = "flowers";
th[09] = "galaxy";
th[10] = "symbols";
th[11] = "nature";
th[12] = "happy";
th[13] = "symbols";
th[14] = "flowers";
th[15] = "galaxy";
th[16] = "symbols";
th[17] = "nature";
th[18] = "happy";
th[19] = "symbols";
th[20] = "flowers";
th[21] = "galaxy";
th[22] = "symbols";
th[23] = "nature";
th[24] = "happy";

theme = th[hr];
fname = th[hr];

day = today.getDay();

the = new Array(7);
themeheight = new Array(7);
themewidth = new Array(7);

the[0] = "symbols";
the[1] = "galaxy";
the[2] = "flowers";
the[3] = "nature";
the[4] = "happy";
the[5] = "person";
the[6] = "abstract";

themewidth[0] = 591;
themewidth[1] = 591;
themewidth[2] = 591;
themewidth[3] = 591;
themewidth[4] = 591;
themewidth[5] = 591;
themewidth[6] = 591;

themeheight[0] = 311;
themeheight[1] = 311;
themeheight[2] = 311;
themeheight[3] = 311;
themeheight[4] = 311;
themeheight[5] = 356;
themeheight[6] = 311;

cookietheme = Get_Cookie("theme");

if (cookietheme != null)
 {
   if(cookietheme == 'symbols') day = 0;
   if(cookietheme == 'galaxy') day = 1;
   if(cookietheme == 'flowers') day = 2;
   if(cookietheme == 'nature') day = 3;
   if(cookietheme == 'happy') day = 4;
   if(cookietheme == 'person') day = 5;
   if(cookietheme == 'abstract') day = 6;
 }
else
 {
   if(day == 0)cookietheme = 'symbols';
   if(day == 1)cookietheme = 'galaxy';
   if(day == 2)cookietheme = 'flowers';
   if(day == 3)cookietheme = 'nature';
   if(day == 4)cookietheme = 'happy';
   if(day == 5)cookietheme = 'person';
   if(day == 6)cookietheme = 'abstract';
 }

theme = the[day];
fname = the[day];
theight = themeheight[day];
twidth = themewidth[day];

img = new Array(12);

img[01] = "images/" + theme + "/" + fname + "01.jpg";
img[02] = "images/" + theme + "/" + fname + "02.jpg";
img[03] = "images/" + theme + "/" + fname + "03.jpg";
img[04] = "images/" + theme + "/" + fname + "04.jpg";
img[05] = "images/" + theme + "/" + fname + "05.jpg";
img[06] = "images/" + theme + "/" + fname + "06.jpg";
img[07] = "images/" + theme + "/" + fname + "07.jpg";
img[08] = "images/" + theme + "/" + fname + "08.jpg";
img[09] = "images/" + theme + "/" + fname + "09.jpg";
img[10] = "images/" + theme + "/" + fname + "10.jpg";
img[11] = "images/" + theme + "/" + fname + "11.jpg";
img[12] = "images/" + theme + "/" + fname + "12.jpg";

         pwidth=125;
		 pheight=85;

       if(theme == 'person')
	   {
         pwidth=128;
		 pheight=100;
	   }	 

