// JavaScript Document


    $(document).ready(function() {
        $("ul.sf-menu").superfish().find('ul').bgIframe({ opacity: false });
        $("#slider").easySlider({
            auto: true,
            continuous: true,
            speed: 2500,
            pause: 10000,
            controlsShow: false
        });

        
		var rndNumber = Math.random() * 50000;
		$("#minicart").load("http://www.homeatsea.com/minicart.asp", { rndNum: rndNumber });	
        //$('#s4').bgIframe({ opacity: false });
    });
	
	function checkImgs()
		{
			for (x=1;x<=8;x++)
				{
					if ( document.getElementById('imageid'+x))
						{
						var img = document.getElementById('imageid'+x); 
						var width = img.clientWidth;
						var height = img.clientHeight;		
						if (width > 150)
							{
								img.width = 150;
							}
						}
							
				}
			
		}
	
	
	<!-- Idea by:  Nic Wolfe (Nic@TimelapseProductions.com) -->
<!-- Web URL:  http://fineline.xs.mw -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

		<!-- Begin
		function popUp(URL) {
		day = new Date();
		id = day.getTime();
		eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=200');");
		}


		function hideElement (elementId) {
			var element;
			if (document.all)
			element = document.all[elementId];
			else if (document.getElementById)
			element = document.getElementById(elementId);
			if (element && element.style)
			element.style.display = 'none';
			//alert('here!' + elementId);
			}
					
		function showElement (elementId) {
			var element;
			if (document.all)
			element = document.all[elementId];
			else if (document.getElementById)
			element = document.getElementById(elementId);
			if (element && element.style)
			element.style.display = '';
			}

		function OnChange(dropdown)
			{
			    var myindex  = dropdown.selectedIndex
			    var SelValue = dropdown.options[myindex].value
					    
			    if (SelValue == 'US' || SelValue == 'USA' || SelValue == 'CA')
					{
						//alert('show states...');
						showElement('states');
						//showElement('zips');
					}
				else
					{
						//alert('hide states...');
						hideElement('states');
						document.frmHere.sstate.selectedIndex = 0;
						document.getElementById('sstate').value = '';
						
						//hideElement('zips');
					}
					    
			    return true;
			}
			
		function OnChange2(dropdown)
			{
			    var myindex  = dropdown.selectedIndex
			    var SelValue = dropdown.options[myindex].value
					    
			    if (SelValue == 'US' || SelValue == 'USA' || SelValue == 'CA')
					{
						//alert('show states...');
						showElement('states2');
						//showElement('zips2');
					}
				else
					{
						//alert('hide states...');
						hideElement('states2');
						document.frmHere.state.selectedIndex = 0;
						//hideElement('zips2');
					}
					    
			    return true;
			}
// End -->
		
		function delMini(prodID)
			{
				var rndNumber = Math.random() * 50000;
				$(function () {
						$("#minicart").load("http://www.homeatsea.com/minicart.asp?del="+prodID, { rndNum: rndNumber });	
					});
			}
			
		function addMini(prodID)
			{
				
				$(function () {
									
						var rndNumber = Math.random() * 50000;
						var color = "";
						var size = "";
						var qty = "";
						if (document.getElementById("color")) {color = document.getElementById("color").value;} else {color = "";}
						if (document.getElementById("size")) {size = document.getElementById("size").value;} else {size = "";}
						if (document.getElementById("qty")) {qty = document.getElementById("qty").value;} else {qty = "";}
				
				//alert("http://www.homeatsea.com/minicart.asp?add="+prodID+"&color="+color+"&size="+size+"&qty="+qty);
				
						$("#minicart").load("http://www.homeatsea.com/minicart.asp?add="+prodID+"&color="+color+"&size="+size+"&qty="+qty, { rndNum: rndNumber });	
					});
			}