<!--
imageDir = "http://www.artek-design-house.co.uk/images/";
function on(img)
{
 if (!document.images) return;
 document.images[img].src = imageDir+"butnroll1.jpg";
 setTimeout ('document.images["'+img+'"].src = "'+imageDir+'butnroll2.jpg";', 50);
 setTimeout ('document.images["'+img+'"].src = "'+imageDir+'butnroll3.jpg";', 100);
 setTimeout ('document.images["'+img+'"].src = "'+imageDir+'butnroll4.jpg";', 150);
 setTimeout ('document.images["'+img+'"].src = "'+imageDir+''+img+'_over.jpg";', 200);
}
function off(img)
{
 if (!document.images) return;
 document.images[img].src = imageDir+"butnroll4.jpg";
 setTimeout ('document.images["'+img+'"].src = "'+imageDir+'butnroll3.jpg";', 50);
 setTimeout ('document.images["'+img+'"].src = "'+imageDir+'butnroll2.jpg";', 100);
 setTimeout ('document.images["'+img+'"].src = "'+imageDir+'butnroll1.jpg";', 150);
 setTimeout ('document.images["'+img+'"].src = "'+imageDir+img+'_default.jpg";', 200);
}

var imgslist = new Array(
imageDir+"butnroll1.jpg",
imageDir+"butnroll2.jpg",
imageDir+"butnroll3.jpg",
imageDir+"butnroll4.jpg",
imageDir+"button1_over.jpg",
imageDir+"button2_over.jpg",
imageDir+"button3_over.jpg",
imageDir+"button4a_over.jpg",
imageDir+"button5_over.jpg",
imageDir+"button6_over.jpg",
imageDir+"button7_over.jpg"
);
var imgs=new Array();
if (document.images)
 for (x=0; x<imgslist.length; x++)
  {imgs[x]=new Image(); imgs[x].src = imgslist[x];}

/* change function:
Changes the text below the Artek logo, top right.
over is a boolean: true for mouseover, false for mouseout - only necessary to use change(false) on mouseout.
html is the html to change to.
*/
function change(over,html){
  if (html == null || html == 'undefined') {
    html = 'D&nbsp;e&nbsp;s&nbsp;i&nbsp;g&nbsp;n&nbsp;&nbsp;&nbsp;&nbsp;H&nbsp;o&nbsp;u&nbsp;s&nbsp;e&nbsp;&nbsp;&nbsp;&nbsp;L&nbsp;t&nbsp;d.';
  }
  var desc = document.getElementById('description2');
  //alert(desc.innerHTML);
  if (over) {
  	changeClass('swap','description2','text14bigrey','text12bigrey');
  	desc.innerHTML=html;
  } else {
  	changeClass('swap','description2','text12bigrey','text14bigrey');
  	html = 'D&nbsp;e&nbsp;s&nbsp;i&nbsp;g&nbsp;n&nbsp;&nbsp;&nbsp;&nbsp;H&nbsp;o&nbsp;u&nbsp;s&nbsp;e&nbsp;&nbsp;&nbsp;&nbsp;L&nbsp;t&nbsp;d.';
  	desc.innerHTML=html;
  }
}

/* change1 function:
Changes the text at the top of the box in the Contact page.
html is the html to change to.
*/
function change1(html){
  if (html == null || html == 'undefined') {
    html = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Place your mouse over each box for guidance.';
  }
  var desc = document.getElementById('contactText');
  //alert(desc.innerHTML);
  desc.innerHTML='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;' + html;
  /*if (over) {
  	desc.innerHTML='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.html;
  } else {
  	//if (html == 'Design House Ltd.') 
  	html = '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Place your mouse over each box for guidance.';
  	desc.innerHTML=html;
  }*/
}

function changeHtml(el, html){
  var desc = document.getElementById(el);
  //alert(desc.innerHTML);
  desc.innerHTML=html;
}

/* changeClass function:

a - defines the action you want the function to perform.
o - the object in question.
c1 - the name of the first class
c2 - the name of the second class

Possible actions are:

swap - replaces class c1 with class c2 in object o.
add - adds class c1 to the object o.
remove - removes class c1 from the object o.
check - test if class c1 is already applied to object o and returns true or false. 
*/
function changeClass(a,obj,c1,c2)
{
  var o = document.getElementById(obj);
  //if (a == 'swap') alert(o.innerHTML);
  switch (a){
    case 'swap':
      o.className=!changeClass('check',obj,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);
    break;
    case 'add':
      if(!changeClass('check',obj,c1)){o.className+=o.className?' '+c1:c1;}
    break;
    case 'remove':
      var rep=o.className.match(' '+c1)?' '+c1:c1;
      o.className=o.className.replace(rep,'');
    break;
    case 'check':
      //alert(new RegExp('\\b'+c1+'\\b').test(o.className));
      return new RegExp('\\b'+c1+'\\b').test(o.className);
    break;
  }
  return;
}
//-->


