//form - FormSubscribe
						function CheckFormSubscribe()
						{	
							var f = document.FormSubscribe
							
							if (f.custName.value.length == 0)
							{
								alert('Please enter your name.')
								f.custName.focus();
								return false
							}
							
							if (f.email.value.length == 0)
							{
								alert('Please enter your email address.')
								f.email.focus();
								return false
							}
							
							if(f.email.value.indexOf('.') == -1 || f.email.value.indexOf('@') == -1)
							{
								alert('Email address is not valid.');
								f.email.focus();
								
								return false;
							}
							
							return true
						}

//Form - FormSearch
				function Search()
				{
					var f = document.FormSearch
					
					
					
					for(i=0; i<f.sitesearch.length; i++)
					{
						//alert(f.sitesearch[i].value)
						
						if(f.sitesearch[i].checked)
						{
							modeSelected = f.sitesearch[i].value
						}
					}
					
					if(modeSelected == 'products')
					{
						f.method = 'post'
						f.action = '/webshaper/store/searchProd.asp'
						f.target = '_self'
					}
					else
					{
						f.method = 'get'
						f.action = 'http://www.google.com/search'
					}	
					
					return true
				}


function toggleDiv(catID, bGoLink)
{
	
	var obj = document.getElementById('div' + catID);

	
	createCookie('catID',catID);

	if(obj)
	{
		if(obj.className == 'divHide')
		{
			obj.className = 'divShow';	
		}
		else if(obj.className == 'divShow')
		{
			obj.className = 'divHide';	
		}
	}


	if(bGoLink)
	{

		document.location.href = '/webshaper/store/viewCat.asp?catID=' + catID;
		
		
	}	
		
}

function InitPage()
{
	//alert(document.cookie);

	//show div 
	ShowDiv();
	

}

function ShowDiv()
{

		
	if( readCookie('catID') != '')
	{
			
		var objDiv = document.getElementById('div' + readCookie('catID') );
			
		if(objDiv) 	
		{
			objDiv.className = 'divShow';
		}
	}	
		
}
						

