var pixList;
var imgList = [];

function weddingPic (id, pic, pNo)
{
	document.getElementById ("picid").innerHTML = pic.replace (".jpg", "");
	setPayPal ();
	var img = document.getElementById ("wedpic");
	img.src = imgList [pNo].src;
}

function setBtn (b, md)
{
	var mds = ["", "a", "b", "c"];
	document.getElementById ("nav" + b).src = "/images/weddings/wbtn" + b + mds [md] + ".png";
}

function setPayPal ()
{
	var prc = document.getElementById ("phsize").value.split (",");
	document.getElementById ("amount").value = DLibNumerical.dec (prc [1], 2);
	document.getElementById ("item_name").value = prc [0] + " / " + document.getElementById ("picid").innerHTML;
}

function gotoPaypal ()
{
	var wId = window.open ('', 'paypal');
	wId.close ();
	document._xclickcheckout.submit ();
}

var tm = null;

function startTimer ()
{
	tm = setTimeout ("focusWin()", 2000);
}

function focusWin ()
{
	clearTimeout (tm);
	this.window.focus ();
}
