function startGallery() {
var myGallery = new gallery($('myGallery'), {
timed: true,
showCarousel: false,
showInfopane: false,
delay: 6000
});
}
window.addEvent('domready',startGallery);

function paypalform()
{
   var form = document.forms['addtocart'];
   var el = document.createElement("input");
   el.type = "hidden";
   el.name = "buynow";
   el.value = "Y";
   form.appendChild(el);
   form.submit();
}

function validateResetPaymethod() {

len = document.form.tracking_paymethod.length;

for (i = 0; i <len; i++) {
document.form.tracking_paymethod[i].checked = false;
}//End of for

}//End of function

function checkShipMethod() {

if (document.getElementById('ste_checkout_intro_proc').innerHTML) {

answer = confirm("Since your shipping rates have already been calculated you will need to start over in order to change your info now. Are yo sure you want to change your info?");

if (answer) {
window.location.reload();
}//End of answer if.
}//End of innerhtml if.

}//End of function

function clearCheckoutRadios() {

//clear the radio buttons for the onepagecheckout form

len = document.form.tracking_paymethod.length;

for (i = 0; i <len; i++) {
document.form.tracking_paymethod[i].checked = false;
}//End of for

len = document.form.shipinfotype.length;

for (i = 0; i <len; i++) {
if(i == 0){
document.form.shipinfotype[i].checked = true;
}else {
document.form.shipinfotype[i].checked = false;
}//End of if.
}//End of for

}//End of function

