var tld="http://diamantephoto.com/",bgD=tld+"images/bgs",crD=tld+"images/corners/",gD=tld+"gallery/",tD="/thumbs/",leftM="-507px";
if(screen.height>=1200&&screen.width>=1590){var cr="/1200/",Pix=[bgD+cr+"bg0.jpg",bgD+cr+"bg1.jpg",bgD+cr+"bg2.jpg",bgD+cr+"bg3.jpg",bgD+cr+"bg4.jpg",bgD+cr+"bg5.jpg"],howMany=Pix.length,galleryWIDTH=1356,bgWIDTH=1389,bgHEIGHT=923;}
else{if(screen.height<1200&&screen.height>900&&screen.width>=1385){var cr="/1050/",Pix=[bgD+cr+"bg0.jpg",bgD+cr+"bg1.jpg",bgD+cr+"bg2.jpg",bgD+cr+"bg3.jpg",bgD+cr+"bg4.jpg",bgD+cr+"bg5.jpg"],howMany=Pix.length,galleryWIDTH=1056,bgWIDTH=1185,bgHEIGHT=788;}
else{if(screen.height<1050&&screen.height>800&&screen.width>=1185){var cr="/900/",Pix=[bgD+cr+"bg0.jpg",bgD+cr+"bg1.jpg",bgD+cr+"bg2.jpg",bgD+cr+"bg3.jpg",bgD+cr+"bg4.jpg",bgD+cr+"bg5.jpg"],howMany=Pix.length,galleryWIDTH=906,bgWIDTH=982,bgHEIGHT=653;}
else{if(screen.height<900&&screen.height>768&&screen.width>=1050){var cr="/800/",Pix=[bgD+cr+"bg0.jpg",bgD+cr+"bg1.jpg",bgD+cr+"bg2.jpg",bgD+cr+"bg3.jpg",bgD+cr+"bg4.jpg",bgD+cr+"bg5.jpg"],howMany=Pix.length,galleryWIDTH=806,bgWIDTH=847,bgHEIGHT=563;}
else{var cr="/768/",Pix=[bgD+cr+"bg0.jpg",bgD+cr+"bg1.jpg",bgD+cr+"bg2.jpg",bgD+cr+"bg3.jpg",bgD+cr+"bg4.jpg",bgD+cr+"bg5.jpg"],howMany=Pix.length,galleryWIDTH=700,bgWIDTH=804,bgHEIGHT=534;}}}}
var pos=0,timeDelay=10,PicCurrentNum=0,stopPix=0,PicCurrent=new Image();timeDelay*=1000;PicCurrent.src=Pix[PicCurrentNum];
function targetDiv(A){return function(){if(req.readyState==4){if(req.status==200){document.getElementById(A).innerHTML=req.responseText;}else{alert("Problem: "+req.statusText);}}};}
function ajax(A,C){if(window.XMLHttpRequest){req=new XMLHttpRequest();req.onreadystatechange=targetDiv(C);try{req.open("GET",A,true);}catch(B){alert(B);}req.send(null);}else{if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP");if(req){req.onreadystatechange=targetDiv(C);req.open("GET",A,true);req.send();}}}}
function repBG(B,A){stopPix=1;document.getElementById("page-bg").style.backgroundImage="url("+gD+B+cr+A+".jpg)";}
function makeVis(A){$(document.getElementById(A)).animate({ marginLeft: "5px" }, 1000);}
function makeInVis(A){if(A=='portrait'){leftM="-621px";}else{if(A=='galleryD'){leftM="-102px";}else{leftM="-507px";}}$(document.getElementById(A)).animate({ marginLeft: leftM }, 300);}
function eraseM(A,B){stopPix=0;setTimeout("makeInVis('aboutD');",200);makeInVis("contactD");makeInVis("pricingD");makeInVis("portrait");makeInVis("galleryD");document.getElementById(B).href="javascript:"+B+"();";}
function clickB1(A,B){document.getElementById(B).href="javascript:eraseM(%27"+A+"%27,%27"+B+"%27);";}
function resetB1(C,F,B,E,A,D){document.getElementById(F).href="javascript:"+F+"();";document.getElementById(E).href="javascript:"+E+"();";document.getElementById(D).href="javascript:"+D+"();";}
function aboutB(){repBG('09-19-2009','12');makeVis("aboutD");setTimeout("makeVis('portrait');",1000);makeInVis("galleryD");makeInVis("contactD");makeInVis("pricingD");clickB1("aboutD","aboutB");resetB1("contactD","contactB","pricingD","pricingB","galleryD","galleryB");}
function contactB(){repBG('08-30-2008','11');makeVis("contactD");makeInVis("portrait");makeInVis("galleryD");setTimeout("makeInVis('aboutD');",200);makeInVis("pricingD");clickB1("contactD","contactB");resetB1("aboutD","aboutB","pricingD","pricingB","galleryD","galleryB");}
function pricingB(){repBG('08-30-2008','12');makeVis("pricingD");makeInVis("portrait");makeInVis("galleryD");setTimeout("makeInVis('aboutD');",200);makeInVis("contactD");clickB1("pricingD","pricingB");resetB1("aboutD","aboutB","contactD","contactB","galleryD","galleryB");}
function galleryB(){stopPix=0;makeVis("galleryD");makeInVis("pricingD");makeInVis("portrait");setTimeout("makeInVis('aboutD');",200);makeInVis("contactD");ajax("http://"+location.hostname+"/gallery/index.html","galleryD");clickB1("galleryD","galleryB");resetB1("aboutD","aboutB","contactD","contactB","pricingD","pricingB");}
function slideshow(){if(stopPix==1){return;}else{PicCurrentNum++;if(PicCurrentNum==howMany){PicCurrentNum=0;}document.getElementById("ftr").style.backgroundImage="url("+Pix[PicCurrentNum+1]+")";PicCurrent.src=Pix[PicCurrentNum];document.getElementById("page-bg").style.backgroundImage="url("+PicCurrent.src+")";}}
function startPix(){if(screen.width<=1440){document.getElementById("prt").src="/images/portrait_sm.png";document.getElementById("pWrap").style.width="313px";document.getElementById("pWrap").style.height="323px";document.getElementById("pWrap").style.top="125px";}else{document.getElementById("prt").src="/images/portrait.png";document.getElementById("pWrap").style.width="626px";}document.getElementById("page-bg").style.width=bgWIDTH+"px";document.getElementById("page-bg").style.height=bgHEIGHT+"px";document.getElementById("corners").style.width=bgWIDTH+"px";document.getElementById("corners").style.height=bgHEIGHT+"px";document.getElementById("page-bg").style.backgroundImage="url("+Pix[0]+")";document.getElementById("sMedia").style.top=bgHEIGHT-30+"px";document.getElementById("ftr").style.top=bgHEIGHT+"px";document.getElementById("ftr").style.backgroundImage="url("+Pix[PicCurrentNum+1]+")";document.getElementById("corners").style.backgroundImage="url("+bgD+cr+"corners.png)";setInterval("slideshow()",timeDelay);document.getElementById("gWrap").style.left=bgWIDTH+90+"px";}
function galleryPreload(Z,Y,X,W,V,U,T,S,R,Q){var imageurl=[gD+Z+tD+Y+".jpg", gD+X+tD+W+".jpg", gD+V+tD+U+".jpg", gD+T+tD+S+".jpg", gD+R+tD+Q+".jpg"];
var k=0;for(k=0; k<=imageurl.length; k++) {var pio = new Image();pio.src = imageurl[k];}}
function preload(){var image_url=[gD+"09-19-2009"+cr+"12.jpg", gD+"08-30-2008"+cr+"11.jpg", gD+"08-30-2008"+cr+"12.jpg"];
var i=0;for(i=0; i<=image_url.length; i++) {var preload_image_object = new Image();preload_image_object.src = image_url[i];}}