	function shopbycategory()
	{

		var current_date = new Date;
	    var cookie_year = current_date.getFullYear ( ) + 1;
	    var cookie_month = current_date.getMonth ( );
	    var cookie_day = current_date.getDate ( );
	    set_cookie ( "username", "1", cookie_year, cookie_month, cookie_day, "catchsurf.com" );
		hidecate();
	if (document.getElementById) { // DOM3 = IE5, NS6
		document.getElementById('bybrandbot').style.display = 'inline';
		
	} else {
		if (document.layers) { // Netscape 4
			document.bybrandbot.display = 'inline';
			
		} else { // IE 4
			document.all.bybrandbot.style.display = 'inline';
			
		}
	}
	var dominio = document.URL;
	//alert(dominio);
	
	if ((dominio!="http://www.catchsurf.com/index.php/") || (dominio!="http://www.catchsurf.com/")){
		window.location = "http://www.catchsurf.com/index.php/"
	}
	
}
	
	

function shopbybrand()
{

	document.cookie="username=;domain=catchsurf.com;expires=Thu,01-Jan-70 00:00:01 GMT";

	  hidebrand();

	  if (document.getElementById) { // DOM3 = IE5, NS6
	document.getElementById('bycatebot').style.display = 'inline';
	} else {
	if (document.layers) { // Netscape 4
	document.bycatebot.display = 'inline';
	} else { // IE 4
	document.all.bycatebot.style.display = 'inline';
	}
	}
	
	


	document.getElementById("nav").innerHTML='<li class="level0 nav-1 level-top first"><a href="http://www.catchsurf.com/index.php/apparel.php" class="level-top" target="_parent"><span>APPAREL</span></a></li><li class="level0 nav-2 level-top"><a href="http://www.catchsurf.com/index.php/beater-surfboards.php" class="level-top" target="_parent"><span>BEATER BOARDS</span></a></li><li class="level0 nav-3 level-top"><a href="http://www.catchsurf.com/index.php/surfboards-by-y.php" class="level-top" target="_parent"><span>SURFBOARDS BY Y</span></a></li><li class="level0 nav-4 level-top"><a href="http://www.catchsurf.com/index.php/division-71-bodyboards.php" class="level-top" target="_parent"><span>DIVISION 71</span></a></li><li class="level0 nav-5 level-top"><a href="http://www.catchsurf.com/index.php/odysea-surfboards-bodyboards.php" class="level-top" target="_parent"><span>ODYSEA</span></a></li><li class="level0 nav-6 level-top"><a href="http://www.catchsurf.com/index.php/stealth-swin-fins.php" class="level-top" target="_parent"><span>STEALTH</span></a></li><li class="level0 nav-7 level-top"><a href="http://www.catchsurf.com/index.php/accessories.php" class="level-top" target="_parent"><span>ACCESSORIES</span></a></li><li class="level0 nav-8 level-top"><a href="http://www.catchsurf.com/index.php/team.php" class="level-top" target="_parent"><span>TEAM</span></a></li><li class="level0 nav-9 level-top last"><a href="http://www.catchsurf.com/index.php/video.php" class="level-top" target="_parent"><span>VIDEO</span></a></li><li class="level0 nav-7 level-top  last"><a href="http://www.catchsurf.com/blog/" class="level-top" target="_parent"><span>BLOG</span></a></li>';
	
	
}



function set_cookie ( name, value, expires_year, expires_month, expires_day, domain, secure )
{
var cookie_string = name + "=" + escape ( value );

if ( expires_year )
{
var expires = new Date ( expires_year, expires_month, expires_day );
cookie_string += "; expires=" + expires.toGMTString();
}



if ( domain )
cookie_string += "; domain=" + escape ( domain );

if ( secure )
cookie_string += "; secure";

document.cookie = cookie_string;

}

function delete_cookie ( cookie_name )
{

	
  var cookie_date = new Date ( );  // current date & time
  cookie_date.setTime ( cookie_date.getTime() - 1 );
  document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();

  hidebrand();

  if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('bycatebot').style.display = 'inline';
} else {
if (document.layers) { // Netscape 4
document.bycatebot.display = 'inline';
} else { // IE 4
document.all.bycatebot.style.display = 'inline';
}
}

}



function get_cookie ( cookie_name )
{
var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

if ( results )
return ( unescape ( results[2] ) );
else
return null;
}



if ( ! get_cookie ( "username" ) )
{
//document.write ( "0" );
setTimeout("showcate();", 1000);
}
else
{
var username = get_cookie ( "username" );
//document.write ( username );
setTimeout("showbrand();", 1000);
}



function showbrand(){
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('bybrandbot').style.display = 'inline';
} else {
if (document.layers) { // Netscape 4
document.bybrandbot.display = 'inline';
} else { // IE 4
document.all.bybrandbot.style.display = 'inline';
}
}
document.getElementById("nav").innerHTML='<li class="level0 nav-1 level-top first"><a href="http://www.catchsurf.com/index.php/apparels.php" class="level-top" target="_parent"><span>APPAREL</span></a></li><li class="level0 nav-3 level-top" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/surfboards.php" class="level-top" target="_parent"><span>SURFBOARDS</span></a></li><li class="level0 nav-4 level-top" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/bodyboards.php" class="level-top" target="_parent"><span>BODYBOARDS</span></a></li><li class="level0 nav-7 level-top" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/surf-accessories.php" class="level-top" target="_parent"><span>SURF ACCESSORIES</span></a></li><li class="level0 nav-7 level-top" style="margin-left: 20px; letter-spacing: 1px;">///</li><li class="level0 nav-8 level-top" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/team.php" class="level-top" target="_parent"><span>TEAM</span></a></li><li class="level0 nav-9 level-top last" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/video.php" class="level-top" target="_parent"><span>VIDEO</span></a></li><li class="level0 nav-7 level-top  last" style="margin-left: 20px;"><a href="http://www.catchsurf.com/blog/" class="level-top" target="_parent"><span>BLOG</span></a></li>';

}


function hidebrand(){
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('bybrandbot').style.display = 'none';
} else {
if (document.layers) { // Netscape 4
document.bybrandbot.display = 'none';
} else { // IE 4
document.all.bybrandbot.style.display = 'none';
}
}
}

function hidecate(){
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('bycatebot').style.display = 'none';
} else {
if (document.layers) { // Netscape 4
document.bycatebot.display = 'none';
} else { // IE 4
document.all.bycatebot.style.display = 'none';
}
}
document.getElementById("nav").innerHTML='<li class="level0 nav-1 level-top first"><a href="http://www.catchsurf.com/index.php/apparels.php" class="level-top" target="_parent"><span>APPAREL</span></a></li><li class="level0 nav-3 level-top" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/surfboards.php" class="level-top" target="_parent"><span>SURFBOARDS</span></a></li><li class="level0 nav-4 level-top" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/bodyboards.php" class="level-top" target="_parent"><span>BODYBOARDS</span></a></li><li class="level0 nav-7 level-top" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/surf-accessories.php" class="level-top" target="_parent"><span>SURF ACCESSORIES</span></a></li><li class="level0 nav-7 level-top" style="margin-left: 20px; letter-spacing: 1px;">///</li><li class="level0 nav-8 level-top" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/team.php" class="level-top" target="_parent"><span>TEAM</span></a></li><li class="level0 nav-9 level-top last" style="margin-left: 20px;"><a href="http://www.catchsurf.com/index.php/video.php" class="level-top" target="_parent"><span>VIDEO</span></a></li><li class="level0 nav-7 level-top  last" style="margin-left: 20px;"><a href="http://www.catchsurf.com/blog/" class="level-top" target="_parent"><span>BLOG</span></a></li>';

}

function showcate(){
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById('bycatebot').style.display = 'inline';
} else {
if (document.layers) { // Netscape 4
document.bycatebot.display = 'inline';
} else { // IE 4
document.all.bycatebot.style.display = 'inline';
}
}

}


