
// --- Start javascript code --- //
// Developed by Kasper digitale media - © 2010

// Please don't edit anything below apart from the indicated areas, recognizable by //--- edit below ---//
// What do you need to edit to add one page?

// 1. add a new case line to the code indicated below

// --- Main functionality of the script ---
// Load 2 background images based on the page currently loaded.
// This means every page defined in the script can have different background images.


// Function named 'gup' to get variable out of the url querystring, with name being the name of the variable.
// In this example name of variable is 'f', containing the page that is currently loaded (ex. index.htm)

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

// Function named 'whichpage', more detailed version, see below:
function whichpage()
{

// loads the gup function in order to get the currently loaded page out of the querystring (name with variable 'f')
var page = gup( 'f' );

// declare variables which will contain the images
var main_bg = null;

// switch - case, check which case is in order here and put the according data in the variable result.

switch (page) {
//--- edit below ---//

//--- enter possibilties, copy one line, then edit it. Last line is default line

//case 'index.htm': main_bg = 'men'; break;

case 'index.htm': main_bg = 'circles'; break;
case 'out_of_the_box.htm': main_bg = 'circles'; break;
case 'approach.htm': main_bg = 'chart'; break;
case 'universe.htm': main_bg = 'circles'; break;
case 'breakthrough.htm': main_bg = 'circles'; break;
//case 'breakthrough.htm': main_bg = 'pencil'; break;
case 'contact.htm': main_bg = 'circles'; break;
default: main_bg = 'circles'; 


//--- don't edit below this point ---//
}

// following code sets the css styles of the elements with id 'main_bg' and 'second_bg'
// CSS to be set: background-image, background-repeat and background-position

document.getElementById('main_bg').style.background = 'url(http://mindshake.kasper.be/accounts/121/images/pages/'+ main_bg +'.gif)';
document.getElementById('main_bg').style.backgroundRepeat = 'no-repeat';
document.getElementById('main_bg').style.backgroundPosition = '100% 100%';


// hide adress on contact page 
if (second_bg=='contact')
{
	document.getElementById('adress').style.display = 'none';
	document.getElementById('adress').style.visibility = 'hidden';
	}



}

// --- End Javascript code --- //