<!--
	var homeoff = new Image();
	homeoff.src = "/images/kwc/bubble_home.gif";
	var homeon = new Image();
	homeon.src = "/images/kwc/bubble_home_on.gif";

	var progressoff = new Image();
	progressoff.src = "/images/kwc/bubble_progress.gif";
	var progresson = new Image();
	progresson.src = "/images/kwc/bubble_progress_on.gif";
		
	var logosoff = new Image();
	logosoff.src = "/images/kwc/bubble_logos.gif";
	var logoson = new Image();
	logoson.src = "/images/kwc/bubble_logos_on.gif";
	
	var modelsoff = new Image();
	modelsoff.src = "/images/kwc/bubble_models.gif";
	var modelson = new Image();
	modelson.src = "/images/kwc/bubble_models_on.gif";		


function currentBubble(navArea) 
{
	if(navArea == "home")
		document.home.src = homeon.src;
	else if(navArea == "logos")		
		document.logos.src = logoson.src;
	else if(navArea == "store")
		document.models.src = modelson.src;
	else if(navArea == "progress")
		document.progress.src = progresson.src;		
}


function performSearch(thisForm)
{	
	var theValue = thisForm.large_06.value;
	if(!isNull(theValue))
	{
		//thisForm.field_boolean_expression.value = "(medium_05 or medium_11 or medium_12 or large_06) AND collection_id";	
		//thisForm.medium_05.value = theValue;
		//thisForm.medium_11.value = theValue;
		//thisForm.medium_12.value = theValue;
		
		var field_boolean_expression = "(medium_05 OR medium_11 OR medium_12 OR large_06) AND collection_id";
		thisForm.action = eval('"/search/results.aspx?collection_id=0&medium_05=' + escape(theValue) + '&medium_06=' + escape(theValue) + '&medium_12=' + escape(theValue) + '&field_boolean_expression=' + escape(field_boolean_expression) + '"');
	}	
	
	thisForm.submit();
	return true;
}


function cleanUpLeftSearch()
{
	var leftSearchForm = document.left_search;
	if(!isNull(leftSearchForm.large_06.value))
		leftSearchForm.large_06.value = "";
}


function gotoAdvancedSearchPage(formObject)
{	
	formObject.action = "/custom/advanced_search.aspx";
	formObject.submit();
}


function acceptAgreement(thisForm)
{
	if(!thisForm.i_agree.checked)
	{
		alert('To download this image you must accept the terms\n of the License Agreement by clicking the box below.')
		return false;
	}
	else
	   return true;

}


function validateDownloadButton(thisForm, dwnldFilename, downloadPreference)
{
    if(acceptAgreement(thisForm))
    {	

	var index = thisForm.transformations.selectedIndex;
	
	if(index == 0  || index == -1)
	{
		alert("Please select format for download!");
		return false;
	}
	else {
	    var theValue = thisForm.elements["transformations"].options[index].value;
		
	    var caption_id = thisForm.caption_id.value;
	    var collection_id = thisForm.collection_id.value;
	    var url;
	    
	    if(downloadPreference == "browser")
	    {				
		if(theValue == "original_asset")
		   url = "/archive/" + dwnldFilename + "?method=download&captionId=" + caption_id;
		else		
		   url = "/browse/" + theValue + "/" + caption_id + "?method=download";   		
	    }
	    else	    
		url = "/viewer/download_launch.bhtml?captionId=" + caption_id + "&filename=" + escape(dwnldFilename) + "&collection_id=" + collection_id + "&target=viewer&format_preference=" + theValue;
				
	    window.location.href = url;
	    return false;
	}
	
     }
     else
        return false;
}


function handleDropDownForm(thisForm, action)
{	
	var theForm = thisForm;
	var thisWidget;
	
	if(action.name == "view_models")
	{
		thisWidget = theForm.models_list;
		
		if(thisWidget.selectedIndex != -1 
			&& thisWidget.selectedIndex != 0 
			&& !isNull(thisWidget.options[thisWidget.selectedIndex].value))
		    document.location='/custom/model_template.aspx?collection_id=' + thisWidget.options[thisWidget.selectedIndex].value;
	
	}
	else if(action.name == "view_logos")
	{
		thisWidget = theForm.logos_list;
		
		if(thisWidget.selectedIndex != -1 
			&& thisWidget.selectedIndex != 0 
			&& !isNull(thisWidget.options[thisWidget.selectedIndex].value))
		    document.location=thisWidget.options[thisWidget.selectedIndex].value;
	}
	else if(action.name == "search_page")
	{
		thisWidget = theForm.search_page_option;
		
		if(thisWidget.selectedIndex != -1 
			&& thisWidget.selectedIndex != 0 
			&& !isNull(thisWidget.options[thisWidget.selectedIndex].value))
		    document.location=thisWidget.options[thisWidget.selectedIndex].value;
	}

}


//-->