function popup(name, url) {
	window.open(url, name,'width=599, height=400, toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0, resizable=1');

/*
	window.open(url,'veladg','width=599,height=400,toolbar=no, location=no,directories=no,status=yes,statusbar=0,menubar=yes,scrollbars=0,resizable=no');
*/

/*
	window.open(url,'veladg','width=599,height=400,toolbar=no, location=no,directories=no,status=yes,statusbar=0,menubar=yes,scrollbars=0,resizable=no');
*/

/*
	window.open(url,'Central','width=625,height=612,toolbar=no, location=no,directories=no,status=yes,menubar=yes,scrollbars=0,copyhistory=yes, resizable=no');
*/


}

function openScreenshot(URL)
{
	day = new Date();
	id = day.getTime();

	try {
		window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=669,height=420');
		<!-- eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=669,height=420');"); -->
	}
	catch(exception) {
		alert(exception);
	}
}

function setFields()
{
	var prodIndex = findProdNameParam();
	//alert("prodIndex: " + prodIndex);
	
	document.getElementById ('product').options[prodIndex].selected = true;
}

// findProdNameParam() assumes that there is only one parameter in the URL
//
// URL format when feedback is requested from product:
//   VelaClock:  veladg.com/feedback.html?p=VelaClock
//   VelaTerra:  veladg.com/feedback.html?p=VelaTerra
function findProdNameParam()
{
	// split the URL into URI & querystring
	var sURL = new String(document.location.href);
	var aHref = sURL.split("?");
	if (aHref == null || aHref.length <= 1)
		return 0;
	
	// this leaves the URI in aHref[0] and the querystring in aHref[1]
	
	// get an array of argument/value pairs
	var sQ = new String(aHref[1]);
	var aArgPairs = sQ.split("&");
	if (aArgPairs == null)
		return 0;
	
	// this puts each "arg=val" pair into each array element
	
	var sArgPair = new String(aArgPairs[0]);
	var aArg = sArgPair.split("=");
	if (aArg == null)
		return 0;
	else if ('VelaClockApp' == aArg[1])
		return 1;
	else if ('VelaClock' == aArg[1])
		return 2;
	else if ('VelaTerra' == aArg[1])
		return 3;

	/*
	// parse arg pairs
	for (var iArg=0; iArg < aArgPairs.length; iArg++)
	{
			var sArgPair = new String(aArgPairs[iArg]);
			var aArg = sArgPair.split("=");
	
			// this puts the parameter in aArg[0] and the value in aArg[1]
	}
	*/
}

