var ads = new Array (); // the name of the product
var ad_images_path = "./common/images/single_product/";
var ad_images;


init_ads();


function init_ads()
{
	var ad = null;
	var image_names = new Array();
	
	/* Metalife BioExplorer */
	ad = new Object();
	ad.suite_title = "Metalife Explorer Suite"
	ad.suite_name = "adv_explorer";
	ad.suite_icon = ad_images_path+"icon_explorer_small.gif";
	ad.suite_link = "products/metalife_trinity.html?suite=explorer";
	ad.p_title = "Metalife BioExplorer";
	ad.p_name = "adv_bioexplorer";
	ad.p_icon = ad_images_path+"icon_bioexplorer_small.gif";
	ad.p_link = "products/product.html?product=be";	
	ad.screenshot = ad_images_path+"scrnshot_bioexplorer.jpg";
	ad.text =  "Metalife BioExplorer compiles automatically a \
				non-redundant set of detailed dossiers about genes and \
				proteins providing a fast and easy access to all relevant \
				information. These dossiers contain information from more than \
				80 public databases and are additionally enhanced with text \
				extracted relationships from scientific publications.";
	ads.push(ad);
	
	/* Add image names*/
	image_names.push("icon_explorer_small");
	image_names.push("icon_bioexplorer_small");
	
	
	/* Metalife Genome Comparison Tool */
	ad = new Object();
	ad.suite_title = "Metalife Predictor Suite"
	ad.suite_name = "adv_predictor";
	ad.suite_icon = ad_images_path+"icon_predictor_small.gif";
	ad.suite_link = "products/metalife_trinity.html?suite=predictor";
	ad.p_title = "Metalife Genome Comparison Tool";
	ad.p_name = "adv_gct";
	ad.p_icon = ad_images_path+"icon_gct_small.gif";
	ad.p_link = "products/product.html?product=gct";	
	ad.screenshot = ad_images_path+"scrnshot_gct.jpg";
	ad.text =  "Metalife Genome Comparison Tool incorporates a graphical user interface that allows our users to \
				analyze and compare genomes, contigs, CDSs, protein sequences, and various user defined regions \
				on the genomes on a large scale, and also to look for their sequence annotations in selected databases.<br />\
				Metalife Genome Comparison Tool integrates also algorithms for pairwise local alignments like BLAST, MegaBLAST and BLASTZ.";
	ads.push(ad);
	
	/* Add image names*/
	image_names.push("icon_predictor_small");
	image_names.push("icon_gct_small");

	/* Metalife Recognition Tool */
	ad = new Object();
	ad.suite_title = "Metalife Analyzer Suite"
	ad.suite_name = "adv_analyzer";
	ad.suite_icon = ad_images_path+"icon_analyzer_small.gif";
	ad.suite_link = "products/metalife_trinity.html?suite=analyzer";
	ad.p_title = "Metalife Recognition Tool";
	ad.p_name = "adv_rt";
	ad.p_icon = ad_images_path+"icon_recognition_tool_small.gif";
	ad.p_link = "products/product.html?product=rt";	
	ad.screenshot = ad_images_path+"scrnshot_recognition_tool.jpg";
	ad.text =  "Metalife Recognition Tool performs online analysis of any type of scientific text. It combines\
				sophisticated linguistically motivated statistical methods \
				to find biologically meaningful relationships between objects within text (e.g. the association between a given disease and known drugs).<br />\
				Our application allows the researchers to find new information that is not explicitly contained in any of the documents.";
	ads.push(ad);
	
	/* Add image names*/
	image_names.push("icon_analyzer_small");
	image_names.push("icon_recognition_tool_small");
	
	
	/* Metalife HVSR */
	ad = new Object();
	ad.suite_title = "Metalife Explorer Suite"
	ad.suite_name = "adv_explorer";
	ad.suite_icon = ad_images_path+"icon_explorer_small.gif";
	ad.suite_link = "products/metalife_trinity.html?suite=explorer";
	ad.p_title = "Metalife High-Value Sequence Repository";
	ad.p_name = "adv_hvsr";
	ad.p_icon = ad_images_path+"/icons/hvsr.gif";
	ad.p_link = "products/product.html?product=hvsr";	
	ad.screenshot = ad_images_path+"/screenshots/hvsr.jpg";
	ad.text =  "Metalife High-Value Sequence Repository is a highly optimized and \
	scalable system, designed to meet the need of enormous content management and \
	knowledge based discovery models by the pharmaceutical industry.\
	The repository itself has the purpose to serve as a knowledge based \
	system for information retrieval and submission.";
	
	
	ads.push(ad);
	
	/* Add image names*/
	image_names.push("icon_explorer_small");
	image_names.push("/icons/hvsr");
	
	
	/* Metalife Gene Nominator */
	ad = new Object();
	ad.suite_title = "Metalife Explorer Suite"
	ad.suite_name = "adv_explorer";
	ad.suite_icon = ad_images_path+"icon_explorer_small.gif";
	ad.suite_link = "products/metalife_trinity.html?suite=explorer";
	ad.p_title = "Metalife Gene Nominator";
	ad.p_name = "adv_gs";
	ad.p_icon = ad_images_path+"/icons/gene_nominator.gif";
	ad.p_link = "products/product.html?product=gs";	
	ad.screenshot = ad_images_path+"/screenshots/gene_nominator.jpg";
	ad.text =  "Metalife Gene Nominator is a supplement to a sequence repository, where selected entries can be further evaluated, ranked and filtered in the context of a given laboratory project. The application extends the abilities of the sequence repository for manual annotation and serves as a central repository for storing all kind of documents related to a given entry from the sequence repository.";
	
	
	ads.push(ad);
	
	/* Add image names*/
	image_names.push("icon_explorer_small");
	image_names.push("/icons/gene_nominator");
	
	
	/* Metalife Job Designer */
	ad = new Object();
	ad.suite_title = "Metalife Predictor Suite"
	ad.suite_name = "adv_predictor";
	ad.suite_icon = ad_images_path+"icon_predictor_small.gif";
	ad.suite_link = "products/metalife_trinity.html?suite=predictor";
	ad.p_title = "Metalife Job Designer";
	ad.p_name = "adv_jd";
	ad.p_icon = ad_images_path+"/icons/job_designer.gif";
	ad.p_link = "products/product.html?product=jd";	
	ad.screenshot = ad_images_path+"/screenshots/job_designer.jpg";
	ad.text =  "Metalife Job Designer is a dynamic interface for building custom pipelines of algorithms. \
				These pipelines are predefined workflows represented by connecting the inputs and outputs of more than 140 \
				different bioinformatics algorithms. The application provides the ability to perform step-by-step \
				investigations, automatic high-throughput annotation of sequences, export and storage of results \
				and much more.";
	
	
	ads.push(ad);
	
	/* Add image names*/
	image_names.push("icon_predictor_small");
	image_names.push("/icons/job_designer");
	
	/* Metalife MetaText */
	ad = new Object();
	ad.suite_title = "Metalife Analyzer Suite"
	ad.suite_name = "adv_analyzer";
	ad.suite_icon = ad_images_path+"icon_analyzer_small.gif";
	ad.suite_link = "products/metalife_trinity.html?suite=analyzer";
	ad.p_title = "Metalife MetaText";
	ad.p_name = "adv_mt";
	ad.p_icon = ad_images_path+"/icons/metatext.gif";
	ad.p_link = "products/product.html?product=mt";	
	ad.screenshot = ad_images_path+"/screenshots/metatext.jpg";
	ad.text =  "Metalife MetaText is a text mining tool designed to cover different aspects of information \
				extraction from biomedical literature coming from a variety of knowledge domains. Approximately \
				30 distinct ontology-based vocabularies are structured and available to provide \
				genome, proteome and metabolome analysis, cell structure, functions and \
				processes, chemical and biochemical mechanisms, as well as organisms' taxonomy.";
	
	
	ads.push(ad);
	
	/* Add image names*/
	image_names.push("icon_analyzer_small");
	image_names.push("/icons/metatext");
	
	
	
	
	preload_over_images(ad_images_path,image_names,ad_images);
	}



function put_ad(container_id) 
{
var container = document.getElementById(container_id);
var ad_index=Math.floor(Math.random()*ads.length);
var adv = ads[ad_index];

var ad_html="<div id=\"hp_ad_title\"><div class=\"adv_suite_link\" onclick=\"window.location='"+adv.suite_link+"'\" \
			onmouseover=\"javascript:switch_suite_icon('"+adv.suite_name+"');\" \
			onmouseout=\"javascript:switch_suite_icon('"+adv.suite_name+"');\"> \
			<div style=\"float:left; display:inline;padding-bottom:5px;\"><img border=\"0\" id=\""+adv.suite_name+"\" src=\""+adv.suite_icon+"\" /> </div> \
			<div style=\"float:left; display:inline; padding-top:8px;padding-left:8px;\">"+adv.suite_title+"</div>\
			</div>\
			</div>\
			<div id=\"hp_ad_arrow\"> </div>\
			<div id=\"hp_ad_content\"> \
			<div class=\"adv_suite_link\" onclick=\"window.location='"+adv.p_link+"'\" \
			onmouseover=\"javascript:switch_suite_icon('"+adv.p_name+"');\" \
			onmouseout=\"javascript:switch_suite_icon('"+adv.p_name+"');\"> \
			<div style=\"float:left;width:290px;\"><div style=\"float:left; display:inline;\"><img border=\"0\" id=\""+adv.p_name+"\" src=\""+adv.p_icon+"\" /> </div> \
			<div style=\"float:left; width:250px;display:inline; padding-top:8px;padding-left:8px;\">"+adv.p_title+"</div>\
			</div></div>\
			<div id=\"hp_ad_screenshot\">\
			<img src=\""+adv.screenshot+"\" border=\"0\" \>\
			</div>\
			</div>";

// var ad_html="<div id=\"hp_ad_title\">\
			// <div style=\"float:left; display:inline;padding-bottom:5px;\"><img border=\"0\" id=\""+adv.suite_name+"\" src=\""+adv.suite_icon+"\" /> </div> \
			// <div style=\"float:left; display:inline; padding-top:8px;padding-left:8px;color: #3b6b93;\">"+adv.suite_title+"</div>\
			// </div>\
			// <div id=\"hp_ad_arrow\"> </div>\
			// <div id=\"hp_ad_content\"> \
			// <div style=\"float:left;width:290px;\"><div style=\"float:left; display:inline;\"><img border=\"0\" id=\""+adv.p_name+"\" src=\""+adv.p_icon+"\" /> </div> \
			// <div style=\"float:left; width:180px;display:inline; padding-top:8px;padding-left:8px;color: #3b6b93;\">"+adv.p_title+"</div>\
			// </div>\
			// <div id=\"hp_ad_screenshot\">\
			// <img src=\""+adv.screenshot+"\" border=\"0\" \>\
			// </div>\
			// </div>";
			
			
			
container.innerHTML = ad_html;
var ad_text_container = document.getElementById(container_id+"_extension"); 
ad_text_container.innerHTML = adv.text;

}

