<!--
	function search_submit()
	{
		var search_query = document.getElementById('searchbar_contents_input').value;
		var search_where = document.getElementById('searchbar_search_select').value;

		search_query = search_query.replace(/[^a-zA-Z 0-9\.\,]+/g, '');
		search_query = search_query.replace(/\s/g, '+');

		switch (search_where)
		{
			case 'site':
				window.location = 'http://www.zumber.com/search/' + search_query + '/1/site/zumber.com/';
			break;
			case 'www':
				window.location = 'http://www.zumber.com/search/' + search_query + '/';
			break;
		}

		return false;
	}

	function search_preferences_display()
	{
		var ele_cont	= document.getElementById('searchbar');
		var ele_prefs	= document.getElementById('searchbar_preferences');
		if (ele_prefs.style.display == 'none' || !ele_prefs.style.display)
		{
			ele_cont.style.height	= '130px';
			ele_prefs.style.display	= 'block';
		}
		else
		{
			ele_cont.style.height	= '30px';
			ele_prefs.style.display	= 'none';
		}
		return false;
	}

	function search_preferences_thumbs(ele)
	{
		var radio_thumbs = '0';

		if (ele)
		{
			radio_thumbs = ele.value;
		}
		else
		{
			if (document.getElementById('searchbar_preferences_thumbs_yes').checked == true)
			{
				radio_thumbs = '1';
			}
		}

		if (radio_thumbs == '1')
		{
			document.getElementById('searchbar_preferences_thumbs_zoom').disabled = false;
		}
		else
		{
			document.getElementById('searchbar_preferences_thumbs_zoom').disabled = true;
		}
	}

	function search_preferences_update()
	{
		cookie_set('prefs_pp', document.getElementById('searchbar_preferences_results_count').options[document.getElementById('searchbar_preferences_results_count').selectedIndex].value, 28, '/', '.zumber.com');
		cookie_set('prefs_ss', document.getElementById('searchbar_preferences_safe_search').options[document.getElementById('searchbar_preferences_safe_search').selectedIndex].value, 28, '/', '.zumber.com');
		cookie_set('prefs_lg', document.getElementById('searchbar_preferences_local_language').options[document.getElementById('searchbar_preferences_local_language').selectedIndex].value, 28, '/', '.zumber.com');
		cookie_set('prefs_ti', document.getElementById('searchbar_preferences_local_timezone').options[document.getElementById('searchbar_preferences_local_timezone').selectedIndex].value, 28, '/', '.zumber.com');


		if (document.getElementById('searchbar_preferences_thumbs_yes').checked == true)
		{
			cookie_set('prefs_ts', '1', 28, '/', '.zumber.com');
		}
		else
		{
			cookie_set('prefs_ts', '0', 28, '/', '.zumber.com');
		}

		cookie_set('prefs_tz', document.getElementById('searchbar_preferences_thumbs_zoom').value, 28, '/', '.zumber.com');
		cookie_set('prefs_nw', document.getElementById('searchbar_preferences_new_window').value, 28, '/', '.zumber.com');

		alert('Preferences have been saved');
		search_preferences_display();

		return false;
	}

	function updateClock ()
	{
		var currentTime		= new Date ();
		var monthArray		= new Array('January','February','March','April','May','June','July','August','September','October','November','December');

		var currentHours	= currentTime.getHours();
		var currentMinutes	= currentTime.getMinutes();
		var currentSeconds	= currentTime.getSeconds();
		var currentDay		= currentTime.getDate();
		var currentMonth	= currentTime.getMonth();
		var currentYear		= currentTime.getFullYear();

		// Pad the minutes and seconds with leading zeros, if required
		currentMinutes		= (currentMinutes < 10 ? "0" : "") + currentMinutes;
		currentSeconds		= (currentSeconds < 10 ? "0" : "") + currentSeconds;

		// Choose either "AM" or "PM" as appropriate
		var timeOfDay		= (currentHours < 12) ? "AM" : "PM";

		// Convert the hours component to 12-hour format if needed
		currentHours		= (currentHours > 12) ? currentHours - 12 : currentHours;

		// Convert an hours component of "0" to "12"
		currentHours		= (currentHours == 0) ? 12 : currentHours;

		// Compose the string for display
		var currentTimeString	= monthArray[currentMonth] + " " + ordi(currentDay) + " " + currentYear + " - " + currentHours + ":" + currentMinutes + ":" + currentSeconds + " " + timeOfDay;

		// Update the time display
		document.getElementById("menu_clock").firstChild.nodeValue = currentTimeString;
	}

	function ordi(n)
	{
		return n+(arguments.callee.map[n]||"th");
	}
	ordi.map={1:'st',21:'st',31:'st',2:'nd',22:'nd',3: 'rd',23:'rd'};

	function go(url)
	{
		document.location = url;
	}

	// Cookie Functions
		function cookie_get(name)
		{
			var cookie_jar		= document.cookie.split(';');
			var cookie_temp	= '';
			var cookie_name	= '';
			var cookie_value	= '';
			var cookie_found	= false;

			for (cookie_position = 0; cookie_position < cookie_jar.length; cookie_position++)
			{
				cookie_temp 	= cookie_jar[cookie_position].split('=');
				cookie_name		= cookie_temp[0].replace(/^\s+|\s+$/g, '');

				if (cookie_name == name)
				{
					cookie_found = true;

					if (cookie_temp.length > 1)
					{
						cookie_value = unescape(cookie_temp[1].replace(/^\s+|\s+$/g, ''));
					}

					return cookie_value;
					break;
				}

				cookie_temp		= null;
				cookie_name		= '';
			}

			if (!cookie_found)
			{
				return null;
			}
		}
		function cookie_set(name, value, expires, path, domain, secure)
		{
				var today = new Date();
				today.setTime(today.getTime());

				if (expires)
				{
					expires = expires * 1000 * 60 * 60 * 24;
				}

				var cookie_expires = new Date(today.getTime() + (expires));

				document.cookie = name + "=" + escape(value) +
										((expires) ? ";expires=" + cookie_expires.toGMTString() : "") +
										((path) ? ";path=" + path : "") +
										((domain) ? ";domain=" + domain : "") +
										((secure) ? ";secure" : "");
		}
		function cookie_delete(name, path, domain)
		{
			if (cookie_get(name))
			{
				document.cookie = name + "=" +
										((path) ? ";path=" + path : "") +
										((domain) ? ";domain=" + domain : "") +
										";expires=Thu, 01-Jan-1970 00:00:01 GMT";
			}
		}

	// Share Functions
		function share(network)
		{
			u	= location.href;
			t	= document.title;

			switch(network)
			{
				case 'facebook':
					window.open('http://www.facebook.com/sharer.php?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
				break;
				case 'myspace':
					window.open('http://www.myspace.com/Modules/PostTo/Pages/?u=' + encodeURIComponent(u) + '&t=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
				break;
				case 'digg':
					window.open('http://digg.com/submit?phase=2&url=' + encodeURIComponent(u) + '&title=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
				break;
				case 'delicious':
					window.open('http://del.icio.us/post?url=' + encodeURIComponent(u) + '&title=' + encodeURIComponent(t), 'sharer', 'toolbar=0,status=0,width=626,height=436');
				break;
			}
			return false;
		}

	// Tab Functions
		function tabs_clear(group)
		{
			var tab_parent		= document.getElementById('tabs_' + group);
			var content_parent	= document.getElementById('tabs_' + group + '_content');
			var tab_children	= tab_parent.getElementsByTagName('div');
			var content_children	= content_parent.getElementsByTagName('div');

			for (var i = 0; i < tab_children.length; i++)
			{
				if (tab_children[i].getAttribute('group') == group)
				{
					tab_children[i].className = 'column_subheader_item_background';
				}
			}

			for (var i = 0; i < content_children.length; i++)
			{
				if (content_children[i].getAttribute('group') == group)
				{
					content_children[i].style.display = 'none';
				}
			}
		}
		function tabs_select(ele, associate)
		{
			var tab_group		= ele.getAttribute("group");
			var content_element	= document.getElementById(associate);

			tabs_clear(tab_group);

			ele.className		= 'column_subheader_item_current';
			content_element.style.display = 'block';
		}
	// Menu Functions
		function menu_check()
		{
			if (menu_idle >= 3)
			{
				menu_status	= false;
				menu_idle	= 0;
			}

			if (!menu_status)
			{
				menu();
				menu_status	= false;
				return true;
			}
			else
			{
				menu_idle++;
			}
		}
		function menu(ele)
		{
			if (menu_last != ele)
			{
				menu_status	= false;
				menu_last	= ele;
			}
			else
			{
				menu_idle	= 0;
				menu_status	= true;
			}

			var menu_object		= document.getElementById('menu_object');
			var menu_parent		= document.getElementById('menu');
			var menu_children	= menu_parent.getElementsByTagName('div');

			/* Resetting Menu Styles */
				for (var i = 0; i < menu_children.length; i++)
				{
					if (menu_children[i].getAttribute('type') == 'item')
					{
						menu_children[i].className = 'menu_item';
					}
				}

				if (!menu_status)
				{
					menu_object.style.visibility	= 'hidden';
					menu_status			= false;
				}


			/* Set Menu Item Style */
				if (ele)
				{
					var width_offset	= 0;

					if (document.body.offsetWidth && isIE())
					{
						width_offset	= (document.body.offsetWidth - 230) / 2;
					}
					else if (document.body.offsetWidth && !isIE())
					{
						width_offset	= (document.body.offsetWidth - 1000) / 2;
					}
					else
					{
						width_offset	= (document.innerWidth - 1000) / 2;
					}

					menu_item		= document.getElementById('menu_'+ele);
					menu_item.className	= 'menu_item_on';

					if (menu_items[ele].length > 0)
					{
						menu_status			= true;

						menu_object.innerHTML		= '';
						menu_object_left		= findPosX(menu_item) - width_offset;

						for (i=0;i<menu_items[ele].length;i++)
						{
							menu_values		= menu_items[ele][i].split(',',2);
							menu_object.innerHTML	= menu_object.innerHTML +
										  '<div style="padding:4px;cursor:pointer;" ' +
										  	'onclick="go(\'' + menu_values[1] + '\');" ' +
											'onmousemove="menu(\'' +
												ele +
											'\');" ' +
											'onmouseout="menu();" ' +
										  '>' +
										  menu_values[0] +
										  '</div>';
						}
						menu_object.style.marginLeft	= menu_object_left + 'px';
						menu_object.style.visibility	= 'visible';
					}
				}
		}
		var menu_status	= false;
		var menu_last 	= '';
		var menu_idle	= 0;


	function findPosX(obj)
	{
		var curleft = 0;
		if(obj.offsetParent)
		{
			while(1) 
			{
				curleft += obj.offsetLeft;
				if(!obj.offsetParent)
				{
					break;
				}
				obj = obj.offsetParent;
			}
		}
		else if(obj.x)
		{
			curleft += obj.x;
		}
		return curleft;
	}
	function findPosY(obj)
	{
		var curtop = 0;
		if(obj.offsetParent)
		{
			while(1)
			{
				curtop += obj.offsetTop;
				if(!obj.offsetParent)
				{
					break;
				}
				obj = obj.offsetParent;
			}
		}
		else if(obj.y)
		{
			curtop += obj.y;
		}
		return curtop;
	}
	function isIE()
	{
		return /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent);
	}

//-->