// Need some sort of a function we can call to refresh, even if there is no __doPostBack...
//

function __doRefresh() 
{
	var theform;
	
	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) 
	{
		theform = document.forms["Form1"];
	}
	else 
	{
		theform = document.Form1;
	}
	theform.submit();
}



function openPageSelector()
{
	var w = window.open("PageSelector.aspx","PageSelector","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=550,height=110",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}



function openPaymentInfo(orderNumber)
{
	var w = window.open("PaymentInfo.aspx?OrderNumber="+orderNumber,"PaymentInfo","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=577,height=360",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}


function openZoomWindow(zoom)
{
	var w = window.open(zoom,"Zoom","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=330,height=300",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}


function openContentEditWindow(contentCategory)
{
	if (contentCategory == "")
		contentCategory = "-1"
	var w = window.open("contentEdit.aspx?ContentCategory="+contentCategory,"ContentEdit","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=750,height=735",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}


function openNewContentCategoryWindow(contentCategory)
{
	var w = window.open("contentCategoryEdit.aspx?ContentCategory="+contentCategory,"NewContentCategoryWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=660,height=330",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}


function openNewContentWindow(contentCategory)
{
	var w = window.open("newContent.aspx?ContentCategory="+contentCategory,"NewContentWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=670,height=700",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}


function openNewControlWindow(contentCategory)
{
	var w = window.open("newControl.aspx?ContentCategory="+contentCategory,"NewControlWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=670,height=700",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}


function openPageWindow(Page, Website)
{
	var w = window.open("PageManager.aspx?Page="+Page+"&Website="+Website,"PageWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=512,height=232",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}


function openShippingCalculator(Weight)
{
	var w = window.open("ShippingCalculator.aspx?Weight="+Weight,"ShippingCalculatorWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=470,height=370",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}


function closeCurrentWindow()
{
	opener.__doRefresh()
	window.close();
}

function mailOrder(OrderNumber)
{
	var w = window.open("MailOrder.aspx?OrderNumber="+OrderNumber,"MailOrderWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=360,height=100",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}

function clearCacheWindow()
{
	var w = window.open("ClearCache.aspx","ClearCacheWindow","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=360,height=100",true);
	w.creator = self;
	w.callingForm = this;
	w.opener = this;
}
