var theme_background_color;var theme_mis_background_color;var theme_about_background_color;//default variablesvar feature_jump_bar_top = 40 + "px";var feature_jump_bar_left = 400 + "px";var feature_jump_bar_width = 0 + "px";//manageTheme: this function takes the variable of layout and theme from the XML file (homepage.xml) - and turns it into properly aligned and colored html.function manageTheme(){	if (theme != null){	}	else {		//set default style		theme = "blood_new";	}//location of theme folder	theme_root = "themes/" + theme + "/theme";//colorizing gifs		theme_a = "_a.gif";	theme_b = "_b.gif";	theme_c = "_c.gif";	theme_d = "_d.gif";	theme_e = "_e.gif";	theme_f = "_f.gif";	theme_g = "_g.gif";//set variables for stylesheets	 	if(theme == "blood2"){	 	theme_background_color = "#5F1933"; //c		theme_mis_background_color = "#100F0E"; //b		theme_about_background_color = "#222222"; //a			theme_spacer_image = theme_root + theme_e;		theme_medium = theme_root + theme_d;		theme_dark = theme_root + theme_c;		theme_highlight = theme_root + theme_g;					feature_title_font_color = "#FFFFFF";		feature_title_font_size = "1.3em";		feature_subtitle_font_color = "#FFFFFF";		feature_subtitle_font_size = "1.1em";	}	else if(theme == "urchin2"){		theme_background_color = "#2B2F3D";		theme_mis_background_color = "#100F0E";		theme_about_background_color = "#222222";				theme_spacer_image = theme_root + theme_e;		theme_medium = theme_root + theme_d;		theme_dark = theme_root + theme_c;		theme_highlight = theme_root + theme_g;				feature_title_font_color = "#FFFFFF";		feature_title_font_size = "1.3em";		feature_subtitle_font_color = "#FFFFFF";		feature_subtitle_font_size = "1.1em";	}	else if(theme == "zebrafish"){		theme_background_color = "#474634";		theme_mis_background_color = "#100F0E";		theme_about_background_color = "#222222";		 		theme_spacer_image = theme_root + theme_e;		theme_medium = theme_root + theme_d;		theme_dark = theme_root + theme_b;		theme_highlight = theme_root + theme_g; 			 	feature_title_font_color = "#FFFFFF";		feature_title_font_size = "1.3em";		feature_subtitle_font_color = "#FFFFFF";		feature_subtitle_font_size = "1.1em";	}		else if(theme == "stem_cells2"){		theme_background_color = "#43332B";		theme_mis_background_color = "#100F0E";		theme_about_background_color = "#222222";		 		theme_spacer_image = theme_root + theme_e;		theme_medium = theme_root + theme_d;		theme_dark = theme_root + theme_c;		theme_highlight = theme_root + theme_g; 			 	feature_title_font_color = "#FFFFFF";		feature_title_font_size = "1.3em";		feature_subtitle_font_color = "#FFFFFF";		feature_subtitle_font_size = "1.1em";	}	else if(theme == "cancer_cells"){		theme_background_color = "#514B4C";		theme_mis_background_color = "#100F0E";		theme_about_background_color = "#222222";		 		theme_spacer_image = theme_root + theme_e;		theme_medium = theme_root + theme_d;		theme_dark = theme_root + theme_c;		theme_highlight = theme_root + theme_g; 			 	feature_title_font_color = "#FFFFFF";		feature_title_font_size = "1.3em";		feature_subtitle_font_color = "#FFFFFF";		feature_subtitle_font_size = "1.1em";	}	else if(theme == "neurons"){		theme_background_color = "#022D3C";		theme_mis_background_color = "#100F0E";		theme_about_background_color = "#222222";		 		theme_spacer_image = theme_root + theme_e;		theme_medium = theme_root + theme_d;		theme_dark = theme_root + theme_b;		theme_highlight = theme_root + theme_g; 			 	feature_title_font_color = "#FFFFFF";		feature_title_font_size = "1.3em";		feature_subtitle_font_color = "#FFFFFF";		feature_subtitle_font_size = "1.1em";	}	else if(theme == "cancer"){		theme_background_color = "#52584E";		theme_mis_background_color = "#100F0E";		theme_about_background_color = "#222222";		 		theme_spacer_image = theme_root + theme_e;		theme_medium = theme_root + theme_d;		theme_dark = theme_root + theme_c;		theme_highlight = theme_root + theme_g; 			 	feature_title_font_color = "#FFFFFF";		feature_title_font_size = "1.3em";		feature_subtitle_font_color = "#FFFFFF";		feature_subtitle_font_size = "1.1em";	}	else if(theme == "frogs"){		theme_background_color = "#4F5438";		theme_mis_background_color = "#100F0E";		theme_about_background_color = "#222222";		 		theme_spacer_image = theme_root + theme_e;		theme_medium = theme_root + theme_d;		theme_dark = theme_root + theme_c;		theme_highlight = theme_root + theme_g; 			 	feature_title_font_color = "#FFFFFF";		feature_title_font_size = "1.3em";		feature_subtitle_font_color = "#FFFFFF";		feature_subtitle_font_size = "1.1em";	}	else{}	//************************************************************	//choose theme layout	if (layout != null){	}		else {	//set default	  layout = "boxes";	}	 //adapt divs to layout 		if(layout == "boxes"){			setStyle_Boxes();		}		else if(layout == "boxes_wide"){			setStyle_Boxes_Wide();		}		else if(layout == "event"){			setStyle_Boxes_Event();		}		else if(layout == "bars"){			setStyle_Bars();		}		else if(layout == "magazine"){			setStyle_Magazine();		}		else if(layout == "tabs"){			setStyle_Tabs();		}		else{			setStyle_Boxes();		}		}//setStyle_Boxes() sets the position, opacity, special sizing for the BOX layoutfunction setStyle_Boxes(){theme_banner_image = theme_root + "_upper.jpg";theme_banner_lower_image = theme_root + "_lower.jpg";theme_banner_description = "description";//feature box theme***********************************feature_top = 370;feature_width = 360;feature_text_width = 350;feature_left = 15;feature_height = 100;feature_opacity = 90;feature_jump_bar_top = "73px";feature_jump_bar_left = "250px";feature_jump_bar_width = "100px";microsoft_feature_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 50)";feature_color = theme_dark;feature_background_color = theme_background_color;   //about box theme***********************************about_width = 800;about_height = 55;about_top = 480;about_left = 0;about_opacity = 100;microsoft_about_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 20)";about_color = theme_root + theme_a;about_highlight_color = theme_root + theme_f;about_theme_root = theme_root + "_about";//about_image_spacing = 10;roundLeftAboutTag =  "<img src='" + about_theme_root + "_round_ul.gif' ><img src='" + about_color + "' height='" + (about_height-10) + "' width='10'><img src='" + about_theme_root + "_round_ll.gif' >";//****************************************************// apply these variables to the html pagesetStyle();}function setStyle_Boxes_Wide(){theme_banner_image = theme_root + "_upper.jpg";theme_banner_lower_image = theme_root + "_lower.jpg";theme_banner_description = "description";//feature box theme***********************************feature_top = 340;feature_width = 360;feature_text_width = 350;feature_left = 15;feature_height = 130;feature_opacity = 75;feature_jump_bar_top = "103px";feature_jump_bar_left = "250px";feature_jump_bar_width = "100px";microsoft_feature_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 50)";feature_color = theme_dark;feature_background_color = theme_background_color;  //about box theme***********************************about_width = 800;about_height = 55;about_top = 480;about_left = 0; about_opacity = 100;microsoft_about_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 20)";about_color = theme_root + theme_a;about_highlight_color = theme_root + theme_f;about_theme_root = theme_root + "_about";//about_image_spacing = 10;roundLeftAboutTag =  "<img src='" + about_theme_root + "_round_ul.gif' ><img src='" + about_color + "' height='" + (about_height-10) + "' width='10'><img src='" + about_theme_root + "_round_ll.gif' >";//****************************************************// apply these variables to the html pagesetStyle();}function setStyle_Event(){theme_banner_image = theme_root + "_upper.jpg";theme_banner_lower_image = theme_root + "_lower.jpg";theme_banner_description = "description";//feature box theme***********************************feature_top = 340;feature_width = 360;feature_text_width = 350;feature_left = 15;feature_height = 130;feature_opacity = 75;feature_jump_bar_top = "103px";feature_jump_bar_left = "250px";feature_jump_bar_width = "100px";microsoft_feature_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 50)";feature_color = theme_dark;feature_background_color = theme_background_color;  //about box theme***********************************about_width = 320;about_height = 45;about_top = 425;about_left = 473; about_opacity = 100;microsoft_about_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 20)";about_color = theme_root + theme_a;about_highlight_color = theme_root + theme_f;about_theme_root = theme_root + "_about";//about_image_spacing = 10;roundLeftAboutTag =  "<img src='" + about_theme_root + "_round_ul.gif' ><img src='" + about_color + "' height='" + (about_height-10) + "' width='10'><img src='" + about_theme_root + "_round_ll.gif' >";//****************************************************// apply these variables to the html pagesetStyle();}function setStyle_Bars(){	//feature box theme***********************************	feature_top = 250;	feature_width = 330;	feature_text_width = 300;	feature_left = 430;	feature_height = 150;	feature_opacity = 90;	microsoft_feature_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 90)";	feature_jump_bar_top = "-160px";	feature_jump_bar_left = "200px";	feature_jump_bar_width = "100px";	feature_color = theme_dark;	feature_background_color = theme_background_color;	 //about box theme***********************************	about_width = 792;	about_height = 55;	about_top = 405;	about_left = 0;	 	about_opacity = 80;	microsoft_about_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 80)";	about_color = theme_root + theme_a;	about_highlight_color = theme_root + theme_f;	about_theme_root = theme_root + "_about";		about_image_spacing = 2;	//****************************************************roundLeftAboutTag =  "";			// apply these variables to the html page	setStyle();}function setStyle_Magazine(){//feature box theme***********************************feature_top = 10;feature_width = 500;feature_text_width = 300;feature_left = 20;feature_height = 250;feature_opacity = 1;microsoft_feature_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 50)";feature_color = theme_dark;feature_background_color = theme_background_color;  //about box theme***********************************about_width = 340;about_height = 50;about_top = 410;about_left = 453; about_opacity = 90;microsoft_about_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 90)";about_color = theme_root + theme_a;about_highlight_color = theme_root + theme_f;about_theme_root = theme_root + "_about";about_image_spacing = 2;roundLeftAboutTag =  "<img src='" + about_theme_root + "_round_ul.gif' ><img src='" + about_color + "' height='" + (about_height-10) + "' width='10'><img src='" + about_theme_root + "_round_ll.gif' >";//****************************************************// apply these variables to the html pagesetStyle();}function setStyle_Tabs(){//feature box theme***********************************feature_top = 300;feature_width = 400;feature_text_width = 380;feature_left = 20;feature_height = 170;feature_opacity = 1;microsoft_feature_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 50)";feature_color = theme_dark;feature_background_color = theme_background_color;  //about box theme***********************************about_width = 340;about_height = 50;about_top = 410;about_left = 480; about_opacity = 90;microsoft_about_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 90)";about_color = theme_root + theme_a;about_highlight_color = theme_root + theme_f;about_theme_root = theme_root + "_about";about_image_spacing = 2;roundLeftAboutTag =  "<img src='" + about_theme_root + "_round_ul.gif' ><img src='" + about_color + "' height='" + (about_height-10) + "' width='10'><img src='" + about_theme_root + "_round_ll.gif' >";//****************************************************// apply these variables to the html pagesetStyle();}function setStyle_Blur(){//feature box theme***********************************feature_top = 280;feature_width = 400;feature_text_width = 380;feature_left = 20;feature_height = 200;feature_opacity = 1;microsoft_feature_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 50)";feature_color = theme_dark;feature_background_color = theme_background_color;  //about box theme***********************************about_width = 340;about_height = 50;about_top = 450;about_left = 470; about_opacity = 90;microsoft_about_opacity =  "progid:DXImageTransform.Microsoft.Alpha(Opacity = 90)";about_color = theme_root + theme_a;about_highlight_color = theme_root + theme_f;about_theme_root = theme_root + "_about";about_image_spacing = 2;roundLeftAboutTag =  "<img src='" + about_theme_root + "_round_ul.gif' ><img src='" + about_color + "' height='" + (about_height-10) + "' width='10'><img src='" + about_theme_root + "_round_ll.gif' >";//****************************************************// apply these variables to the html pagesetStyle();}function setStyle(){				document.body.style.backgroundColor = theme_mis_background_color;		if (document.getElementById("feature_title") != null){			document.getElementById("feature_title").style.color = feature_title_font_color;			document.getElementById("feature_title").style.fontSize = feature_title_font_size;			document.getElementById("feature_title").style.width = feature_width - 20 + "px";			document.getElementById("feature_title").style.height = "auto";			document.getElementById("feature_title").style.top = 0 - feature_height + "px";		}		if (document.getElementById("feature") != null){						document.getElementById("feature").style.top = feature_top + "px";			document.getElementById("feature").style.width = feature_width + "px";			document.getElementById("feature").style.height = feature_height + "px";			document.getElementById("feature").style.left = feature_left + "px";		}		if (document.getElementById("feature_text") != null){						document.getElementById("feature_text").style.color =  feature_subtitle_font_color;			document.getElementById("feature_text").style.fontSize =feature_subtitle_font_size;			document.getElementById("feature_text").style.fontWeight = "bold";			document.getElementById("feature_text").style.top = -5 - feature_height + "px";			document.getElementById("feature_text").style.width = feature_text_width + "px";		}					if (document.getElementById("feature_jump_bar") != null){			document.getElementById("feature_jump_bar").style.top = feature_jump_bar_top;			document.getElementById("feature_jump_bar").style.width= feature_jump_bar_width;			document.getElementById("feature_jump_bar").style.left= feature_jump_bar_left;			document.getElementById("feature_jump_bar").style.color = feature_title_font_color;			//document.getElementById("feature_jump_bar").alinkColor = "#000000";			//document.getElementById("feature_jump_bar").vlinkColor = "#000000";		}					if (document.getElementById("round_left_feature") != null){			var roundLeftTag =  "<img src='" + theme_root + "_round_ul.gif' ><img src='" + feature_color + "' height='" + (feature_height-20) + "' width='10'><img src='" + theme_root + "_round_ll.gif' >";			document.getElementById("round_left_feature").innerHTML =  roundLeftTag;			document.getElementById("round_left_feature").style.MozOpacity = feature_opacity/100; 			document.getElementById("round_left_feature").style.filter = 'alpha(opacity=' + feature_opacity + ')';			document.getElementById("round_left_feature").style.filter = microsoft_feature_opacity;		}					if (document.getElementById("round_right_feature") != null){			var roundRightTag =  "<img src='" + theme_root + "_round_ur.gif' ><img src='" + feature_color + "' height='" + (feature_height-20) + "' width='10'><img src='" + theme_root + "_round_lr.gif' >";			document.getElementById("round_right_feature").innerHTML =  roundRightTag;			document.getElementById("round_right_feature").style.left = feature_width + "px";			document.getElementById("round_right_feature").style.MozOpacity = feature_opacity/100; 			document.getElementById("round_right_feature").style.filter = 'alpha(opacity=' + feature_opacity + ')';			document.getElementById("round_right_feature").style.filter = microsoft_feature_opacity;		}					if (document.getElementById("feature_background") != null){			document.getElementById("feature_background").style.backgroundColor = feature_background_color;			document.getElementById("feature_background").style.filter = "alpha(opacity=" + feature_opacity + ")";			document.getElementById("feature_background").style.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=" + feature_opacity + ")";			document.getElementById("feature_background").style.filter = "-moz-opacity: " + (feature_opacity/100) + "; opacity: " + (feature_opacity/100);			document.getElementById("feature_background").style.MozOpacity = feature_opacity/100; 			document.getElementById("feature_background").style.filter = 'alpha(opacity=' + feature_opacity + ')';			document.getElementById("feature_background").style.filter = microsoft_feature_opacity;		}					if (document.getElementById("about_mis") != null){			document.getElementById("about_mis").style.top = about_top + "px";			document.getElementById("about_mis").style.width = about_width + "px";			document.getElementById("about_mis").style.height = about_height + "px";			document.getElementById("about_mis").style.left = about_left + "px";		}					if (document.getElementById("about_mis_background") != null){			document.getElementById("about_mis_background").style.backgroundColor = theme_about_background_color;			document.getElementById("about_mis_background").style.width = about_width + "px";			//document.getElementById("about_mis_background").style.MozOpacity = about_opacity/100; 			//document.getElementById("about_mis_background").style.filter = 'alpha(opacity=' + about_opacity + ')';			//document.getElementById("about_mis_background").style.filter = microsoft_about_opacity;		}			//document.getElementById("round_left_about_mis").innerHTML = roundLeftAboutTag;			//document.getElementById("round_left_about_mis").style.MozOpacity = about_opacity/100; 			//document.getElementById("round_left_about_mis").style.filter = 'alpha(opacity=' + about_opacity + ')';			//document.getElementById("round_left_about_mis").style.filter = microsoft_about_opacity;}
