var imagemode=true;var restarea=20;var maxspeed=7;var maxwidth=1000;var startpos=0;function enlargeimage(_1,_2,_3){var _4=typeof _2!="undefined"?_2:"600px";var _5=typeof _3!="undefined"?_3:"500px";var _6="width="+_4+",height="+_5+",resizable=yes";window.open(_1,"",_6);}var iedom=document.all||document.getElementById,scrollspeed=0,movestate="",actualwidth="",cross_scroll,ns_scroll,statusdiv,loadedyes=0,lefttime,righttime;function ietruebody(){return (document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}function creatediv(){}function positiondiv(){var _7=getposOffset(crossmain,"left"),menuheight=parseInt(crossmain.offsetHeight),mainobjoffsetH=getposOffset(crossmain,"top");statusdiv.style.left=_7+(menuwidth/2)-(statusdiv.offsetWidth/2)+"px";statusdiv.style.top=menuheight+mainobjoffsetH+"px";}function showhidediv(_8){}function getposOffset(_9,_a){var _b=(_a=="left")?_9.offsetLeft:_9.offsetTop;var _c=_9.offsetParent;while(_c!=null){_b=(_a=="left")?_b+_c.offsetLeft:_b+_c.offsetTop;_c=_c.offsetParent;}return _b;}function moveleft(){if(loadedyes){movestate="left";if(iedom&&parseInt(cross_scroll.style.left)>(totalwidth)){cross_scroll.style.left=parseInt(cross_scroll.style.left)-scrollspeed+"px";showhidediv("hidden");}else{showhidediv("visible");}}lefttime=setTimeout("moveleft()",10);}function moveright(){if(loadedyes){movestate="right";if(iedom&&parseInt(cross_scroll.style.left)<0){cross_scroll.style.left=parseInt(cross_scroll.style.left)+scrollspeed+"px";showhidediv("hidden");}else{showhidediv("visible");}}righttime=setTimeout("moveright()",10);}function motionengine(e){var _e=getposOffset(crossmain,"left"),dsocx=(window.pageXOffset)?pageXOffset:ietruebody().scrollLeft,dsocy=(window.pageYOffset)?pageYOffset:ietruebody().scrollTop,curposy=window.event?event.clientX:e.clientX?e.clientX:"";curposy-=_e-dsocx;var _f=(menuwidth-restarea)/2;var _10=(menuwidth+restarea)/2;if(curposy>_10){scrollspeed=(curposy-_10)/((menuwidth-restarea)/2)*maxspeed;clearTimeout(righttime);if(movestate!="left"){moveleft();}}else{if(curposy<_f){scrollspeed=(_f-curposy)/((menuwidth-restarea)/2)*maxspeed;clearTimeout(lefttime);if(movestate!="right"){moveright();}}else{scrollspeed=0;}}}function contains_ns6(a,b){if(b!==null){while(b.parentNode){if((b=b.parentNode)==a){return true;}}}return false;}function stopmotion(e){if(!window.opera||(window.opera&&e.relatedTarget!==null)){if((window.event&&!crossmain.contains(event.toElement))||(e&&e.currentTarget&&e.currentTarget!=e.relatedTarget&&!contains_ns6(e.currentTarget,e.relatedTarget))){clearTimeout(lefttime);clearTimeout(righttime);movestate="";}}}function fillup(){if(iedom){crossmain=document.getElementById?document.getElementById("motioncontainer"):document.all.motioncontainer;if(typeof crossmain.style.maxWidth!=="undefined"){crossmain.style.maxWidth=maxwidth+"px";}menuwidth=crossmain.offsetWidth;cross_scroll=document.getElementById?document.getElementById("motiongallery"):document.all.motiongallery;actualwidth=document.getElementById?document.getElementById("trueContainer").offsetWidth:document.all["trueContainer"].offsetWidth;if(startpos){cross_scroll.style.left=(menuwidth-actualwidth)/startpos+"px";}crossmain.onmousemove=function(e){motionengine(e);};crossmain.onmouseout=function(e){stopmotion(e);showhidediv("hidden");};}loadedyes=1;if(document.body.filters){onresize();}}window.onload=fillup;onresize=function(){if(typeof motioncontainer!=="undefined"&&motioncontainer.filters){motioncontainer.style.width="0";motioncontainer.style.width="";motioncontainer.style.width=Math.min(motioncontainer.offsetWidth,maxwidth)+"px";}menuwidth=crossmain.offsetWidth;cross_scroll.style.left=startpos?(menuwidth-actualwidth)/startpos+"px":0;};var theprojects="";function showCat(_16){theprojects="";currentpage=0;tempprojid.length=0;var _17=0;for(pp=0;pp<projectid.length;pp++){var _18=new Array();_18=projectcategory[pp].split("|");for(cc=0;cc<_18.length;cc++){if(_18[cc]==_16){if(_17==0){thefirstproject=projectid[pp];}for(ccc=0;ccc<clientname.length;ccc++){if(projectclient[pp]==clientsid[ccc]){theclient=clientname[ccc];}}theprojects=theprojects+"<dt><a href='javascript:getProject("+projectid[pp]+")'>"+projecttitle[pp]+"&nbsp;("+theclient+")</a></dt>";tempprojid[_17]=projectid[pp];_17++;}}}for(ppp=0;ppp<catid.length;ppp++){if(catid[ppp]==_16){thecatname=catname[ppp];thecatdescription=catdescription[ppp];}}document.getElementById("portfolioCategory").innerHTML="<div id='portfolioListing'><dl>"+theprojects+"</dl></div>";document.getElementById("returncategories").style.visibility="visible";breadcrumb="<h2>Portfolio &raquo; "+thecatname+"</h2>";document.getElementById("portfolioCategoryHd").innerHTML=thecatname;showProjectImages("cat",_16);document.getElementById("interiorText").innerHTML=breadcrumb+"<p>"+thecatdescription+"</p>";}function getProject(id,_1a,_1b){var _1c=0;var _1d="";if(_1b!=true){_1b=false;}var _1e="";var _1f="";for(pp=0;pp<tempprojid.length;pp++){if(tempprojid[pp]==id){currentpage=pp;thepart=currentpage/10;thecut=thepart.toString();theloc=thecut.indexOf(".");if(theloc>=1){thecut=thecut.substring(0,theloc);}firstpage=thecut*10;lastpage=firstpage+9;if(tempprojid.length>=2){doPaging(firstpage,lastpage,true);doStyleChange();}}}document.getElementById("interiorText").innerHTML="<img src='../images/progress_bar.gif'>";var _20="'id="+id+"'";var _21=new XMLHttpRequest();_21.open("POST","getProject.aspx",true);_21.setRequestHeader("Content-Type","application/x-www-form-urlencoded");_21.send(eval(_20));_21.onreadystatechange=function(){if(_21.readyState==4){if(_21.status==200){if(_21.responseXML.getElementsByTagName("result")[0].firstChild.data.indexOf("success")>=0){thedescription=_21.responseXML.getElementsByTagName("description")[0].firstChild.data;theurl=_21.responseXML.getElementsByTagName("url")[0].firstChild.data;theservices=_21.responseXML.getElementsByTagName("services")[0].firstChild.data;var _22=new Array();_22=theservices.split("|");for(tt=0;tt<_22.length;tt++){for(ttt=0;ttt<serviceid.length;ttt++){if(_22[tt]==serviceid[ttt]){_1d=_1d+"<li><a href='../services/default.aspx?id="+serviceid[ttt]+"'>"+servicename[ttt]+"</a></li>";}}}for(pp=0;pp<projectid.length;pp++){if(projectid[pp]==id){thedescription="<p style='color:#ff0000'><a href='http://"+theurl+"' target='_blank'>"+theurl+"</a></p><table class='contentpaneopen' cellpadding='0' cellspacing='0'><tr><td class='contentheading'></td></tr><tr><td>"+thedescription+"</td></tr></table>";for(ppp=0;ppp<clientsid.length;ppp++){if(clientsid[ppp]==projectclient[pp]){breadcrumb="<h2>Portfolio &raquo; "+clientname[ppp]+" &raquo; "+projecttitle[pp]+"</h2>";_1f=clientname[ppp];}}_1c=projectclient[pp];}}for(pp=0;pp<projectid.length;pp++){if(projectclient[pp]==_1c){_1e=_1e+"<dt><a href='javascript:getProject("+projectid[pp]+")'>"+projecttitle[pp]+"</a></dt>";}}if(_1a==true){document.getElementById("portfolioCategory").innerHTML=_1e;document.getElementById("returncategories").style.visibility="visible";document.getElementById("portfolioCategoryHd").innerHTML="Projects for "+_1f;}document.getElementById("interiorText").innerHTML=breadcrumb+thedescription+"<p><strong>Services Performed:</strong></p><ul>"+_1d+"</ul>";if(imagemode==true){for(ii=0;ii<projectid.length;ii++){if(id==projectid[ii]){if(_1b==false){if(projectimage[ii]!=""){document.getElementById("motioncontainer").style.visibility="hidden";document.getElementById("flashIntPhoto").style.visibility="visible";theimage="<img src=%22../CMSPages/GetFile.aspx?guid="+projectimage[ii]+"%22 border=1 id='theoneimage'>";document.getElementById("flashIntPhoto").innerHTML=unescape(theimage);}else{document.getElementById("flashIntPhoto").style.visibility="visible";document.getElementById("flashIntPhoto").innerHTML="<img src='../images/general/default.jpg'>";}}}}}}}}};}function showClientList(){showCatList();document.getElementById("returncategories").style.visibility="hidden";document.getElementById("motioncontainer").style.visibility="hidden";document.getElementById("flashInt").style.visibility="visible";var pp=0;theclientlist="";var _24=0;for(ii=0;ii<clientsid.length;ii++){pp=0;for(tt=0;tt<projectid.length;tt++){if(projectclient[tt]==clientsid[ii]){if(pp==0){if(_24==0){thefirstproject=clientsid[ii];}theclientlist=theclientlist+"<tr><td nowrap><a href='javascript:showClientProj("+clientsid[ii]+")' class='clientList'>"+clientname[ii]+"</a></td></tr>";tempprojid[_24]=projectid[ii];_24=_24+1;}pp=pp+1;}}}document.getElementById("flashInt").innerHTML="<div id='projectTextList' style='width:300px'><table border=0><tr>"+theclientlist+"</tr></table></div>";document.getElementById("portfolioView").innerHTML="<ul><li><a href='javascript:showProjectImages()' >Projects</a> </li>| <li><a href='javascript:showClientList()' class='active' >Clients </a> </li></ul>";showClientProj(thefirstproject,true);document.getElementById("portfolioPaging").style.visibility="hidden";document.getElementById("pagingNext").style.visibility="hidden";document.getElementById("pagingPrev").style.visibility="hidden";document.getElementById("pagingCounter").style.visibility="hidden";document.getElementById("portfolioPagingBg").style.visibility="hidden";document.getElementById("interiorText").innerHTML=defaultcopy;}function showClientProj(id){tempprojid.length=0;currentpage=0;document.getElementById("interiorText").style.height="180px";document.getElementById("portfolioPaging").style.visibility="hidden";document.getElementById("pagingNext").style.visibility="hidden";document.getElementById("pagingPrev").style.visibility="hidden";document.getElementById("pagingCounter").style.visibility="hidden";document.getElementById("portfolioPagingBg").style.visibility="hidden";var _26="";projecttotal=0;var _27=0;for(pp=0;pp<projectid.length;pp++){if(projectclient[pp]==id){if(projecttotal==0){thefirstproject=projectid[pp];theactive="class='active'";}else{theactive="";}_26=_26+"<dt><a href='javascript:getProject("+projectid[pp]+")'>"+projecttitle[pp]+"</a></dt>";tempprojid[projecttotal]=projectid[pp];_27=projectid[pp];clientProjList[projecttotal]=projectid[pp];projecttotal++;}}getProject(thefirstproject,true);}function doPaging(_28,_29,_2a){document.getElementById("theprev10").innerHTML="";document.getElementById("thenext10").innerHTML="";document.getElementById("pagingPrev").style.visibility="hidden";document.getElementById("pagingNext").style.visibility="hidden";pagingstring="";var _2b="";for(pp=_28;pp<tempprojid.length;pp++){if(pp<=_29){if(pp==_28&&_2a==true){_2b=" class='active' ";}else{if(pp==_29&&_2a==false){_2b=" class='active' ";}else{_2b="";}}pagingstring=pagingstring+"<li><a href='javascript:getProject("+tempprojid[pp]+")'"+_2b+" id='pagetab"+pp+"'>"+(pp+1)+"</a> </li>";}}document.getElementById("interiorText").style.height="180px";document.getElementById("portfolioPaging").style.visibility="visible";document.getElementById("pagingCounter").style.visibility="visible";document.getElementById("portfolioPagingBg").style.visibility="visible";pagingstring="<ul id='pagingtab'>"+pagingstring+"</ul>";document.getElementById("pagingCounter").innerHTML=pagingstring;if(currentpage>=1){document.getElementById("pagingPrev").style.visibility="visible";}else{document.getElementById("pagingPrev").style.visibility="hidden";}if(tempprojid.length==(currentpage+2)){document.getElementById("pagingNext").style.visibility="hidden";}else{document.getElementById("pagingNext").style.visibility="visible";}if(currentpage<=tempprojid.length-10){document.getElementById("thenext10").innerHTML="<a href='javascript:doNext10()'>Next 10  &raquo;</a>";}if(currentpage>=9){document.getElementById("theprev10").innerHTML="<a href='javascript:doPrev10()'>&laquo; Prev 10</a>";}document.getElementById("pagingCounter").style.left=154;if(tempprojid.length<=9){theleft=145+((10-tempprojid.length)*5);document.getElementById("pagingCounter").style.left=theleft;}}function doNext(){if(currentpage>=9){document.getElementById("theprev10").innerHTML="<a href='javascript:doPrev10()'>&laquo; Prev 10</a>";}if(tempprojid.length==(currentpage+2)){document.getElementById("pagingNext").style.visibility="hidden";}else{document.getElementById("pagingNext").style.visibility="visible";}if(currentpage>=0){document.getElementById("pagingPrev").style.visibility="visible";}else{document.getElementById("pagingPrev").style.visibility="hidden";}var _2c;var _2d;_2d=(currentpage+1)/10;_2c=_2d.toString();theloc=_2c.indexOf(".");if(theloc>=0){}else{thestart=_2d*10;theend=(_2d*10)+9;doPaging(thestart,theend);}currentpage=currentpage+1;eval("getProject("+tempprojid[currentpage]+")");}function doPrev(){if(currentpage<=10){document.getElementById("theprev10").innerHTML="";}if(currentpage>=2){document.getElementById("pagingPrev").style.visibility="visible";}else{document.getElementById("pagingPrev").style.visibility="hidden";}document.getElementById("pagingNext").style.visibility="visible";if(currentpage>=1){if(currentpage==0){document.getElementById("pagingPrev").style.color="#CCCCCC";}var _2e;var _2f;_2f=currentpage/10;_2e=_2f.toString();theloc=_2e.indexOf(".");_2f=_2f-1;if(_2f>=0){if(theloc>=0){}else{thestart=_2f*10;theend=(_2f*10)+9;doPaging(thestart,theend,false);}}eval("getProject("+tempprojid[currentpage-1]+")");}}function doStyleChange(){if(tempprojid.length==(currentpage+1)){document.getElementById("pagingNext").style.visibility="hidden";}else{document.getElementById("pagingNext").style.visibility="visible";}if(currentpage>=1){document.getElementById("pagingPrev").style.visibility="visible";}else{document.getElementById("pagingPrev").style.visibility="hidden";}for(pp=0;pp<tempprojid.length;pp++){if(eval("document.getElementById('pagetab"+pp+"')")!=null){eval("document.getElementById('pagetab"+pp+"').className='null'");}}eval("document.getElementById('pagetab"+currentpage+"').className='active'");}function doHover(_30){}function showProjectImages(_31,_32){document.getElementById("portfolioPaging").style.visibility="hidden";document.getElementById("pagingNext").style.visibility="hidden";document.getElementById("pagingPrev").style.visibility="hidden";document.getElementById("pagingCounter").style.visibility="hidden";document.getElementById("portfolioPagingBg").style.visibility="hidden";currentpage=0;if(_31!=null){pagingstring="";projecttotal=0;}else{showCatList();}imagemode=true;var _33="";var _34="1==1";var pp=0;var _36="";if(_31=="client"){_34="projectclient[ii]=="+_32;}if(_31=="cat"){_33="";var _37=new Array();for(ii=0;ii<projectid.length;ii++){_37=projectcategory[ii].split("|");for(tt=0;tt<_37.length;tt++){if(_37[tt]==_32){if(projecttotal==0){thefirstproject=projectid[pp];theactive="class='active'";}else{theactive="";}if(projectimage[ii]!=""){_33=_33+"<a href=%22javascript:getProject("+projectid[ii]+",false,true)%22><img src=%22../CMSPages/GetFile.aspx?guid="+projectimage[ii]+"%22 border=%222px solid #CCCCCC%22 id=%22image"+projectid[ii]+"%22 width=%22200%22 heoght=%22145%22 /></a>";}else{_33=_33+"<a href=%22javascript:getProject("+projectid[ii]+",false,true)%22><img src=%22../images/general/default.jpg%22 border=%222px solid #CCCCCC%22 id=%22image"+projectid[ii]+"%22></a>";}tempprojid[projecttotal]=projectid[ii];projecttotal++;}}}}else{for(ii=0;ii<projectid.length;ii++){if(eval(_34)){if(projecttotal==0){thefirstproject=projectid[pp];theactive="class='active'";}else{theactive="";}if(projectimage[ii]!=""){_33=_33+"<a href=%22javascript:getProject("+projectid[ii]+",false,true)%22><img src=%22../CMSPages/GetFile.aspx?guid="+projectimage[ii]+"%22 border=%222px solid #CCCCCC%22 id=%22image"+projectid[ii]+"%22 /></a>";}else{_33=_33+"<a href=%22javascript:getProject("+projectid[ii]+",false,true)%22><img src=%22../images/general/default.jpg%22 border=%222px solid #CCCCCC%22 id=%22image"+projectid[ii]+"%22></a>";}tempprojid[projecttotal]=projectid[ii];projecttotal++;}}}document.getElementById("flashInt").style.visibility="hidden";document.getElementById("flashIntPhoto").style.visibility="hidden";document.getElementById("motioncontainer").style.visibility="visible";document.getElementById("motioncontainer").innerHTML=unescape("<div id=%22motiongallery%22 style=%22position:absolute; left:0px; top:7px; white-space: nowrap; z-index: 10;%22><nobr id=%22trueContainer%22 style=%22z-index: 12;%22></nobr></div>");document.getElementById("motioncontainer").style.top="140px";document.getElementById("motioncontainer").style.left="120px";document.getElementById("trueContainer").innerHTML=""+unescape(_33)+"";fillup();document.getElementById("portfolioView").innerHTML="<ul><li><a href='javascript:showProjectImages()' class='active' >Projects</a> </li>| <li><a href='javascript:showClientList()' >Clients</a> </li></ul>";doPaging(0,9,true);document.getElementById("interiorText").innerHTML=defaultcopy;}function showCatList(){document.getElementById("returncategories").style.visibility="hidden";var _38="";for(ii=0;ii<catid.length;ii++){_38=_38+"<dt><a href='javascript:showCat("+catid[ii]+");'>"+catname[ii]+"</a></dt>";}document.getElementById("portfolioCategory").innerHTML=_38;document.getElementById("portfolioCategoryHd").innerHTML="Select a Category";}function doPrev10(){document.getElementById("thenext10").innerHTML="<a href='javascript:doNext10()'>Next 10  &raquo;</a>";var _39;var _3a;_3a=(currentpage)/10;_39=_3a.toString();theloc=_39.indexOf(".");thestart=(_3a*10)-9;theend=(_3a*10);for(pp=0;pp<projectid.length;pp++){if(pp==thestart-1){newpage=projectid[pp];}}doPaging(thestart,theend,false);currentpage=thestart;getProject(newpage);if(thestart<=10){document.getElementById("theprev10").innerHTML="";}}function doNext10(){var _3b;var _3c;_3c=(currentpage)/10;_3b=_3c.toString();theloc=_3b.indexOf(".");thestart=(_3c*10)+10;theend=(_3c*10)+19;for(pp=0;pp<tempprojid.length;pp++){if(pp==thestart){newpage=tempprojid[pp];}}doPaging(thestart,theend,false);currentpage=thestart;getProject(newpage);if(projectid.length<=thestart+10){document.getElementById("thenext10").innerHTML="";}document.getElementById("pagingPrev").style.visibility="visible";document.getElementById("theprev10").innerHTML="<a href='javascript:doPrev10()'>&laquo; Prev 10</a>";}