function loginCheck2()
{
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i

	if (!filter.test(document.loginCk2.email.value))
	{
	alert ('Email is invalid!');
	return false;
	}
	else if (document.loginCk2.password.value == '')
	{
	alert ('Password is invalid!');
	return false;
	}
	else
	{
	return true;
	}
}

var GB_ANIMATION = true;




      $(document).ready(function(){
        $("a.greybox").click(function(){
          var t = this.title;
          GB_show(t,this.href,650,525,0);
          return false;
        });
        
        $("a.greybox2").click(function(){
          var t = this.title;
          GB_show(t,this.href,650,525,1);
          return false;
        });   
        
        winW = $("#topMainTbl").width();

		var x = ((winW - 1024) / 2 ) + 685;
		var x1 = ((winW - 1024) / 2 ) + 780;
		
		document.getElementById('cartDiv').style.left = x;
		document.getElementById('loginDiv').style.left = x1;
        
        
		$("#showCart").click(function () {
		if ($("#cartDiv").is(":hidden")) {
		$("#cartDiv").slideDown("slow");
		$.get("layoutbag.php", {},function(data){
		//$('#layoutBag').html(data);
		var htmlCode = $(data).html();
			htmlCode = '<form action="chk_review.php" method="post">'+htmlCode+'</from>';
		$('#layoutBag').html(htmlCode);
		});
		} else {
		$("#cartDiv").hide();
		}
		});
		

		$("#signInBtn").click(function () {
		if ($("#loginDiv").is(":hidden")) {
		$("#loginDiv").slideDown("slow");
		} else {
		$("#loginDiv").hide();
		}
		});		
		
		
		$('.newTopMenu').mouseover(function(){
		$(this).css('background-color', '#FFE8F0');
		$(this).find('a').css('color', '#666666');
		});
     
     		
		$('.newTopMenu').mouseout(function(){
		$(this).css('background-color', '#00DFFF');
		$(this).find('a').css('color', '#FFFFFF');
		});
		
		$('.frmBtn').css('width', $('.frmBtn').find('img').attr('width'));   

		$('.frmBtn').mouseover(function(){
			$(this).css('opacity', '0.7');
		});
	
		$('.frmBtn').mouseout(function(){
			$(this).css('opacity', '1');
		});		
		
		
     
      });
      
function updateItemCounts(counts)
{
	document.getElementById('ItemCounts').innerHTML = counts;
	if (counts > 0) 
	{
		document.getElementById('GreenSecureCheckout').style.display = 'block';
		document.getElementById('GrySecureCheckout').style.display = 'none';
	}
}      

