// JavaScript Document
// Code developed by Alynn McKenzie with help from a sample at http://clagnut.com/sandbox/imagefades and http://www.couloir.org

function fade() {
  imageId = 'gallery';
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeIn(imageId,0);
  window.setTimeout("sitetext()",400);
}

  
function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 10;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
    }
  }
}

function sitetext() {
	var title = new Array()
	title[0] = "$nbsp;";
	title[1] = "Osler Systems";
	title[2] = "Pearlman Lindholm, Barristors Solicitors";
	title[3] = "Caird Mechanical";
	title[4] = "SunShade Film Systems";
	title[5] = "Friends of St. Ann's Academy";
	title[6] = "Identia";
	title[7] = "Beacon Law, Lawyers and Notaries";
	
	var details = new Array()
	details[0] = "$nbsp;";
	details[1] = "Osler systems has developed software for the medical industry. The wanted a website that was professional and matched their current marketing theme. We used stock photos to appeal to medical staff and exude a practical, organized feeling.<br><br>We developed the site so that it would be easy for Osler staff to update the content and without disturbing the layout or navigation. Javascript was used to enable the different menus and navigation in the different areas of the site.";
	details[2] = "We started out by designing Pearlman Lindholm a logo, they wanted something professional, with a long-standing, sturdy feel.<br>From there, we designed a corporate website so viewers could learn a little more about each of the lawyers and the history of the firm. The images Pearlman Lindholm provided us were of the Shoal Point building that they recently moved into. They wanted a statuesque feel to the site and wanted to show off their new digs.";
	details[3] = "Caird Mechanical wanted an online company profile and portfolio. Using the company colours, we built a site with an industrial, mechanical theme. Viewers can apply for jobs online using the PHP application form and they can view the project gallery easily. We wanted a gallery that didn't take up too much space on the page and didn't require waiting for images to download so we programmed a javascript application to make a nice fading effect for the images.";
	details[4] = "When we first met, Sunshade had a logo design in mind, but needed it professionally designed. We took their concepts and redesigned the logo using Adobe Illustrator in vector graphics. <br><br>Next they needed a website to show samples of the work that they do and provide information about window film to potential clients. We built an attractive website that shows some samples of window films and Sunshade provided the content. We also included some demo videos in the security section to show how durable and secure a window can be with film.";
	details[5] = "Being a non-profit association, Friends of St. Ann's were on a limited budget, so we worked within their budget and designed an elegant website that they could manage themselves. Using Smart Dolphins Content Management system, they can keep their events and schedules up to date at their leisure. They can add graphics and text easily, without worrying about the main layout because it is locked into a template.";
	details[6] = "Identia was an online credit bureau for payday loan companies. This website was developed to provide payday loan companies with a way of checking if customers have defaulted or owe any of their competitors. They can  flag a customer, receive alerts if the customer trying to obtain money elsewhere or track a customer's address moves and loan activity. The site is a highly secure database system with a management area for Identia staff to manage the front-end user and company accounts.<br>Unfortunately, the project has been put on hold after 2/3 development was complete, but we will be putting up the site as a sample in the near future.";
	details[7] = "Beacon Law was looking to improve their online presence for their clients and prospects. Using some of the ideas from their original website we restructured the site for ease of use and search engine optimization. The site explains all the services that Beacon Law offers and has an excellent archive section for articles and newsletters that the lawyers have written.";
	
	var sitelink = new Array()
	sitelink[0] = "#";
	sitelink[1] = "http://www.oslersystems.com";
	sitelink[2] = "http://www.pearlmanlindholm.com";
	sitelink[3] = "http://www.cairdmechanical.ca";
	sitelink[4] = "http://www.sunshadewindowfilms.com";
	sitelink[5] = "http://www.friendsofstannsacademy.com";
	sitelink[6] = "#";
	sitelink[7] = "http://www.beaconlaw.ca";

	var technologies = new Array()
	technologies[0] = "#";
	technologies[1] = "HTML, Javascript, CSS, PHP";
	technologies[2] = "HTML, CSS";
	technologies[3] = "HTML, Javascript, CSS, PHP";
	technologies[4] = "HTML, CSS, Javascript";
	technologies[5] = "Smart Dolphins Content Management System, HTML, PHP, CSS";
	technologies[6] = "ASP, SQL, HTML, Flash, Javascript, CSS";
	technologies[7] = "HTML, DHTML, CSS, Javascript";
	
	document.getElementById('sitename').innerHTML = "<strong>" + title[number] + "</strong>"
	document.getElementById('sitedetails').innerHTML = details[number]+"<br><br><strong>Technologies used:</strong> "+technologies[number]
	document.getElementById('sitelink').href = sitelink[number]
	document.getElementById('gallery').alt = sitelink[number]
}


var number=0
function Next(fwd, count)
{
	var imageFile = new Array()
	imageFile[0] = "$nbsp;";
	imageFile[1] = "osler.jpg";
	imageFile[2] = "pearlman.jpg";
	imageFile[3] = "caird.jpg";
	imageFile[4] = "sunshade.jpg";
	imageFile[5] = "stanns.jpg";
	imageFile[6] = "identia.jpg";
	imageFile[7] = "beacon.jpg";

var imageamount = (imageFile.length - 1)
if (fwd==1) {number=(count)+1}
if (fwd==0) {number=(count)+(-1)}
if (number > (imageamount - 1)) {
document.getElementById("next").className="nolink"
number=(imageamount)
 }
if (number < imageamount) {
document.getElementById("next").className="link"
 }
if (number>1) {
document.getElementById("prev").className="link"
 }
if (number<2) {
document.getElementById("prev").className="nolink"
number=1
 }
document.gallery.src=
 ("images/portfolio/" + imageFile[number]
 )
 fade()
 document.getElementById('one').innerHTML = number
 document.getElementById('total').innerHTML = (imageFile.length -1)
}

