function Beadworks_ItemSelCng(aid)
	{
	var gel = document.getElementsByName("Detail-" + aid);
	var gpr = getElementsByName_iefix("div","Price-" + aid);
	var gsl = document.getElementById(aid + "-gridsel");
	var mvl = gsl[gsl.selectedIndex].value;
	for (x=0;x<gel.length;x++)
		{
		gel[x].style.display = "none";
		if (gel[x].id == "i" + mvl)
			{
			gel[x].style.display = "inline";
			}
		gpr[x].style.display = "none";
		if (gpr[x].id == "p" + mvl)
			{
			gpr[x].style.display = "block";
			}
		}
	}

function getElementsByName_iefix(tag, name)
	{
        var elem = document.getElementsByTagName(tag);
	var arr = new Array();
        for(i = 0,iarr = 0; i < elem.length; i++)
		{
                att = elem[i].getAttribute("name");
                if(att == name)
			{
                     	arr[iarr] = elem[i];
                     	iarr++;
                	}
           	}
	return arr;
	} 


function Beadworks_DetailSelCng(aid, gid)
	{
	var gel = document.getElementsByName("Detail-" + aid);
	for (x=0;x<gel.length;x++)
		{
		gel[x].style.display = "none";
		if (gel[x].id == gid)
			{
			gel[x].style.display = "inline";
			}
		}
	}

function Loader(){var Image_Counter = new Array(); 
	var counter =  Image_Counter.length; var Image_Paths = Loader.arguments;
	for(var i=0;i<Image_Paths.length;i++) {
	Image_Counter[counter] = new Image();Image_Counter[counter++].src = Image_Paths[i];}
}

function Swap(current_image,new_image) {
	document[current_image].src = new_image;
return true;
}


function CheckBrowser() {
	if (document.layers) {
		window.open('upgrade.asp','','width=400,height=450');
	}
}

function ShowHide(divID){
	var thisDiv;
	if(document.all) {thisDiv = document.all[divID];}
	if(document.getElementById && !document.all) {thisDiv = document.getElementById(divID);}
	if(thisDiv.style.display == "none"){thisDiv.style.display = "block";} else {thisDiv.style.display = "none";}
}



// --------------------------------------------------
// Functions for HTML Page Search and Drop Down
// --------------------------------------------------
function CatSelected(select) {
	if (select.selectedIndex!=0)
	select.form.submit();
}


function SearchIt() {
	document.frmSearch.submit();
}



function CheckSearch(theForm){
	if (theForm.SearchID.value == "") {
		alert("Please enter a Search Word or Item ID to Search!");
		theForm.SearchID.focus();
		return false;
		}
	return true;
}

function ChangePointer() {
if (document.all) {
	clickCart.style.cursor = "hand";
}

if (document.getElementById && !document.all) {
clickcart.style.cursor = "pointer";
}

if (document.layers) {
// Do Nothing
}
}

var curNum;
curNum = 0;
