/* Pacific Vision Javascript */


function hilite(target){
	var prefix= target.src.substring(0,target.src.length-5);
	
	newsrc= (target.src.indexOf('0.gif')>-1)?
		prefix+1+'.gif' : prefix+0+'.gif';
		 
	tempImg= new Image();
	tempImg.src= newsrc;
	target.src= tempImg.src;
	
}

function toggleQuestionare(fromState)
{
	if(fromState == 'flash')
	{
		flashDiv = document.getElementById('serviceFinder_Flash');
		flashDiv.style.display="none";
		
		document.getElementById('serviceFinder_nonFlash').style.display="block";
		/*
		displayProperty = getStyle(flashDiv,'serviceFinder_Flash');
	
		if(displayProperty == '' || displayProperty == 'none' )
		{
			flashDiv.style.display="block";
			
		}
		else if(displayProperty == 'block')
		{
			flashDiv.style.display="none";
		}*/
	}
	else 
	{
		document.getElementById(fromState).style.display="none";
		flashDiv = document.getElementById('serviceFinder_Flash');
		flashDiv.style.display="block";
	}

}


function getStyle(el,styleProp)
{
	var x = el;
	if (x.currentStyle)
		var y = x.currentStyle[styleProp];
	else if (window.getComputedStyle)
		var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(styleProp);
	return y;
}

// AUTOMATIC IMAGE REZIE SCRIPT


function imagePopup(img){
  imgRoot = (img.src.split('/')[((img.src.split('/')).length)-1]).split('.')[0];
 
  newImgRoot =  "/images/procedures/"+imgRoot+'_lrg.jpg';
  
  
  newImg = new Image();
  newImg.src = newImgRoot;
  
  /*largh=newImg.width+20;
  altez=newImg.height+20;*/
  
  largh=640;
  altez=480;
  
  stringa="width="+largh+",height="+altez;
  
  finestra=window.open(newImgRoot,"",stringa);

}
//  End -->
