// JavaScript Document
// contentload.js, to be used to load content into top div of the Interactive South West Site
// Setup all project Text
var projectInfo = new Array()
var project1 = new Array()
var project2 = new Array()
var project3 = new Array()
var project4 = new Array()
var project5 = new Array()
var project6 = new Array()
var project7 = new Array()
var project8 = new Array()
var project9 = new Array()
var project10 = new Array()
var project11 = new Array()
var project12 = new Array()
//
project1["title"] = "My World"
project1["company"] = "Available Light"
project1["comment"] = "\"creative, technical and educational capabilities\""
project1["linkURL"] = "profiles/availableLight_1_1.htm"
project1["picture"] = "1_myWorld.gif"
//
project2["title"] = "Virtual Eden"
project2["company"] = "Motiongrafik"
project2["comment"] = "\"Dramatic panoramic photography in the biomes...\""
project2["linkURL"] = "profiles/motiongrafik_2_1.htm"
project2["picture"] = "2_eden.jpg"
//
project3["title"] = "St Austell"
project3["company"] = "Preconstruct"
project3["comment"] = "\"high quality and competitive pricing\""
project3["linkURL"] = "profiles/preconstruct_3_1.htm"
project3["picture"] = "3_preconstruct.jpg"
//
project4["title"] = "Demgames"
project4["company"] = "Delib"
project4["comment"] = "\"by far and away the 'sexiest' thing I've seen\""
project4["linkURL"] = "profiles/delib_4_1.htm"
project4["picture"] = "4_teamrubber.gif"
//
project5["title"] = "SE3D Showcase"
project5["company"] = "Watershed, HP, Alias"
project5["comment"] = "\"cutting edge research ... a unique competitive advantage\""
project5["linkURL"] = "profiles/se3d_5_1.htm"
project5["picture"] = "5_se3d.jpg"
//
project6["title"] = "Electric Pavilion"
project6["company"] = "Enable Interactive, Submerge"
project6["comment"] = "\"A fusion of community, creativity and technology\""
project6["linkURL"] = "profiles/enable_6_1.htm"
project6["picture"] = "6_enable.jpg"
//
project7["title"] = "Hyperfabric"
project7["company"] = "HMC"
project7["comment"] = "\"a new interface that lets you reach beyond the screen...\""
project7["linkURL"] = "profiles/hmc_7_1.htm"
project7["picture"] = "7_hmc.jpg"
//
project8["title"] = "TONI&GUY"
project8["company"] = "e3 media"
project8["comment"] = "\"the forefront of technology\""
project8["linkURL"] = "profiles/e3media_8_1.htm"
project8["picture"] = "8_TG.jpg"
//
project9["title"] = "Volkswagen UK"
project9["company"] = "Twofour Digital"
project9["comment"] = "\"...a very time-efficient way of bringing me up to speed\""
project9["linkURL"] = "profiles/twofour_9_1.htm"
project9["picture"] = "9_24.jpg"
//
project10["title"] = "Christmas Time uk"
project10["company"] = "Neutralize"
project10["comment"] = "\"strong sales growth and a much more efficient use of our CPC budget\""
project10["linkURL"] = "profiles/neutralize_11_1.htm"
project10["picture"] = "11_neutrilize.jpg"
//
project11["title"] = "Interactive Software"
project11["company"] = "Coull Tv"
project11["comment"] = "\"Quote to come\""
project11["linkURL"] = "profiles/"
project11["picture"] = ""
//
project12["title"] = "Aqua Sana"
project12["company"] = "REDWEB"
project12["comment"] = "\"...respectfully translated our natural brand values to the internet\""
project12["linkURL"] = "profiles/redweb_10_1.htm"
project12["picture"] = "10_redweb.jpg"
//
projectInfo[0] = project1
projectInfo[1] = project2
projectInfo[2] = project3
projectInfo[3] = project4
projectInfo[4] = project5
projectInfo[5] = project6
projectInfo[6] = project7
projectInfo[7] = project8
projectInfo[8] = project9
projectInfo[9] = project10
projectInfo[10] = project11
projectInfo[11] = project12

// randomise project
function randomiseProjects(projectArray){
  var i = projectArray.length;
  if ( i == 0 ) return false;
  while ( --i ) {
     var j = Math.floor( Math.random() * ( i + 1 ) );
     var tempi = projectArray[i];
     var tempj = projectArray[j];
     projectArray[i] = tempj;
     projectArray[j] = tempi;
   }
}
randomiseProjects(projectInfo)

// initalise random project and add elements
function addProject(whatPos){
	var myProject = projectInfo[whatPos-1]
	var elementName = "projectBox" + (whatPos)
	var myImage = "images/projectimage/" + myProject["picture"]
	document.getElementById(elementName).childNodes[3].childNodes[1].firstChild.setAttribute('src',myImage)
	document.getElementById(elementName).childNodes[3].childNodes[3].childNodes[1].firstChild.nodeValue = myProject["title"]
	document.getElementById(elementName).childNodes[3].childNodes[3].childNodes[3].firstChild.nodeValue = myProject["company"]
	document.getElementById(elementName).childNodes[3].childNodes[3].childNodes[5].firstChild.nodeValue = myProject["comment"]
	document.getElementById(elementName).childNodes[3].childNodes[3].childNodes[7].setAttribute('href', myProject["linkURL"])
}