// JavaScript Document

 

function pageInit(pageName,subName){
	
	switch (pageName){
	case "About Us":
	highlight=document.getElementById('about');
	highlight.style.color='#e7a226';
	break;
	
	case "In Print":
	highlight=document.getElementById('inprint');
	highlight.style.color='#e7a226';
	break;
	
	case "Contact Us":
	highlight=document.getElementById('contact');
	highlight.style.color='#e7a226';
	break;
	
	case "Home":
	highlight=document.getElementById('home');
	highlight.style.color='#e7a226';
	break;
	}//end switch
	
	if(subName){
	document.getElementById(subName).style.color='#e7a226';	
	}
		
	$("img.thumb").css("border", "1px solid #000000");

	$("img.thumb").mouseover(function(){
      $(this).css("border", "1px solid #e7a226");
    }).mouseout(function(){
      $(this).css("border", "1px solid #000000");
    });
}



function switchPic(category,num){
	mainImg=document.getElementById('largeImg');
	
	newPic="images/portfolio/"+category+"/"+num+".jpg";
	
	mainImg.src=newPic;
	
}


 
function showMail(){
	document.getElementById('mailForm').style.display='block';		
}

function clientPop(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=490,height=435,left=200,top=50');");
}


function showCase(upORdown,curPic,totPic) {
filePath="images/inprint/";

if (upORdown=="next"){
	targe=curPic+1;
	whichpic=filePath+targe+".jpg";
}else{
	targe=curPic-1;
	whichpic=filePath+targe+".jpg"
}

document.getElementById('printImg').src = whichpic;	


//prevPic=curPic-1;
//nextPic=curPic+1;

nextLink=" | <a href=\"javascript: showCase('next',"+targe+","+totPic+");\">next</a> >";
prevLink="< <a href=\"javascript: showCase('prev',"+targe+","+totPic+");\">previous</a> | ";

if (targe==1){
	$message=targe+" of "+totPic+nextLink;
} else if (targe==totPic){
	$message=prevLink+targe+" of "+totPic;
} else{
	$message=prevLink+targe+" of "+totPic+nextLink;
}

	
document.getElementById('printCaption').innerHTML=$message;

}