﻿
$(document).ready(function() {
$(".boxy").boxy();
$(".modal-boxy").boxy({
    modal: true
});

});

function SameAsBilling()
	{
		if(document.frm1.cb_use_same.checked)
		{
			document.frm1.frm_shipping_name.value = document.frm1.frm_billing_name.value;
			document.frm1.frm_shipping_address1.value = document.frm1.frm_billing_address1.value;
			document.frm1.frm_shipping_address2.value = document.frm1.frm_billing_address2.value;
			document.frm1.frm_shipping_city.value = document.frm1.frm_billing_city.value;
			document.frm1.frm_shipping_state.selectedIndex = document.frm1.frm_billing_state.selectedIndex-1;
			document.frm1.frm_shipping_postal.value = document.frm1.frm_billing_postal.value;
		}
		else
		{
			document.frm1.frm_shipping_name.value = '';
			document.frm1.frm_shipping_address1.value = '';
			document.frm1.frm_shipping_address2.value = '';
			document.frm1.frm_shipping_city.value = '';
			document.frm1.frm_shipping_state.selectedIndex = 0;
			document.frm1.frm_shipping_postal.value = '';
		}
		
	}
	
function updateExp()
    {
        var expmo = document.frm1.frm_exp_mo;
        var expyr = document.frm1.frm_exp_yr;
        var mo = expmo.options[expmo.selectedIndex].value+'';
        var yr = expyr.options[expyr.selectedIndex].value+'';
        document.frm1.frm_card_exp.value = mo+yr;
    }
	
function cvchelp()
	{
		winpop = window.open('cardcode.aspx','','width=350,height=300,titlebar=no');
		winpop.moveTo(10,10);
	}
	
function completeOrder()
	{
	document.frm1.action = 'cart.aspx?action=complete';
	document.frm1.submit();
	}
function popImage(iid)
			{
				win1 = window.open('popimage.aspx?id='+iid,'','width=400,height=400');
				win1.moveTo((screen.availWidth-400)/2,(screen.availHeight-400)/2);
			}
function moveUp(id)
		{
			window.open('modGallery.aspx?mode=movePhotoUp&photo='+id,'','width=450,height=300');
		}
		function moveDown(id)
		{
			window.open('modGallery.aspx?mode=movePhotoDown&photo='+id,'','width=450,height=300');
		}
		function newAlbum()
		{
			window.open('modGallery.aspx?mode=newAlbum','','width=450,height=300');
		}
		function deleteItem(photo)
		{
			window.open('modGallery.aspx?mode=deletePhoto&photo='+photo,'','width=450,height=300');
		}
		function deleteAlbum(albumid)
		{
			window.open('modGallery.aspx?mode=deleteAlbum&album='+albumid,'','width=450,height=300');
		}
		function addNew(albumid)
		{
			window.open('modGallery.aspx?mode=newPhoto&album='+albumid,'','width=450,height=300');
		}
		function editPhoto(photo)
		{
			window.open('modGallery.aspx?mode=editPhoto&photo='+photo,'','width=450,height=300');
		}

//window.onload += initPage();