var popUp; 
var defaultURL
var secureURL


defaultURL = "http://www.randazzofreshmarket.com/"

function OpenWinePop(idname, optionCount, postBack)
		{
			popUp = window.open(defaultURL + 'Product/Option_Pop.aspx?OptionCount=' + optionCount + '&formname=' + document.forms[0].name + 
				'&amp;id=' + idname + '&amp;selected=' + document.forms[0].elements[idname].value + '&amp;postBack=' + postBack, 
				'popupcal', 
				'width=250,height=350,left=200,top=250');
		}

		function SetWine(formName, id, newWine, postBack)
		{
			//eval('var theform = document.' + formName + ';');
			//popUp.close();
			//theform.elements[id].value = newWine;
			//if (postBack)
			//	__doPostBack(id, '');				
		}  

function openImageWindow(url) 
{
	ImgWin = window.open(url,"ImgWin",'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,height=500');
}

function openPopupWindow(url, imageWidth, imageHeight) 
{
	ImgWin = window.open(url,"ImgWin",'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=' + imageWidth + ',height=' + imageHeight +'');
}

function openLinkWindow(url) 
{
	LinkWin = window.open(url,"LinkWin",'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=400,height=500');
}

function OpenOptionWindow(optionCount, ProductCategoryID, ProductID, BasketID, postBack)
{
    popUp = window.open(defaultURL + 'Product/Option_Pop.aspx?ProductCategoryID=' + ProductCategoryID + '&ProductID=' + ProductID + '&OptionCount=' + optionCount + '&BasketID=' + BasketID, 'popupwin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=500,height=450,left=200,top=250');
}

/*function SetBottle(formName, id, newWine, postBack)
{
//this code needs to take the value passed in and set it to the label for the bottle...

    eval('var theform = document.' + formName + ';');
    popUp.close();
    theform.elements[id].value = newWine;
    if (postBack)
        __doPostBack(id,'');
}
function OpenPopUp(idname, postBack)
{
    popUp = window.open(defaultURL + 'Product/Option_Pop.aspx?formname=' + document.forms[0].name + 
        '&amp;id=' + idname + '&amp;selected=' + document.forms[0].elements[idname].value + '&amp;postBack=' + postBack, 
        'popupcal', 
        'width=165,height=250,left=200,top=250');
}

function SetWine(formName, id, newWine, postBack)
{
    eval('var theform = document.' + formName + ';');
    popUp.close();
    theform.elements[id].value = newWine;
    if (postBack)
        __doPostBack(id,'');
} 
*/