function Login(){
	if(document.getElementById('LoginEmail').value.length!=0 && document.getElementById('LoginPassword').value.length!=0 ){
		location.href='login.asp?UserName='+document.getElementById('LoginEmail').value+'&Password='+document.getElementById('LoginPassword').value+'&TargetPage=cart.asp';
	}
}


function LoginEvent(evn){
	var keyCode=(evn)?evn.keyCode:keyStroke.which;
	if(keyCode==13)Login();
	return true;
}
function LightUpHeader(subcat) {
    if (!subcat) return;

    if (subcat > 0 && (location.href.toLowerCase().indexOf("/search.asp?") != -1 || location.href.toLowerCase().indexOf(".html") != -1)) {
		if(document.getElementById('s'+subcat)) {$("#s"+subcat).css({'color':'#B2A183' , 'font-weight':'bold'});
		    //$("#s"+subcat).css('font-weight','bold');
		  
		}
	}
	if(location.href.toLowerCase().indexOf("/?pageid=112")!=-1){
		if(document.getElementById('p112h')) {$("#p112h").css({'color':'#B2A183' , 'font-weight':'bold'});
	//	$("#p112h").css('font-weight','bold');
		}
	}
}
function LightUpFooter(){
	var Page = location.href.toLowerCase();
	Page = Page.substr(Page.lastIndexOf("/"));
	var PageID ="";
	switch(Page){
		case '/?pageid=113':
		{PageID="p113";break;}
		
		case '/?pageid=111':
		{PageID="p111";break;}
		
		case '/?pageid=3':
		{PageID="p3";break;}
		
		case '/?pageid=2':
		{PageID="p2";break;}
		
		case '/?pageid=119':
		{PageID="p119";break;}
		
		case '/sitemap.asp':
		{PageID="psitemap";break;}		
	}
	if(document.getElementById(PageID)) $("#"+PageID).css({'color':'#B2A183' , 'font-weight':'bold'});
	
	$('a').each(function(i){
		if($('a').eq(i).attr('href').toLowerCase()==Page){
			$('a').eq(i).css({'color':'#B2A183' , 'font-weight':'bold'});
		}
	});
}
function ShowItemQuantity(quantity){
	if(document.getElementById('lblItemQuantity')){		
			if(quantity>1)
			document.getElementById('lblItemQuantity').innerHTML =quantity+ ' items';
			else 
			document.getElementById('lblItemQuantity').innerHTML =quantity+ ' item';
		}
}
function openWindowEmail(url)
{
popupWin = window.open(url,'new_page','width=475,height=350,resizable=1,scrollbars=no');
}

function openWindowLarge(url)
{
popupWin = window.open(url,'new_page','width=700,height=700,resizable=1,scrollbars=no');
}



function unhideRetrive() {
document.getElementById("Retrive").style.display = "inline";
}

function unhidePreview() {
document.getElementById("Preview").style.display = "inline";
}


function switchAction()
{
document.Step2Action.action = "builder.asp";
document.Step2Action.submit();
}