// Copyright(C)2005-2008IlyaS.Lyubinskiy.All rights reserved.
// ***** Popup Control *********************************************************



//this is to clear the search box//


function clear_searchBox()
	{
	if (document.getElementById("SearchFor").value == "Product Search"){
	    document.getElementById("SearchFor").value = "";
	    }
	} 
function clear_EmailBox()
	{
	if (document.getElementById("EmailFor").value == "Enter Email"){
	    document.getElementById("EmailFor").value = "";
	    }
	} 

function verifySearch()
	{
		if (document.searchForm.SearchFor.value == "enter search term here"){
			alert('Please enter a product or model number in the search box, then click GO.'); return false;	
		}
		if (document.searchForm.SearchFor.value == ""){
			alert('Please enter a product or model number in the search box, then click GO.'); return false;	
		}
	return true;
	}

//Builds PopUp window for the Safe Guarantee in the Footer
	
	
	window.productDetails_jso={
	    showPopup: function(o, e, s){
	        var d=document.getElementById(s);
	        d.style.visibility='visible';
	        //d.style.top='1px';
	        //d.style.left='1px';
	    },
	    
	    hidePopup: function(o, e, s){
	        var d=document.getElementById(s);
	        d.style.visibility='hidden';
	    },
	    
	    'end':'end'
	};
	
		window.productDetails2_jso={
	    showPopup: function(o, e, s){
	        var d=document.getElementById(s);
	        d.style.display='block';
	        //d.style.top='5%';
	        //d.style.left='5%';
	    },
	    
	    hidePopup: function(o, e, s){
	        var d=document.getElementById(s);
	        d.style.display='none';
	    },
	    
	    'end':'end'
	};


//this is for the new drop down menu
function startMenu()
	{
			var userAgent = navigator.userAgent.toLowerCase();
			var platform = navigator.platform ;
		$('li.dropLi').hover(
		
			function() { 
				var newImage = $(".hoverState", this).attr('src').replace(/^(.*?)(\.(?:gif|jpg|png))$/, "$1_over$2");$(".hoverState", this).attr('src', newImage);  
				if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
					if( platform == "MacPPC"){
						if(document.getElementById('home'))document.getElementById('home').style.display = 'none';
						}

				}
				$('.dropDiv', this).css('display', 'block');
				$('.hoverState', this).css('border', '1px solid #898989');
				$('.hoverState', this).css('border-bottom', 'none'); 
				$(".hoverState", this).css('margin', '-1px 0 0 0'); 
				$('.lone', this).css('border-bottom', '1px solid #898989'); 
				
				
				

			},
			function() { 
				var newImage = $(".hoverState", this).attr('src').replace('_over', '');$(".hoverState", this).attr('src', newImage); 
				if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
					if( platform == "MacPPC"){
						if(document.getElementById('home'))document.getElementById('home').style.display = 'block';
						}

				}
				$('.dropDiv', this).css('display', 'none'); 
				
				$('.hoverState', this).css('border', 'none');
				$(".hoverState", this).css('margin', '0 1px'); 
				
				
				
				});
					

		
		};
		
		
		function OpenWindowSRC(url, name, width, height, scroll) {
			popupWin = window.open(url, name, 'status=no,menubar=no,location=no,toolbar=no,scrollbars=' + scroll +',resizable=no,width=' + width +',height=' + height + ',screenX=0,screenY=0,top=0,left=0')
}