/**
 * This method expands or contracts the sections of the search page. 
 * Based on the change in state, the image used to trigger the call to this
 * method will be updated (between minus and plus - contract/expand)
 *
 * Parameters:
 * buttonImg - the image used as the button calling this method
 * divToChange - the page section that the user wishses to expand or contract
 */


function showHide(buttonImg, divToChange)
{
	// get the div to change
	var theDiv = document.getElementById(divToChange);
	
	// check whether we are expanding or contracting	
	if(buttonImg.src.indexOf("minus") > -1)
	{
		// we are contracting the section
		
		// change the image
		buttonImg.src = "/images/search_plus_btn.gif";
		theDiv.style.display = "none";
		// hack to normalize gaps between collapsed divs in IE
		if(window.isIE)
		{
			// show a hidden spacer 
			theDiv.nextSibling.style.display = "block";			
		}
	}
	else
	{
		// we are expanding the section
		
		// change the image
		buttonImg.src = "/images/search_minus_btn.gif";		
		theDiv.style.display = "block";
		if(window.isIE)
		{
			// hide spacer
			theDiv.nextSibling.style.display = "none";
		}
	}
}

function doLargePic( _image ){
 
        var popWin = window.open('','prevWin','width=509,height=333');
        var msg= "<HTML>";
        msg += "<HEAD>";
        msg += "<TITLE>Image Viewer</TITLE></HEAD>";
        msg += "<BODY marginheight='0' marginwidth='0' leftmargin='0' topmargin='0' bgcolor='#cccccc'>";
        msg += "<table cellpadding='2' cellspacing='0'><tr height='330'>";
        msg += "<td width='510' valign='middle' align='center'><table cellpadding='0' cellspacing='0' border='1' bordercolor='#000000' bgcolor='#000000'><tr><td><img name='image01' src='" + _image + "' border='0' vspace='0' hspace='0' width='400'></td></tr></table></td></tr></table><scrip" + "t";
        msg += " language='javascript'>self.focus();</scrip" + "t>";
        msg += "</BODY>";
        msg += "</HTML>";
        popWin.document.write(msg);
        popWin.document.close();
        
        return;
}
