		   
	function $(obj) {
			if(typeof(obj) == "string") {
				if(/#/.test(obj)) {
					if(/[a-zA-Z0-9]#[a-zA-Z]/.test(obj)) {
						str = obj.split("#");
						
						id = document.getElementById(str[1]);
						
						}
					else {
						obj = obj.replace("#", "");
						id = document.getElementById(obj);	
						}
					}
				else {				
					id = document.getElementById(obj);
					}				
				}
			else if(typeof(obj) == "object") {
				id = obj;
				}
			else {
				alert("Element not Found");
				return false;
				}
			
			return id;
			}
			   
	document.bookmark = function() { 
		var url = window.location.href;
		var title = document.title;
		if(window.sidebar) {
			window.sidebar.addPanel(title, url, "");
			}
		else if (window.external) { 
			window.external.AddFavorite(url,title)
			} 
		else { 
			alert("Sorry! Your browser doesn't support this function."); 
			} 
		} 	
	
	video = {
		displayControlPanel: function () {
			cp = document.getElementById("videoOptions");
			cp.style.visibility = 'visible';
			},
		hideControlPanel: function () {
			cp = document.getElementById("videoOptions");
			cp.style.visibility = 'hidden';
			},
		expand: function () {
			if(!video.object) {
				video.object = document.getElementById("landingPageVideo");	
				}
			cp = document.getElementById("videoOptions");
			cp.style.position = "absolute";
			this.object.style.width = "425px";
			this.object.style.height = "344px";
			if(!document.all) {
				cp.style.left = "-308px";
				this.object.style.position = "relative";
				this.object.style.left = "-210px";
				}
			else {
				this.object.style.position = "absolute";
				cp.style.left = "-315px";
				this.object.style.left = "-225px";
				}
			cp.style.height = "300px";
			document.getElementById("expandAnchor").href = "javascript:video.collapse()";
			document.getElementById("expandAnchor").innerHTML = "[-] Collapse";
			},
		collapse: function () {
			if(!video.object) {
				video.object = document.getElementById("landingPageVideo");	
				}
			this.object.style.width = "210px";
			this.object.style.height = "160px";
			this.object.style.position = "relative";
			if(!document.all) {
				cp.style.left = "-108px";
				this.object.style.left = "0px";
				}
			else {
				cp.style.left = "-108px";
				this.object.style.left = "-15px";
				}
			cp.style.height = "120px";
			document.getElementById("expandAnchor").href = "javascript:video.expand()";
			document.getElementById("expandAnchor").innerHTML = "[+] Expand";
			}
		}
		
	storyPrev = {
		rollOver: function (index, src, obj) {
			image = document.getElementById("rightContent").getElementsByTagName("img")[index];
			image.src = src;
			},
		rollOut: function (index, src) {
			image = document.getElementById("rightContent").getElementsByTagName("img")[index];
			image.src = src;
			}
		}

	babyPicture = {
		loadPic: function () {
			babyPicture.img = document.getElementById("brandImage");
			babyPicture.img.onmouseover = function () { babyPicture.rollOver(); }
			babyPicture.img.onmouseout = function () { babyPicture.rollOut(); }
			},
		rollOver: function () {
			Animate.swapImage(babyPicture.img, "/images/adopt-embryo-babies-hover.png");
			},
		rollOut: function () {
			Animate.swapImage(babyPicture.img, "/images/adopt-embryo-babies.png");
			}
		
		}
		
	document.preLoadImage = function (src) {
		img = new Image();
		img.src = src;
		}
		
	function GetThis(T, C, U, L)
		{
			var targetUrl = 'http://www.myspace.com/index.cfm?fuseaction=postto&' + 't=' + encodeURIComponent(T)
			+ '&c=' + encodeURIComponent(C) + '&u=' + encodeURIComponent(U) + '&l=' + L;
			window.open(targetUrl);
		}
		
	function displayFootnotes (index) {
		window.open("/pages/catholic_resources_footnotes.php#" + index, 'footnotes', 'toolbar=0,location=1,status=1,menubar=1,scrollbars=1,height=500,width=600,top=100,left=100');
		}
		
	function Imagepreload (img) {
		pre = new Image();
		pre.src = img;			
		}
		
	Animate = new Object();
	Animate.swapImage = function (obj, src) {
		image = $(obj);
		if(image) {
			image.src = src;
			}
		}
		
	
	
	window.onload = function () {
		Imagepreload("/images/embryo-adopt-fuiten-baby-hover.jpg");
		Imagepreload("/images/adopt-embryo-lancaster-family.jpg");
		video.object = document.getElementById("landingPageVideo");
		babyPicture.loadPic();
		document.preLoadImage("/images/adopt-embryo-babies-hover.png");
		}
		
		
	