function sizevalidate(formvar){
//pageTracker._linkByPost(this)
try
{
if (formvar.p2.value=="--")
{
alert("Please Select a Size");
return false;
}
else
{
	
try
{
	if (formvar.p1.value=="--")
	{
		alert("Please Select a Color");
		return false;	
	}
	
}
catch(e){}


}
}
catch(e){}

pageTracker._linkByPost(formvar);
return true;

}


//SuckerTree Horizontal Menu (Sept 14th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/
var menuids=["treemenu1","treemenu2","treemenu3"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus_horizontal(){

var sPath = window.location.pathname;
//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);


for (var i=0; i<menuids.length; i++){
	try
	{
	var browserName=navigator.appName; 
  	var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
		if (ultags[t].parentNode.parentNode.id==menuids[i]){ //if this is a first level submenu

			ultags[t].style.top="16px"

			ultags[t].parentNode.getElementsByTagName("a")[0].className="mainfoldericon"
		}
		else{ //else if this is a sub level menu (ul)
		  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    	ultags[t].parentNode.getElementsByTagName("a")[0].className="subfoldericon"
		}
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.visibility="visible"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.visibility="hidden"
    }
    }
	}
	catch(e){}
  }
}



function getY( oElement )
{
var iReturnValue = 0;
while( oElement != null ) {
iReturnValue += oElement.offsetTop;
oElement = oElement.offsetParent;
}
return iReturnValue;
}

function getX( oElement )
{
var iReturnValue = 0;
while( oElement != null ) {
iReturnValue += oElement.offsetLeft;
oElement = oElement.offsetParent;
}
return iReturnValue;
}

function closediv()
{
	document.all.lister.style.display = 'none';
}

function SearchAjax(Word)
{
	document.all.sterm.value = Word;

	valueer = Word.replace(" ","+");
	window.location = "Search_"+valueer;
}

function Ajax()
{
	var args = Ajax.arguments;
	switch (args[0])
	{
		case "load" :
			try
			{
			var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
			
			if (x)
			{
				
				x.onreadystatechange = function(){
								if (x.readyState == 4)
								{
									if(x.status == 200)
									{
										if (document.all)
										{
											e = document.all[args[2]];
										}	
										else
										{	
										
											if (document.getElementsByName)
											{
												e = document.getElementsByName(args[2])	
											}
									}
									
										if (e)
										{
											if(x.target==undefined) 
												response=x; 
											else 
												response=x.target;
												
											e.innerHTML = response.ResponseText;
										}	
									}
									else
									{
										document.all.lister.style.display = "none";
									}
								
								}
							}
				x.open ("GET",args[1],true);
				x.send(null)
			}
			}
			catch(e){document.all.lister.style.display = "none";}
			
			break;
		case "send": Ajax("load","http://www.barefeetshoes.com/ajax.htm?st="+args[1],"lister",args[1]);break;
	}
}

function Sender()
{
	if (document.all.sterm.value != "")
	{
		document.all.lister.style.top = getY(document.all.sterm)+25;
		document.all.lister.style.left = getX(document.all.sterm)-12;		
		document.all.lister.style.display = "";
		
		Ajax("send",escape(document.all.sterm.value));

	}
	else
	{
		document.all.lister.style.display = "none";
		
	}
}

function checkerForm(e,valueer) {
	if (e.keyCode == 13) {
		valueer = valueer.replace(" ","+");
		window.location = "http://www.barefeetshoes.com/Search_"+valueer;
	}
	return true;
}

function checkerClicker() {
	valueer = document.all.sterm.value.replace(" ","+");
	window.location = "http://www.barefeetshoes.com/Search_"+valueer;
}