// FOR MAILING LIST
//////////////////////////////////////////////////////////////////////////////////////////
function mailing_list()
{
if (document.mailing.email.value=="")
{
alert("Please enter an email!");
return false;
}
return true;
}


// FOR CHECKOUT 1
//////////////////////////////////////////////////////////////////////////////////////////
function Changeshippingtype(stype) 
{
		if (stype == 1)
		{
			
			country_object="document.checkoutform.shipping_country";
			if (eval(country_object)) 
			{
			document.checkoutform.shipping_type[0].checked=true;
			select_field(country_object,"US");
			}
			
		}
		else
		{
			document.checkoutform.shipping_type[1].checked=true;
		}


}


function select_field(objectname,objvalue)
{
for (i=0;i<=(eval(objectname+'.length')-1);i++)
{
if ((eval(objectname + '.options[' + i + '].value'))==objvalue)
{
eval(objectname+'.options['+i+'].selected=true');
}
else{
eval(objectname+'.options['+i+'].selected=false');
}}}
//////////////////////////////////////////////////////////////////////////////////////////

// FOR CHECKOUT 2
//////////////////////////////////////////////////////////////////////////////////////////
function checkselectedshipping()
{

}
//////////////////////////////////////////////////////////////////////////////////////////

// FOR CHECKOUT 3
//////////////////////////////////////////////////////////////////////////////////////////


//document.billing.billing_country.value='[shipping_country]';

// For each option in country drop down... find index of shipping country, and select it!

function select_field(objectname,objvalue)
{
for (i=0;i<=(eval(objectname+'.length')-1);i++)
{
if ((eval(objectname + '.options[' + i + '].value'))==objvalue)
{
eval(objectname+'.options['+i+'].selected=true');
}
else{
eval(objectname+'.options['+i+'].selected=false');
}}}

function Changeshippingtypeb(stype) 
{
		if (stype == 1)
		{
			if (eval(country_object)) 
			{
			document.billing.billing_type[0].checked=true;
			country_object="document.billing.billing_country";
			select_field(country_object,"US");
			}
		}
		else
		{
			document.billing.billing_type[1].checked=true;
		}
}
//////////////////////////////////////////////////////////////////////////////////////////

