function selectPicDiv(divID) //nick -- change picture div
{
	if(document.getElementById(divID).style.display == "none")
	{
		resetPicMenu(4);
		document.getElementById(divID).style.display = "block";
	}
}


function resetPicMenu(count){ //nick -- function to hide the photo divs
for(i=0; i<=count; i++){
	if(document.getElementById('div'+i) != null){ 
		document.getElementById('div'+i).style.display = "none";
	}
	}
}

function PopupPic(sPicURL) { 
	window.open( "/popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=200,WIDTH=200"); 
} 


// this function does the rollovers for the rating system and sets a hidden
// form variale in the process
function starSelect(num){

	for(i=0; i< num; i++){
		orig = document.getElementById('image'+(i+1));
		if(i%2==0){
			orig.src = '/images/starleft2.gif';
		}else{
			orig.src = '/images/starright2.gif';
		}
	}
	num ++;
	for(i=num; i<=10; i++){
		orig = document.getElementById('image'+i);
		if(i%2==1){
			orig.src = '/images/starleft.gif';
		}else{
			orig.src = '/images/starright.gif';
		}
	}
	form = document.getElementById('review');
	form.rating.value = ((num-1)/2);
	
}

function easyToggle(divID) //nick -- change div visibility
{
	if(document.getElementById(divID).style.display == "none")
	{
		document.getElementById(divID).style.display = "block";
	}else{
		document.getElementById(divID).style.display = "none";
	}
}

function easyToggler(divID, display) //nick -- change div visibility
{
	document.getElementById(divID).style.display = display;
}


function toggle (divID) //nick -- change picture div
{
	if(document.getElementById(divID).style.display == "none")
	{
		resetInfo(3);
		document.getElementById(divID).style.display = "block";
	}
}


function resetInfo (count)
{ //nick -- function to hide the photo divs
	for(i=1; i<=count; i++)
	{
		if(document.getElementById('data'+i) != null)
		{ 
			document.getElementById('data'+i).style.display = "none";
		}
	}
}


function toggleEmailFriend (){
	if(document.getElementById('emailFriend').style.display == "none")
		document.getElementById('emailFriend').style.display = "block";
	else
		document.getElementById('emailFriend').style.display = "none";

}


function activateTab (tab)
{
	//alert (document.getElementById('tabone').style.backgroundPosition);
	document.getElementById('tabone').style.backgroundPosition = "";
	document.getElementById('tabtwo').style.backgroundPosition = "";
	document.getElementById('tabthree').style.backgroundPosition = "";
	document.getElementById('tabonespan').style.backgroundPosition = "";
	document.getElementById('tabtwospan').style.backgroundPosition = "";
	document.getElementById('tabthreespan').style.backgroundPosition = "";
	document.getElementById(tab).style.backgroundPosition = "0% -42px";
	document.getElementById(tab+'span').style.backgroundPosition = "100% -42px";
}
