var browser=navigator.appName;ie=false;mosafop=false;ie6=false;if(browser=="Microsoft"){ie=true}var ver=navigator.appVersion;verspot=ver.search("MSIE");if(verspot<0){mosafop=true}if(verspot>0){ie=true;var realver=ver.substr((verspot+5),1);if(realver<7){ie6=true}}img1=new Image();img1.src="background.jpg";img2=new Image();img2.src="hidedisplay.jpg";var clspot=0;var pagette=window.location.search.substring(1);portdiv=7;rightmove=0;leftmove=0;moved=0;movebusy=0;tdiv=0;thespace=10;themargin=160;thumbdivs=0;topspot=160;bottomspot=500;thenewmargin=500;thisdiv=1;showthisdiv=1;showdiv="";olddiv="";movearray=new Array();function getPortfolio(num){document.getElementById("loaderdiv").style.top="150px";document.getElementById("loaderdiv").style.visibility="visible";xmlhttp=GetXmlHttpObject();if(xmlhttp==null){alert("Your browser does not support XMLHTTP!");return}var url="getport.php?";url=url+num;xmlhttp.onreadystatechange=stateChanged;xmlhttp.open("GET",url,true);xmlhttp.send(null)}function stateChanged(){if(xmlhttp.readyState==4&&movebusy==0){thediv="displaydiv"+portdiv;dodiv=portdiv;portdiv=7;if(dodiv==7){portdiv=8}document.getElementById(thediv).innerHTML=xmlhttp.responseText;document.getElementById("loaderdiv").style.visibility="hidden";document.getElementById("loaderdiv").style.top="500px";movedown(dodiv)}}function getContactKey(){if(xmlhttp.readyState==4){document.contactform.valfield.value=xmlhttp.responseText}}function dothemail(){if(xmlhttp.readyState==4){document.getElementById("displaydiv9").innerHTML=xmlhttp.responseText;movedown(9)}}function GetXmlHttpObject(){if(window.XMLHttpRequest){return new XMLHttpRequest()}if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLHTTP")}return null}function movedown(thediv){if(movebusy==0){showthisdiv=thediv;themargin=topspot;thenewmargin=bottomspot;if(showthisdiv!=thisdiv){showdiv="displaydiv"+thediv;movebusy=1;olddiv="displaydiv"+thisdiv;document.getElementById(showdiv).style.visibility="visible";scrolldown(thediv)}}}function scrolldown(){themargin+=thespace;thenewmargin-=10;if(themargin<=bottomspot){document.getElementById(olddiv).style.top=themargin+"px";document.getElementById(showdiv).style.top=thenewmargin+"px";t=setTimeout("scrolldown();",10)}else{document.getElementById(olddiv).style.visibility="hidden";olddiv="displaydiv"+thisdiv;thisdiv=showthisdiv;movebusy=0}}function moveleft(){leftmove=1;if(moved==0){moveleft2()}}function lightup(d){div="thdiv"+d;if(ie){document.getElementById(div).style.filter="alpha(opacity=100)"}else{document.getElementById(div).style.opacity=1.0}}function dim(d){div="thdiv"+d;if(ie){document.getElementById(div).style.filter="alpha(opacity=70)"}else{document.getElementById(div).style.opacity=0.7}}function moveleft2(){if(thumbdivs>3){movearray[0]=tdiv;for(i=1;i<5;i++){dex=i-1;it=movearray[dex];if(it<thumbdivs){movearray[i]=it+1}else{movearray[i]=0}}putdiv="mdiv"+movearray[4];document.getElementById(putdiv).style.left="475px";document.getElementById(putdiv).style.width="113px";document.getElementById(putdiv).style.visibility="visible";document.getElementById(putdiv).style.zIndex=9;mleft()}}function mleft(){for(i=0;i<5;i++){putdiv="mdiv"+movearray[i];sp=document.getElementById(putdiv).style.width;spp=document.getElementById(putdiv).style.left;len1=spp.length;spp=parseInt(spp.substr(0,(len1-2)));len1=sp.length;sp=parseInt(sp.substr(0,(len1-2)));var clipit;nl=(spp-10)+"px";nw="113px";if(i==0){if(spp<-30)document.getElementById(putdiv).style.visibility="hidden"}if(i<4){document.getElementById(putdiv).style.left=nl;if(i==0){clspot=clspot+10;clipit="rect(0px, 113px, 103px,"+clspot+"px)";document.getElementById(putdiv).style.clip=clipit}}}moved++;if(moved<14){t=setTimeout("mleft();",45)}else{putdiv="mdiv"+movearray[0];document.getElementById(putdiv).style.visibility="hidden";document.getElementById(putdiv).style.clip="rect(0px, 113px, 102px, 0px)";clspot=0;tdiv=movearray[1];moved=0;putdiv="mdiv"+movearray[4];document.getElementById(putdiv).style.zIndex=10;if(leftmove>0){moveleft2()}}}function moveright(){rightmove=1;if(moved==0){moveright2()}}function stop(){rightmove=0;leftmove=0}function moveright2(){if(thumbdivs>3){movearray[1]=tdiv;if(tdiv>0){movearray[0]=(tdiv-1)}else{movearray[0]=thumbdivs}for(i=1;i<5;i++){dex=i-1;it=movearray[dex];if(it<thumbdivs){movearray[i]=it+1}else{movearray[i]=0}}putdiv="mdiv"+movearray[0];document.getElementById(putdiv).style.left="53px";document.getElementById(putdiv).style.width="3px";document.getElementById(putdiv).style.visibility="visible";mright()}}function mright(){for(i=4;i>=0;i--){putdiv="mdiv"+movearray[i];sp=document.getElementById(putdiv).style.width;spp=document.getElementById(putdiv).style.left;len1=spp.length;spp=parseInt(spp.substr(0,(len1-2)));len1=sp.length;sp=parseInt(sp.substr(0,(len1-2)));nl=(spp+10)+"px";nw="133px";if(i==4&&sp>10){nw=(sp-10)+"px";document.getElementById(putdiv).style.width=nw}if(i==0){if(sp<113){nw=(sp+10)+"px"}else{nw="113px"}document.getElementById(putdiv).style.width=nw;nl="53px"}document.getElementById(putdiv).style.left=nl}moved++;if(moved<14){t=setTimeout("mright();",45)}else{putdiv="mdiv"+movearray[4];document.getElementById(putdiv).style.visibility="hidden";tdiv=movearray[0];moved=0;if(rightmove>0){moveright2()}}}function getpagette(){if(pagette){if(pagette==6){docontact(pagette)}else{movedown(pagette)}}}function docontact(num){document.getElementById("namewrong").style.height="6px";document.getElementById("namewrong").style.visibility="hidden";document.getElementById("emailwrong").style.height="6px";document.getElementById("emailwrong").style.visibility="hidden";document.getElementById("subjectwrong").style.height="6px";document.getElementById("subjectwrong").style.visibility="hidden";document.getElementById("messagewrong").style.height="6px";document.getElementById("messagewrong").style.visibility="hidden";movedown(num);xmlhttp=GetXmlHttpObject();if(xmlhttp==null){alert("Your browser does not support XMLHTTP!");return}var url="getvalcode.php";xmlhttp.onreadystatechange=getContactKey;xmlhttp.open("GET",url,true);xmlhttp.send(null)}function sendcontact(){var doret=true;if(document.contactform.name.value==""){document.getElementById("namewrong").style.height="10px";document.getElementById("namewrong").style.visibility="visible";doret=false}if(document.contactform.email.value==""){document.getElementById("emailwrong").style.height="10px";document.getElementById("emailwrong").style.visibility="visible";doret=false}var str=document.contactform.email.value;q=str.match(/^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/);if(!q){document.getElementById("emailwrong").style.height="10px";document.getElementById("emailwrong").style.visibility="visible";doret=false}if(document.contactform.subject.value==""){document.getElementById("subjectwrong").style.height="10px";document.getElementById("subjectwrong").style.visibility="visible";dotret=false}if(document.contactform.message.value==""){document.getElementById("messagewrong").style.height="10px";document.getElementById("messagewrong").style.visibility="visible";doret=false}if(!doret){return false}cstring="name="+document.contactform.name.value+"&email="+document.contactform.email.value+"&subject="+document.contactform.subject.value+"&message="+document.contactform.message.value+"&valfield="+document.contactform.valfield.value;xmlhttp=GetXmlHttpObject();if(xmlhttp==null){alert("Your browser does not support XMLHTTP!");return}var url="sendmail.php?"+cstring;xmlhttp.onreadystatechange=dothemail;xmlhttp.open("GET",url,true);xmlhttp.send(null);return true}