var popUp; 

function OpenCalendar(idname, postBack)
{
	popUp = window.open('Calendar.aspx?formname=' + document.forms[0].name + 
		'&id=' + idname + '&selected=' + document.forms[0].elements[idname].value + '&postBack=' + postBack, 
		'popupcal', 
		'width=180,height=260,left=200,top=300');
}

function SetDate(formName, id, newDate, postBack)
{
	eval('var theform = document.' + formName + ';');
	popUp.close();
	theform.elements[id].value = newDate;
	if (postBack)
		__doPostBack(id,'');
}		

function OpenTerms(idname, postBack)
{
	popUp = window.open('Terms.aspx?formname=' + document.forms[0].name + 
		'&id=' + idname + '&postBack=' + postBack, 'popup', 'width=600,height=460,left=200,top=200,scrollbars=yes');
}

function SetTerms(formName, id, boolCheck, postBack)
{
	eval('var theform = document.' + formName + ';');
	popUp.close();
	theform.elements[id].checked = boolCheck;
	if (postBack)
		__doPostBack(id,'');
}

function OpenPolicy(postBack)
{
	popUp = window.open('Policy.aspx?formname=' + document.forms[0].name + 
		'&postBack=' + postBack, 'popup', 'width=600,height=460,left=200,top=200,scrollbars=yes');
}

function OpenWarranty(postBack)
{
	popUp = window.open('Warranty-Conditions.aspx?formname=' + document.forms[0].name + 
		'&postBack=' + postBack, 'popup', 'width=600,height=460,left=200,top=200,scrollbars=yes');
}

function OpenSTBLink(postBack)
{
	popUp = window.open('STBLink.aspx?formname=' + document.forms[0].name + 
		'&postBack=' + postBack, 'popup', 'width=600,height=460,left=200,top=200,scrollbars=yes');
}

function OpenDVDLink(postBack)
{
	popUp = window.open('DVDLink.aspx?formname=' + document.forms[0].name + 
		'&postBack=' + postBack, 'popup', 'width=600,height=460,left=200,top=200,scrollbars=yes');
}