
	/************************************************************************************************************
	(C) Shunevych Oleh, Fabruary 2009
	
	************************************************************************************************************/	

//here we creat object and put them into memory
  


var i_strngth=0;
var i_image=0;

//##############################-- ready text for main presentation
var text1="<a href='/projects/'><br/><strong> Cardinal Health <br /> ORwell </strong> <br /> &gt; see case study </a>";
var text2="<a href='/projects/'><br/><strong> Adamo by DELL </strong> <br /> &gt; see case study </a>";
var text3="<a href='/pdf/Perkins_Brailler_CaseStudy_100608.pdf' target='_blank'><br/><strong> Perkins Next Generation Braille Writer </strong> <br /> &gt; see case study </a>";
var text4="<a href='/projects/'><br /><strong>Countax Tractor</strong><br /> &gt; see portfolio project </a>";
var text5="<a href='/projects/'><br /><strong>Firefly flyPhone</strong><br /> &gt; see portfolio project </a>";
var text6="<a href='/casestudies3/'><br /><strong>Fellowes Jupiter Laminator</strong><br /> &gt; see case study </a>";
var text7="<a href='/casestudies2/'><br /><strong>NVTi 5000/6000 <br /> Series Camera </strong><br /> &gt; see case study </a>";
var text8="<a href='/casestudies4/'><br /><strong>Globalstar GSP 1700 <br /> Satellite Phone </strong><br /> &gt; see case study </a>";
var text9="<a href='/casestudies6/'><br /><strong>Bretford Flat Panel <br /> Display Mounting Stand </strong><br /> &gt; see case study </a>";
var text10="<a href='/casestudies7/'><br /><strong>Swingline Optima Staplers </strong><br /> &gt; see case study </a>";
var text11="<a href='/casestudies8/'><br /><strong>UC Davis Health Systems <br /> Swallow Enhancement Device </strong><br /> &gt; see case study </a>";



//##############################-- preload images for main presentation
sandra0 = new Image();
sandra0.src = "img/homepage/feature/1_ORwell.gif";

sandra1 = new Image();
sandra1.src = "img/homepage/feature/2_adamo.gif";

sandra2 = new Image();
sandra2.src = "img/homepage/feature/3_perkins.gif";

sandra3 = new Image();
sandra3.src = "img/homepage/feature/5_countax.gif"; 

sandra4 = new Image();
sandra4.src = "img/homepage/feature/6_firefly.gif";  

sandra5 = new Image();
sandra5.src = "img/homepage/feature/7_fellowes-laminator.gif";  

sandra6 = new Image();
sandra6.src = "img/homepage/feature/8_nvti-camera.gif";  

sandra7 = new Image();
sandra7.src = "img/homepage/feature/9_globalstar.gif";  

sandra8 = new Image();
sandra8.src = "img/homepage/feature/10_bretford.gif";  

sandra9 = new Image();
sandra9.src = "img/homepage/feature/11_swingline.gif"; 

sandra10 = new Image();
sandra10.src = "img/homepage/feature/12_uc_davis.gif"; 

var imageurl = new Array()
imageurl[0] ="img/homepage/feature/1_ORwell.gif"
imageurl[1] ="img/homepage/feature/2_adamo.gif"
imageurl[2] ="img/homepage/feature/3_perkins.gif"
imageurl[3] ="img/homepage/feature/5_countax.gif"
imageurl[4] ="img/homepage/feature/6_firefly.gif"
imageurl[5] ="img/homepage/feature/7_fellowes-laminator.gif"
imageurl[6] ="img/homepage/feature/8_nvti-camera.gif"
imageurl[7] ="img/homepage/feature/9_globalstar.gif"
imageurl[8] ="img/homepage/feature/10_bretford.gif"
imageurl[9] ="img/homepage/feature/11_swingline.gif"
imageurl[10] ="img/homepage/feature/12_uc_davis.gif"

//##############################-- preload images for short thumbnails slideshow
thumbnails0 = new Image();
thumbnails0.src = "img/homepage/discipline_thumbs/strategy.jpg";

thumbnails1 = new Image();
thumbnails1.src = "img/homepage/discipline_thumbs/research.jpg";

thumbnails2 = new Image();
thumbnails2.src = "img/homepage/discipline_thumbs/design.jpg";

thumbnails3 = new Image();
thumbnails3.src = "img/homepage/discipline_thumbs/userexperience.jpg";

thumbnails4 = new Image();
thumbnails4.src = "img/homepage/discipline_thumbs/mechanicalengineering.jpg";

thumbnails5 = new Image();
thumbnails5.src = "img/homepage/discipline_thumbs/prototyping.jpg";

thumbnails6 = new Image();
thumbnails6.src = "img/homepage/discipline_thumbs/elec_and_software.jpg";

thumbnails7 = new Image();
thumbnails7.src = "img/homepage/discipline_thumbs/laserscanning.jpg";

thumbnails8 = new Image();
thumbnails8.src = "img/homepage/discipline_thumbs/qualityassurance.jpg";

thumbnails9 = new Image();
thumbnails9.src = "img/homepage/discipline_thumbs/tooling.jpg";

thumbnails10 = new Image();
thumbnails10.src = "img/homepage/discipline_thumbs/production.jpg";

thumbnails11 = new Image();
thumbnails11.src = "img/homepage/discipline_thumbs/asiansourcing.jpg";

var thumbnailsurl = new Array()
thumbnailsurl[0] ="img/homepage/discipline_thumbs/strategy.jpg"
thumbnailsurl[1] ="img/homepage/discipline_thumbs/research.jpg"
thumbnailsurl[2] ="img/homepage/discipline_thumbs/design.jpg"
thumbnailsurl[3] ="img/homepage/discipline_thumbs/userexperience.jpg"
thumbnailsurl[4] ="img/homepage/discipline_thumbs/mechanicalengineering.jpg"
thumbnailsurl[5] ="img/homepage/discipline_thumbs/prototyping.jpg"
thumbnailsurl[6] ="img/homepage/discipline_thumbs/elec_and_software.jpg"
thumbnailsurl[7] ="img/homepage/discipline_thumbs/laserscanning.jpg"
thumbnailsurl[8] ="img/homepage/discipline_thumbs/qualityassurance.jpg"
thumbnailsurl[9] ="img/homepage/discipline_thumbs/tooling.jpg"
thumbnailsurl[10] ="img/homepage/discipline_thumbs/production.jpg"
thumbnailsurl[11] ="img/homepage/discipline_thumbs/asiansourcing.jpg"



//###################-- slideshow on main page(show images)
function showimage() {		

if (i_strngth <100) {
	var current_img="<img style='filter:alpha(opacity="+i_strngth+");-moz-opacity:."+i_strngth+";opacity:."+i_strngth+";' src="+imageurl[i_image]+" border=0>";

		    if (i_image == 0) document.getElementById('testimage').innerHTML = current_img+text1;
			if (i_image == 1) document.getElementById('testimage').innerHTML = current_img+text2;
			if (i_image == 2) document.getElementById('testimage').innerHTML = current_img+text3;
			if (i_image == 3) document.getElementById('testimage').innerHTML = current_img+text4; 
			if (i_image == 4) document.getElementById('testimage').innerHTML = current_img+text5; 
			if (i_image == 5) document.getElementById('testimage').innerHTML = current_img+text6; 
			if (i_image == 6) document.getElementById('testimage').innerHTML = current_img+text7; 
			if (i_image == 7) document.getElementById('testimage').innerHTML = current_img+text8; 
			if (i_image == 8) document.getElementById('testimage').innerHTML = current_img+text9; 
			if (i_image == 9) document.getElementById('testimage').innerHTML = current_img+text10; 
			if (i_image == 10) document.getElementById('testimage').innerHTML = current_img+text11; 
			if (i_image == 11) document.getElementById('testimage').innerHTML = current_img+text12;
			
			i_strngth=i_strngth+10; 
			var timer=setTimeout("showimage()",100);
		}	
		else {
   		    i_strngth=99;
			clearTimeout(timer);
			var timer=setTimeout("hideimage()",6000); // time in top period
		}
	
}

//###################-- slideshow on main page(hide images)
function hideimage() {
	if (i_strngth >10 ) {
	  document.getElementById('testimage').innerHTML="<img style='filter:alpha(opacity="+i_strngth+");-moz-opacity:."+i_strngth+";opacity:."+i_strngth+";' src="+imageurl[i_image]+" border=0>";
   	  i_strngth=i_strngth-10;
	  var timer=setTimeout("hideimage()",100);
	}
	else
   	if (i_strngth ==9 ) {
      i_strngth=0;
	  document.getElementById('testimage').innerHTML="<img style='filter:alpha(opacity="+i_strngth+");-moz-opacity:."+i_strngth+";opacity:."+i_strngth+";' src="+imageurl[i_image]+" border=0>";
	  var timer=setTimeout("hideimage()",100);
	}
		
	else {
  	  clearTimeout(timer);
	  i_image++;
	  if (i_image >= imageurl.length) {i_image=0;}
	  i_strngth=1;
	  var timer=setTimeout("showimage()",500);	
	}
}

//######################################### function change square background then mouse is on
function homepageThumbnailsChange(dis_img_text, div_id)
{
	document.getElementById(div_id).style.background="#f59f1a";
	
	var dis_text;
	var dis_num;
	if (dis_img_text=='strategy') {dis_text="STRATEGY <br /><H6> LEARN MORE &gt; </H6>"; dis_num=0}
	if (dis_img_text=='research') {dis_text="RESEARCH <br /><H6> LEARN MORE &gt; </H6>"; dis_num=1}
	if (dis_img_text=='design') {dis_text="INDUSTRIAL DESIGN <br /><H6> LEARN MORE &gt; </H6>"; dis_num=2}
	if (dis_img_text=='userexperience') {dis_text="USER EXPERIENCE <br /><H6> LEARN MORE &gt; </H6>"; dis_num=3}
	if (dis_img_text=='mechanicalengineering') {dis_text="MECHANICAL ENGINEERING <br /><H6> LEARN MORE &gt; </H6>"; dis_num=4}
	if (dis_img_text=='prototyping') {dis_text="PROTOTYPING <br /><H6> LEARN MORE &gt; </H6>"; dis_num=5}
	if (dis_img_text=='elec_and_software') {dis_text="SOFTWARE & ELECTRICAL ENGINEERING <br /><H6> LEARN MORE &gt; </H6>"; dis_num=6}
	if (dis_img_text=='laserscanning') {dis_text="LASER SCANNING <br /><H6> LEARN MORE &gt; </H6>"; dis_num=7}
	if (dis_img_text=='qualityassurance') {dis_text="QUALITY <br /> ASSURANCE <br /><H6> LEARN MORE &gt; </H6>"; dis_num=8}
	if (dis_img_text=='tooling') {dis_text="TOOLING <br /><H6> LEARN MORE &gt; </H6>"; dis_num=9}
	if (dis_img_text=='production') {dis_text="SHORT-RUN <br /> PRODUCTION <br /><H6> LEARN MORE &gt; </H6>"; dis_num=10}
	if (dis_img_text=='asiansourcing') {dis_text="ASIAN SOURCING <br /><H6> LEARN MORE &gt; </H6>"; dis_num=11}
	
	
    
	
	document.getElementById('sel_disciplines').innerHTML="<div onClick='location.href=\"/"+dis_img_text+"/\";'><div class='sel_disc_img'><img src="+thumbnailsurl[dis_num]+"></div><div style='margin-left:90px;'>"+dis_text+"</div></div>";
}

//######################################### function change square background then mouse is out 
function homepageThumbnailsMouseOut(div_id)
{
  document.getElementById(div_id).style.background="#e1e790";
}


var square_num=1;

//####################################### function creates loop cicles for thumbnails 
function  homepageThumbnailsLoop()
{
	var c='square_'+square_num;
	//alert(c);
	var cc='square_'+(square_num-1);
	//alert(cc);
	if (square_num==1) cc='square_12';
	
	document.getElementById(c).style.background='#f59f1a'; 
	if (square_num==1) homepageThumbnailsChange('strategy', 'square_1');
	if (square_num==2) homepageThumbnailsChange('research', 'square_2');
	if (square_num==3) homepageThumbnailsChange('design', 'square_3');
	if (square_num==4) homepageThumbnailsChange('userexperience', 'square_4');
	if (square_num==5) homepageThumbnailsChange('mechanicalengineering', 'square_5');
	if (square_num==6) homepageThumbnailsChange('prototyping', 'square_6');
	if (square_num==7) homepageThumbnailsChange('elec_and_software', 'square_7');
	if (square_num==8) homepageThumbnailsChange('laserscanning', 'square_8');
	if (square_num==9) homepageThumbnailsChange('qualityassurance', 'square_9');
	if (square_num==10) homepageThumbnailsChange('tooling', 'square_10');
	if (square_num==11) homepageThumbnailsChange('production', 'square_11');
	if (square_num==12) homepageThumbnailsChange('asiansourcing', 'square_12');
	
	
	if (square_num>=1) document.getElementById(cc).style.background='#e1e790'; 
	
	square_num++;
	if (square_num==13) square_num=1;
	setTimeout("homepageThumbnailsLoop()",3000);
}
	