// JavaScript Document


function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")





function positionBG(){
    var Element = document.getElementById("backgroundBottom"); 
	var divh = 292 ; //Element.offsetHeight;
	var divw = 380;
	
	
	var viewportwidth;
 	var viewportheight;
 
 	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
 //alert(window.innerHeight)
 	if (typeof window.innerWidth != 'undefined')
 	{
      	viewportwidth = window.innerWidth,
      	viewportheight = window.innerHeight
 	}
 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

 	else if (typeof document.documentElement != 'undefined'
     	&& typeof document.documentElement.clientWidth !=
     	'undefined' && document.documentElement.clientWidth != 0)
 	{
       	viewportwidth = document.documentElement.clientWidth,
       	viewportheight = document.documentElement.clientHeight
 	}
 
 	// older versions of IE
 
	else
 	{
       viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
       viewportheight = document.getElementsByTagName('body')[0].clientHeight
 	}

	
	
	var PageSizeWithScroll = getPageSizeWithScroll() - divh;
	//var PageSizeWithScroll = viewportheight - divh;
	
	document.getElementById("backgroundBottom").style.top = PageSizeWithScroll + "px";
	//document.getElementById("backgroundBottom").style.bottom = 0;

	//alert (PageSizeWithScroll);
}


function getPageSizeWithScroll(){	

	//alert(document.documentElement.offsetHeight);
	
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yWithScroll = document.body.scrollHeight;
		xWithScroll = document.body.scrollWidth;
		
	} else if (document.documentElement.scrollHeight > document.body.offsetHeight){ // ie8??
		yWithScroll = document.documentElement.scrollHeight;
		xWithScroll = document.documentElement.scrollWidth;
		
	} else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		yWithScroll = document.body.offsetHeight;
		xWithScroll = document.body.offsetWidth;
	}	
	
	arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	//alert( 'The height is ' + yWithScroll + ' and the width is ' + xWithScroll );	
	return yWithScroll; //arrayPageSizeWithScroll;
}



function ChangeTeam(id)
{

switch (id)
  {
	//main menu  	
    case '1': case "": { 
	document.getElementById("text").innerHTML="<span class='bodycopy'>Gillly is the owner and lead designer at Koubou Interiors. She trained at the Regent Academy in London graduating with distinction. Prior to fulfilling her dream of running an interior design company, she studied fashion and design. Before that, she was travelling the world during a 20 year career with British Airways, where the importance of consistent high standards of quality and customer service were instilled.<br /> It is these values that are the heart of Koubou Interiors. Her travels also gave her an insight an understanding of the designs, culture, history and architecture of different countries.<br /> Gilly believes that the time spent getting to know and understand her clients enables her to focus on each design.</span>"; 
	
	
	document.getElementById("teamtitle").src = "images/headings/meetgilly.png";
	document.getElementById("teamtitle").alt = "Meet Gilly";
	
	document.getElementById("Gilly").style.fontWeight = "bold";
	document.getElementById("Rick").style.fontWeight = "normal";
	document.getElementById("Beckie").style.fontWeight = "normal";
	document.getElementById("LouiseC").style.fontWeight = "normal";
	document.getElementById("LouiseL").style.fontWeight = "normal";
	document.getElementById("Pam").style.fontWeight = "normal";
	document.getElementById("Lauren").style.fontWeight = "normal";
	
	
	//document.getElementById("Martin").className = "bodycopy";
	//document.getElementById("Sarnie").className = "bodycopy";
	//document.getElementById("TeamID").value="Linda";
	break; 
	}
		
    case '2': { 
	document.getElementById("text").innerHTML="Rick is co-director with Gilly"; 
	
	document.getElementById("teamtitle").src = "images/headings/meetrick.png";
	document.getElementById("teamtitle").alt = "Meet Rick";
	
	document.getElementById("Gilly").style.fontWeight = "normal";
	document.getElementById("Rick").style.fontWeight = "bold";
	document.getElementById("Beckie").style.fontWeight = "normal";
	document.getElementById("LouiseC").style.fontWeight = "normal";
	document.getElementById("LouiseL").style.fontWeight = "normal";
	document.getElementById("Pam").style.fontWeight = "normal";
	document.getElementById("Lauren").style.fontWeight = "normal";
	break;
	}
    
	case '3': { 
	document.getElementById("text").innerHTML="Beckie came to Koubou Interiors for a 2 week work placement whilst studying for her degree, following this she joined Koubou full time in June 2010 after graduating from the University for the Creative Arts in Farnham with a BA (Hons) degree in Interior Architecture and Design.<br><br>During her time at university she grew a keen interest in commercial and residential design, the course enabled Beckie to gain a sound understanding of the cultural context of architecture and design and how to blend the best of traditional design with the elegance of contemporary trends. She also gained a working knowledge of materials technology and the skills needed to create innovative and stylish environments."; 
	
	document.getElementById("teamtitle").src = "images/headings/meetbeckie.png";
	document.getElementById("teamtitle").alt = "Meet Beckie";
	
	document.getElementById("Gilly").style.fontWeight = "normal";
	document.getElementById("Rick").style.fontWeight = "normal";
	document.getElementById("Beckie").style.fontWeight = "bold";
	document.getElementById("LouiseC").style.fontWeight = "normal";
	document.getElementById("LouiseL").style.fontWeight = "normal";
	document.getElementById("Pam").style.fontWeight = "normal";
	document.getElementById("Lauren").style.fontWeight = "normal";

	break;
	}
	
	case '4': { 
	document.getElementById("text").innerHTML="Louise joined Koubou Interiors in June 2008 as a design assistant, having completed her Level one City and Guilds Design course in May 2008. Louise’s career has predominantely been with major corporatecompanies having worked for British Telecom, British Airways and Dell.<br><br>Louise hopes that her strong background in Customer Service, Project Management and Event Planning will be invaluable when assisting the lead designers with all aspects of customer projects. The transition to Interior Design coincided with Louise taking time out from the corporate world to focus on being a full time mum. Louise has a passion for learning and in 2010 Louise successfully completed her National Design Academy Diploma in Professional Interior Design."; 
	
	document.getElementById("teamtitle").src = "images/headings/meetlouise.png";
	document.getElementById("teamtitle").alt = "Meet Louise";
	
	document.getElementById("Gilly").style.fontWeight = "normal";
	document.getElementById("Rick").style.fontWeight = "normal";
	document.getElementById("Beckie").style.fontWeight = "normal";
	document.getElementById("LouiseC").style.fontWeight = "bold";
	document.getElementById("LouiseL").style.fontWeight = "normal";
	document.getElementById("Pam").style.fontWeight = "normal";
	document.getElementById("Lauren").style.fontWeight = "normal";
	
	break;
	}
	
	case '5': { 
	document.getElementById("text").innerHTML="Louise joined Koubou interiors in September 2010, she joined Koubou as a Design Assistant after graduating From the University of the Creative arts in Surrey with a BA honours degree in Interior Architecture and design.<br><br>During her time at university her passion for both residential and commercial design grew allowing her to develop the key skills needed to design and develop a project from start to finish whilst working along side a client’s brief.  Since graduating she is keen to widen her product knowledge and improve the essential design skills she has learnt in order to develop and grow as a designer."; 
	
	document.getElementById("teamtitle").src = "images/headings/meetlouise.png";
	document.getElementById("teamtitle").alt = "Meet Louise";
	
	document.getElementById("Gilly").style.fontWeight = "normal";
	document.getElementById("Rick").style.fontWeight = "normal";
	document.getElementById("Beckie").style.fontWeight = "normal";
	document.getElementById("LouiseC").style.fontWeight = "normal";
	document.getElementById("LouiseL").style.fontWeight = "bold";
	document.getElementById("Pam").style.fontWeight = "normal";
	document.getElementById("Lauren").style.fontWeight = "normal";

	break;
	}
	
	case '6': { 
	document.getElementById("text").innerHTML="Following a successful career in electronic sales Pam followed her passion and retrained at the Reading College of Art and Design qualifying in The Regent Academy City and Guilds 7819 Interior Design Certificate and NVQ 2/3 Certificate. Additional courses taken were: Feng Shui with William Spear at the Regent College, London; Decorative Paint effects and furniture painting with Annie Sloan, Witney; Effective curtain designs and treatments with Lady Caroline Wrey, London and Soft Furnishing Designs at The National Design Academy, Nottingham. Pam gained project management experience while working for 5 years as a Design Assistant with a local residential interior design company."; 
	
	document.getElementById("teamtitle").src = "images/headings/meetpam.png";
	document.getElementById("teamtitle").alt = "Meet Pam";
	
	document.getElementById("Gilly").style.fontWeight = "normal";
	document.getElementById("Rick").style.fontWeight = "normal";
	document.getElementById("Beckie").style.fontWeight = "normal";
	document.getElementById("LouiseC").style.fontWeight = "normal";
	document.getElementById("LouiseL").style.fontWeight = "normal";
	document.getElementById("Pam").style.fontWeight = "bold";
	document.getElementById("Lauren").style.fontWeight = "normal";

	break;
	}
	
	case '7': { 
	document.getElementById("text").innerHTML="Lauren came to Koubou Interiors for a work placement after graduating from The Arts University College at Bournemouth, with a BA (Hons) degree in Interior Architecture and Design; before joining in February 2011 as a Design Assistant. During her years of study she had the opportunity to engage in all areas of design and has had experience of both commercial and residential projects.<br><br>Growing up with a creative background, design has always been an ambition. She believes you need to have a conscious approach to be a designer; the more you experience, the more resources you can collect and use as inspiration. Also building up a relationship of trust with the client and in-depth research is critical to the success of any project. Lauren’s main goal is to work closely with the rest of the team to create designs that give a lasting impression and unique user experience, that demonstrate a strong sense of spatial awareness and eye for detail."; 
	
	document.getElementById("teamtitle").src = "images/headings/meetlauren.png";
	document.getElementById("teamtitle").alt = "Meet Lauren";
	
	document.getElementById("Gilly").style.fontWeight = "normal";
	document.getElementById("Rick").style.fontWeight = "normal";
	document.getElementById("Beckie").style.fontWeight = "normal";
	document.getElementById("LouiseC").style.fontWeight = "normal";
	document.getElementById("LouiseL").style.fontWeight = "normal";
	document.getElementById("Pam").style.fontWeight = "normal";
	document.getElementById("Lauren").style.fontWeight = "bold";

	break;
	}

  }

}



function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_showHideLayers() { //v9.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) 
  with (document) if (getElementById && ((obj=getElementById(args[i]))!=null)) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
