<!--
function testDomain() {
	if ((location.host == "bro.com") || (location.hostname == "www.bro.com") || (location.hostname == "breault.com") || (location.hostname == "www.opticsvalley.com") || (location.hostname == "opticsvalley.com")){
		window.location.href = "http://www.breault.com"+location.pathname;
	}
}

function testRedirPath() {
	var webPath = new String( location.pathname.substr(1, location.pathname.length) );
	if ( webPath.toLowerCase() == 'movies' || webPath.toLowerCase() == 'movie' ) {
		window.location.href = "http://www.breault.com/multimedia-gallery.php?utm_source=Magazine&utm_medium=PrintAd&utm_term=Undefined&utm_content=2007v1&utm_campaign=Print";
	}
	else if ( webPath.toLowerCase() == 'dvd' || webPath.toLowerCase() == 'demo' ){
		window.location.href = "http://www.breault.com/software/asap-request-quote.php?utm_source=Magazine&utm_medium=PrintAd&utm_term=Undefined&utm_content=2007v2&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'asap') {
		window.location.href = "http://www.breault.com/software/asap-overview.php?utm_source=ASAPBrochure&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'asappro') {
		window.location.href = "http://www.breault.com/software/asap-pro.php?utm_source=ASAPFlyer&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'addons') {
		window.location.href = "http://www.breault.com/software/asap-optional-addons.php?utm_source=ASAPFlyer&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'multimedia') {
		window.location.href = "http://www.breault.com/multimedia-gallery.php?utm_source=InstallMedia&utm_medium=InstallMedia&utm_term=Undefined&utm_content=ASAP2009&utm_campaign=Multimedia";
	}
	else if (webPath.toLowerCase() == 'kbase') {
		window.location.href = "http://www.breault.com/k-base.php?utm_source=InstallMedia&utm_medium=InstallMedia&utm_term=Undefined&utm_content=ASAP2009&utm_campaign=Multimedia";
	}
	else if (webPath.toLowerCase() == 'maintenance') {
		window.location.href = "http://www.breault.com/software/support.php?utm_source=ASAPFlyer&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'features') {
		window.location.href = "http://www.breault.com/multimedia-gallery.php?utm_source=ASAPFlyer&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'training') {
		window.location.href = "http://www.breault.com/training/training-overview.php?utm_source=TrainingFlyer&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'versions') {
		window.location.href = "http://www.breault.com/software/asap-edition-comparison.php?utm_source=ASAPFlyer&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'editions') {
		window.location.href = "http://www.breault.com/software/asap-edition-comparison.php?utm_source=ASAPFlyer&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	
	// AHEM REDIRECTS
	else if (webPath.toLowerCase() == 'ahem') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=AHEM&submitButton=Search"; // DO NOT REMOVE (Archived in BRO documents)
	}
	else if (webPath.toLowerCase() == 'ahemjrs') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=AHEM&submitButton=Search&utm_source=JournalOfRefractiveSurgery&utm_medium=Article&utm_term=Undefined&utm_content=2008-10-08&utm_campaign=Print"; // DO NOT REMOVE (Archived in BRO documents)
	}
	else if (webPath.toLowerCase() == 'ahemdemos') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=AHEM&submitButton=Search"; // DO NOT REMOVE (Archived in BRO documents)
	}
	else if (webPath.toLowerCase() == 'ahemdocs') {
		window.location.href = "http://www.breault.com/k-base-search.php?limit=20&order=high&submitted=0&query=AHEM&submitButton=Search"; // DO NOT REMOVE (Archived in BRO documents)
	}
	
	// RSM REDIRECTS
	else if (webPath.toLowerCase() == 'rsm') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=RSM&submitButton=Search"; // DO NOT REMOVE (Archived in BRO documents)
	}
	else if (webPath.toLowerCase() == 'rsmdemos') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=RSM&submitButton=Search"; // DO NOT REMOVE (Archived in BRO documents)
	}
	else if (webPath.toLowerCase() == 'rsmdocs') {
		window.location.href = "http://www.breault.com/k-base-search.php?limit=20&order=high&submitted=0&query=RSM&submitButton=Search"; // DO NOT REMOVE (Archived in BRO documents)
	}
	
	// New Redirects as of 10.28.08
	else if (webPath.toLowerCase() == 'aerospace') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=aerospaceHighlights&utm_source=ASAPBrochure&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'bio') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=bioHighlights&utm_source=ASAPBrochure&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'illumination') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=illuminationHighlights&utm_source=ASAPBrochure&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'waveoptics') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=waveopticsHighlights&utm_source=ASAPBrochure&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	
	// New Redirect created on 03.30.09
	else if (webPath.toLowerCase() == 'engineering') {
		window.location.href = "http://www.breault.com/consulting/engineering-overview.php?utm_source=ESBrochure&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	
	// New Redirect created on 03.30.09
	else if (webPath.toLowerCase() == 'whatsnew') {
		window.location.href = "http://www.breault.com/multimedia-gallery.php?mode=features&utm_source=ASAPPoster&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009-06-10&utm_campaign=Print";
	}
	
	// New Redirects created on 07.22.09
	else if (webPath.toLowerCase() == 'deutsch') {
		window.location.href = "http://www.breault.com/localized/asap-german.php?utm_source=Photonik&utm_medium=Article&utm_term=Undefined&utm_content=2009-08-14&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'photonikmovie') {
		window.location.href = "http://www.breault.com/localized/asap-german.php?utm_source=Photonik&utm_medium=Movie&utm_term=Undefined&utm_content=2009-07-22&utm_campaign=Web";
	}
	else if (webPath.toLowerCase() == 'photonikbanner') {
		window.location.href = "http://www.breault.com/localized/asap-german.php?utm_source=Photonik&utm_medium=Banner&utm_term=Undefined&utm_content=2009-07-22&utm_campaign=Web";
	}
	else if (webPath.toLowerCase() == 'photoniktext') {
		window.location.href = "http://www.breault.com/localized/asap-german.php?utm_source=Photonik&utm_medium=Text&utm_term=Undefined&utm_content=2009-07-22&utm_campaign=Web";
	}
	
	// New Redirects created on 11.16.09
	else if (webPath.toLowerCase() == 'displays') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=displaysHighlights&utm_source=ASAPBrochure&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	else if (webPath.toLowerCase() == 'imaging') {
		window.location.href = "http://www.breault.com/multimedia-gallery-search.php?limit=20&order=high&submitted=0&query=imagingHighlights&utm_source=ASAPBrochure&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	
	// New Redirects created on 11.17.09
	else if (webPath.toLowerCase() == 'workflow') {
		window.location.href = "http://www.breault.com/software/asap-request-quote.php?utm_source=Magazine&utm_medium=PrintAd&utm_term=Undefined&utm_content=2009v1&utm_campaign=Print";
	}
	
	// New Redirects created on 1.7.2010
	else if (webPath.toLowerCase() == 'downloads') {
		window.location.href = "http://www.breault.com/software/support-downloads.php?utm_source=InstallMedia&utm_medium=InstallMedia&utm_term=Undefined&utm_content=ASAP2009&utm_campaign=Multimedia";
	}	

	// New Redirects created on 06.30.10
	else if (webPath.toLowerCase() == 'apex-workflow') {
		window.location.href = "http://www.breault.com/software/apex-workflow.php?utm_source=Magazine&utm_medium=PrintAd&utm_term=Undefined&utm_content=2010v1&utm_campaign=Print";
	}

	// New Redirects created on 08.31.10
	else if (webPath.toLowerCase() == 'apex') {
		window.location.href = "http://www.breault.com/software/apex-overview.php?utm_source=APEXFlyer&utm_medium=PrintCollateral&utm_term=Undefined&utm_content=2010v1&utm_campaign=Print";
	}

}


function clearKbaseSearch( fieldObj )
{
    if ( fieldObj.value == 'Search Phrase' )
    {
        fieldObj.value = '';  
    }
    else if ( fieldObj.value == 'Search Model Gallery' )
    {
        fieldObj.value = '';  
    }
}


function launchWin(url, h, w)
{
    var page = url;
    var width = unescape(w); //decode this var that are encoded on the site by XStandard
    var height = unescape(h);//decode this var that are encoded on the site by XStandard
    var parameters = "width=" + w +",height=" + h +",scrollbars=0,resizable=0,left=100,top=100,screenX=100,screenY=100";
    newWin = window.open(page, 'newWin', parameters);    
    newWin.resizeTo(width, height);
}


function rowOn(rowReference)
{
    rowReference.bgColor = '#d0e5fa';  
}
function rowOff(rowReference)
{
    rowReference.bgColor = '#ffffff';  
}




function confirmDelete(URL)
{
        var deleteOk = confirm("This action is not reversible...\nAre you sure you want to proceed?");
        if (deleteOk)
        {
                window.location.href = URL;
        }
        else
        {
                return;
        }
}



//redirect NS 4.x era browsers to upgrade page
var isNS = (document.layers)? true : false;
if (isNS){window.location.href = "/resources/redirect/upgrade.html";}





function goToGalleryUrl( selectObj )
{
        selectedOption = selectObj.options[selectObj.selectedIndex].value;
        if (selectedOption == 'all')
        {
                window.location = 'multimedia-gallery.php';
        }
        else if( selectedOption == 'empty' || selectedOption == 'divider' )
        {
                //nothing
        }
        else
        {
                window.location = 'multimedia-gallery.php?catTypeID=1&catID=' + selectedOption + '&mode=category';
        }
}


function goToKbaseUrl( selectObj )
{
        selectedOption = selectObj.options[selectObj.selectedIndex].value;
        if (selectedOption == 'all')
        {
                window.location = 'k-base.php';
        }
        else if( selectedOption == 'empty' || selectedOption == 'divider' )
        {
                //nothing
        }
        else
        {
                window.location = 'k-base.php?catTypeID=1&catID=' + selectedOption;
        }
}




//-->