﻿// JScript File



var Shape;
var Metal;


function getMetals()
{


Shape=SetShapeChoice();

var submitURL = 'EarringsMetal.aspx?'
	+ 'Shape=' + Shape + "&Cat="+CatID ;
	
	
	
	//isRatingsBarChanged = true;
		createXMLHttpRequest();
	
		xmlHttp.onreadystatechange = FadeMetalAction;
		xmlHttp.open("GET", submitURL, true);
		xmlHttp.send(null);
}

function getStyles()
{


Metal=SetMetalChoice();

var submitURL = 'EarringsStyle.aspx?'
	+ 'Shape=' + Shape +'&Metal='+Metal + "&Cat="+CatID ;
	
	
	
	//isRatingsBarChanged = true;
		createXMLHttpRequest();
	
		xmlHttp.onreadystatechange = FadeStyleAction;
		xmlHttp.open("GET", submitURL, true);
		xmlHttp.send(null);
}

function SetShapeChoice()
{
    for(i=0;i<document.getElementsByName("DiamondShape").length;i++)
    {
        if(document.getElementsByName("DiamondShape")[i].checked==true)
            return document.getElementsByName("DiamondShape")[i].value;
    }
}

function SetMetalChoice()
{
    for(i=0;i<document.getElementsByName("MetalRadio").length;i++)
    {
        if(document.getElementsByName("MetalRadio")[i].checked==true)
            return document.getElementsByName("MetalRadio")[i].value;
    }
}

