// JavaScript Document

//works with local xml file
//var dsProducts = new Spry.Data.XMLDataSet("assay_xml.xml", "/items/item", { entityEncodeStrings: -1 });

//doesn't work with server side xml file
/*var dsProducts = new Spry.Data.XMLDataSet("http://www3.appliedbiosystems.com/cms/groups/portal/documents/web_content/cms_076047.xml", "/items/item", { entityEncodeStrings: -1 });*/




function ffRNAana (ds, row, index){ return (row.type.match("RNA Analysis")) ? row : null; };
function ffDNAana(ds, row, index){ return (row.type.match("DNA Analysis")) ? row : null; };
function ffProana(ds, row, index){ return (row.type.match("Protein Analysis")) ? row : null; };
function ffFuncana(ds, row, index){ return (row.type.match("Functional Analysis")) ? row : null; };

function ffmRNA(ds, row, index){ return (row.application.match("mRNA detection and profiling")) ? row : null; };
function ffmiRNA(ds, row, index){ return (row.application.match("miRNA detection and profiling")) ? row : null; };
function ffSNPgeno(ds, row, index){ return (row.application.match("SNP Genotyping")) ? row : null; };
function ffMicroana(ds, row, index){ return (row.application.match("Microsatellite analysis")) ? row : null; };
function ffCNV(ds, row, index){ return (row.application.match("Copy Number Variation")) ? row : null; };
function ffProtein(ds, row, index){ return (row.application.match("Protein detection and quantification")) ? row : null; };
function ffRNAi(ds, row, index){ return (row.application.match("RNAi")) ? row : null; };
function ffDNA(ds, row, index){ return (row.application.match("DNA Sequenciing")) ? row : null; };

function ffSngltb(ds, row, index){ return (row.format.match("Single tube")) ? row : null; };
function ff48plt(ds, row, index){ return (row.format.match("48-well plate")) ? row : null; };
function ff96plt(ds, row, index){ return (row.format.match("96-well plate")) ? row : null; };
function ff384plt(ds, row, index){ return (row.format.match("384-well plate")) ? row : null; };
function ffTaqmnary(ds, row, index){ return (row.format.match("TaqMan® Array")) ? row : null; };
function ffAssay(ds, row, index){ return (row.format.match("Assay Set")) ? row : null; };

function ffRTPCR(ds, row, index){ return (row.tech.match("Real-time PCR - qPCR")) ? row : null; };
function ffCapelec(ds, row, index){ return (row.tech.match("Capillary Electrophoresis")) ? row : null; };
function ffChem(ds, row, index){ return (row.tech.match("Chemiluminescence")) ? row : null; };
function ffsiRNA(ds, row, index){ return (row.tech.match("siRNA")) ? row : null; };

function ToggleFilter(enable, f)
{
	if (enable)
		dsProducts.addFilter(f, true);
	else
		dsProducts.removeFilter(f, true);
}

function ClearAll(form)
{


	for (var c = 0; c < form.elements.length; c++){
		if (form.elements[c].type == 'checkbox') {
			form.elements[c].checked = false;
		}
	}


	dsProducts.clearAll(true);
}

function MM_effectBlind(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}





