<!--hide this script from non-javascript-enabled browsers

//////////////////////////////////////////////////////////
//
// Oxford Cryosystems navigation system
//
// Produced by Presenting Science
//  www.PresentingScience.com
//
// Copyright (C) Oxford Cryosystems
//
//////////////////////////////////////////////////////////


var contentsFrame = "_self";		// The name of the usual frame for displaying stuff under the navigation bar
var previewImage = "previewImage";		// The name of the preview image in the navigation bar
var rootURL = "/";

// The Product object will hold various info about a product
function Product(name, description, imageUrl, url, targetFrame) {
    this.name = name;
    this.description = description;
    this.imageUrl = imageUrl;
    this.url = url;
    this.targetFrame = targetFrame;
}

// The Keyword object holds a list of keywords and associated urls
function Keyword(name, url, targetFrame) {
    this.name = name;
    this.url = url;
    this.targetFrame = targetFrame;
}

// List of keywords. This is where keywords should be added / deleted
var keywordCount = 0;
var keywordList = new Array;

keywordList[keywordCount++] = new Keyword("newsletter", "company/news.htm", contentsFrame);
keywordList[keywordCount++] = new Keyword("DTC", "dtc/index.htm", contentsFrame);

// List of products. This is where products should be added / deleted
var productCount = 0;
var productList = new Array;

productList[productCount++] = new Product("All",// The string displayed in the drop down menu 
	"List all products", 			// A longer description displayed in the status bar when this string is selected
	"previewAll.gif", 			// An image displayed when this string is selected
	"index.htm", 				// The page displayed when the Go button is pressed on this Product
	contentsFrame);				// The frame in which the above page is displayed - usually contentsFrame or "_blank"

productList[productCount++] = new Product("Cryostream", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- 700 Series Cryostream", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/700series.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Cryostream Plus", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/plus.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Cryostream Compact", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/compact.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Cryostream peripherals", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/peripherals.htm", 
	contentsFrame);
productList[productCount++] = new Product("--- AD51 dry air unit", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/ad51.htm", 
	contentsFrame);
productList[productCount++] = new Product("--- Dewar", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/dewar.htm", 
	contentsFrame);
productList[productCount++] = new Product("--- Varibeam coldhead support stand", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/varibeam.htm", 
	contentsFrame);
productList[productCount++] = new Product("--- Auto-fill system", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/autofill.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Users page", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryostream/users.htm", 
	contentsFrame);
//productList[productCount++] = new Product("-- Cryoshutter", 
	//"Open flow nitrogen cooler", 
	//"previewCryo.gif", 
	//"cryostream/cryoshutter.htm", 
	//contentsFrame);
//productList[productCount++] = new Product("-- New pump unit", 
	//"Open flow nitrogen cooler", 
	//"previewCryo.gif", 
	//"cryostream/newpump.htm", 
	//contentsFrame);
//productList[productCount++] = new Product("-- Nozzle alignment tool", 
	//"Open flow nitrogen cooler", 
	//"previewCryo.gif", 
	//"cryostream/nozzalign.htm", 
	//contentsFrame);
productList[productCount++] = new Product("Cobra", 
	"Open flow non-liquid cooler", 
	"previewCryo.gif", 
	"cobra/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("HeliX", 
	"Open flow helium cooler", 
	"previewCryo.gif", 
	"helix/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("PheniX", 
	"Closed helium cooler for powder diffraction", 
	"previewCryo.gif", 
	"phenix/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("Desktop Cooler", 
	"Simple stress-free cooling", 
	"previewCryo.gif", 
	"dtc/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Cryopad DTC", 
	"DTC control software", 
	"previewCryo.gif", 
	"cryopaddtc/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("Cryo Accessories", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"cryo_accessories/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Crystal handling tools", 
	"Extended detachable arcs to fit all goniometer heads", 
	"previewCryo.gif", 
	"cryo_accessories/crystal.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Arcs", 
	"Extended detachable arcs to fit all goniometer heads", 
	"previewCryo.gif", 
	"cryo_accessories/arcs.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Top hats, pins & bases", 
	"Top quality essentials! ", 
	"previewCryo.gif", 
	"cryo_accessories/hats.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Cryotongs", 
	"For transfer of frozen macromolecular crystals to and from the cold stream", 
	"previewCryo.gif", 
	"cryo_accessories/tongs.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Vial holder kit", 
	"All the tools you needs for the easy manipulation of frozen Cryovials", 
	"previewCryo.gif", 
	"cryo_accessories/vialholder.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Magnetic wand", 
	"For facilitating storage of frozen samples ", 
	"previewCryo.gif", 
	"cryo_accessories/wand.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Cryo storage kit", 
	"Dewars, dry shippers and more; essential for handling frozen crystals", 
	"previewCryo.gif", 
	"cryo_accessories/cryokit.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Xcell", 
	"Xenon pressure chamber", 
	"previewCryo.gif", 
	"xcell/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- LMB guide to crystal manipulation", 
	"Dewars, dry shippers and more; essential for handling frozen crystals", 
	"previewCryo.gif", 
	"cryo_accessories/lmb.htm", 
	contentsFrame);
productList[productCount++] = new Product("Cryopad", 
	"Monitor and control cryo hardware", 
	"previewCryo.gif", 
	"cryopad/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Download Cryopad", 
	"Monitor and control cryo hardware", 
	"previewCryo.gif", 
	"cryopad/download.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Cryopad communication protocol", 
	"Monitor and control cryo hardware", 
	"previewCryo.gif", 
	"cryopad/protocol.htm", 
	contentsFrame);
productList[productCount++] = new Product("Cryopad DTC", 
	"Monitor and control cryo hardware", 
	"previewCryo.gif", 
	"cryopaddtc/index.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Download Cryopad DTC", 
	"Monitor and control cryo hardware", 
	"previewCryo.gif", 
	"cryopaddtc/download.htm", 
	contentsFrame);
productList[productCount++] = new Product("-- Cryopad DTC communication protocol", 
	"Monitor and control cryo hardware", 
	"previewCryo.gif", 
	"cryopaddtc/protocol.htm", 
	contentsFrame);
//productList[productCount++] = new Product("Metripol", 
//	"Open flow nitrogen cooler", 
//	"previewCryo.gif", 
//	"metripol/index.htm", 
//	contentsFrame);

productList[productCount++] = new Product("Coolstar", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"coolstar/index.htm", 
	contentsFrame);

productList[productCount++] = new Product("Crystallographica", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"http://www.crystallographica.co.uk/", 
	"_blank");
productList[productCount++] = new Product("-- Crystallographica", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"http://www.crystallographica.co.uk/?crystallographica", 
	"_blank");
productList[productCount++] = new Product("-- Search-Match", 
	"Open flow nitrogen cooler", 
	"previewCryo.gif", 
	"http://www.crystallographica.co.uk/?search-match", 
	"_blank");


// Populate the drop down with the above list of products
function addProducts(productName) {
    var i=0;
    var dropDown = document.form.productFinder;
    dropDown.options.length=0;
    for (i=0; i<productCount; i++) {
		var thisProduct = productName == productList[i].name;
        dropDown.options[i] = new Option( productList[i].name, productList[i].url, thisProduct, thisProduct);
    }
	gotoPage();
}

// Change the product preview image and status bar text in response to selection change
function previewProduct() {
    var dropDown = document.form.productFinder;
    var sel = dropDown.selectedIndex;
    var p = productList[sel];
    //document.images[previewImage].src = p.imageUrl;
    //status = p.description;

    //findProduct();
}

// Navigate to the selected product in response to the Go button
function findProduct() {
    var dropDown = document.form.productFinder;
    var sel = dropDown.selectedIndex;
    var p = productList[sel];
    openPage(p);
}

// Extract any arguments from the URL and go to the appropriate page
function gotoPage() {
    var i;
    var name = parent.location.search.substring(1);
    var found = false;

    if (name && name.length>0) {
        name = name.toUpperCase();

	// Look for possible matches with keyword list
        for (i=0; i<keywordCount; i++) {
            var p = keywordList[i];
            var n = p.name.toUpperCase();

            if (n.indexOf(name)>-1) {
                openPage(p);
                found = true;
                break;
            }

        }

	if (!found) {
	    // Look for possible matches with product list
            for (i=0; i<productCount; i++) {
                var p = productList[i];
                var n = p.name.toUpperCase();

                if (n.indexOf(name)>-1) {
                    openPage(p);
                    break;
                }
            }
        }

    }

}

function openPage(p) {
    if (p.targetFrame=="_self")
		location = rootURL + p.url;
    else if (p.targetFrame=="_blank")
		window.open(p.url);
	else
		parent.frames[p.targetFrame].location = rootURL + p.url;	
}

function doPrint() {
	parent.frames[contentsFrame].focus();
	parent.frames[contentsFrame].print();
}




// stop hiding -->
