/************************************/
/*     JavaScript Document			*/
/*    Written by Jack Spargo		*/
/*  Hockley Spargo Design - 2009	*/
/************************************/


//		Set up Array for portfolio items
var portfolio = new Array();
//var porttext = new Array();
var portURL = new Array();
//var porttitle = new Array();
//var xmlDoc;



///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

// 		XML File Loader

	
/*if( window.ActiveXObject && /Win/.test(navigator.userAgent) )
	{
      xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
      xmlDoc.async = false;
      xmlDoc.load(xmlFile);
	}
   else
	{
		alert(Date());
      xmlDoc=document.implementation.createDocument("","",null);
	  xmlDoc.load(xmlFile);
	  xmlDoc.onload=alert("XML Loaded");
	}/*
	else
	{
		alert("error loading XML File");
	}
}*/

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//		Pre-cache thumbnail images

/*for(i=1; i<5; i++)
{
	var pfnum = new String();
	
	loadXML("portfolio/port.xml");
	
	pfnum = "pf" + i;
	
// If statement checks to see if the tag exists. If it doesn't, then a default entry for inage, text, title and link are set.

	if(xmlDoc.getElementsByTagName("item")[i-1] == null)
		{
			portfolio[pfnum] = new Image(100, 80)
			portfolio[pfnum].src = "portfolio/portfolio_empty.gif";
			porttext[pfnum] = " ";
			portURL[pfnum] = "#";
			porttitle[pfnum] = " ";
		}
	else
		{
			portfolio[pfnum] = new Image(100, 80)
			portfolio[pfnum].src = xmlDoc.getElementsByTagName("item")[i-1].getAttribute("source");
			porttext[pfnum] = xmlDoc.getElementsByTagName("item")[i-1].text;
			portURL[pfnum] = xmlDoc.getElementsByTagName("item")[i-1].getAttribute("URL");
			porttitle[pfnum] = xmlDoc.getElementsByTagName("item")[i-1].getAttribute("title");
		}
}*/

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//		Load an image from the new array


/*porttext['pf1'] = "A Flash-based interactive site delivering students information about the benefits of undertaking a placement as part of their degree course. <br /><br /><ul type=square>Features include: <br/><li>Intuitive navigation</li><li>Visually attractive display of detailed data</li><li>Variety in information: graphs, interview quotations and facts</li></ul>";
porttext['pf2'] = "Restaurant reviews submitted by customers visiting the city of Bath, Avon, UK.";
porttext['pf3'] = "Wide range of information relating to events, news and race schedules of this popular South East sailing club. Includes tide tables, weather updates and a members section. As well as photos section and fully web-based management of site content.";
porttext['pf4'] = "Football club team site - featuring league tables, fixtures, results and recent events including advertising pages.";
porttext['pf5'] = "For a free no-obligation quote fill out the form on our Contacts page and we will get back to you as soon as possible.";

porttitle['pf1'] = "University of Bath - <span style=\"font-size: 0.8em\">Placement Learning Support</span>";
porttitle['pf2'] = "Eating In Bath";
porttitle['pf3'] = "Harlow (Blackwater) Sailing Club";
porttitle['pf4'] = "Red Dwarf Football Club";
porttitle['pf5'] = "Your site coming soon...";*/


function loadImage(imgClick)
	{
		document.thumbnail.src = imgClick;
	}

//		Load a URL that will be navigated to in the 'onClick' event
	
function loadURL(URL)
	{
			window.open(URL, 'winport', ' ', ' ');
	}

	
