function PopUp(url){
	var sealWin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=400,height=400');
	self.name = "mainWin";
}

function FlexPopUp( NAME, URL, WIDTH, HEIGHT ){
	var crap = window.open( URL, NAME, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=' + WIDTH + ',height=' + HEIGHT );
}

function SizingPopUp(url){
	var sealWin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=794,height=420,top=50,left=50');
	self.name = "mainWin";
}

function CompleteOrder(){
	document.mform.finalize.value = 'Your order is being processed, please wait.';
	return true;
}

// DNR--modified this to not have redunant, nested declaration of URL and win [throws warnings in browser]
function ZoomWindow(PRODUCTID, sub_number){
	var isMinNS4 = (navigator.appName.indexOf("Netscape") >= 0  &&  parseFloat(navigator.appVersion) >= 4) ? 1 : 0;
	var isMinIE4 = (document.all) ? 1 : 0;
	var URL;
	var win;

	if (isMinIE4){
		URL = '/xzoom/' + PRODUCTID + '/' + sub_number;
	} else {
		URL = '/zoom/' + PRODUCTID + '/' + sub_number;
	}
	win = window.open(URL, 'winlargeimg', 'width=600,height=530,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=yes' );
	win.focus();
}


/*
 * Gets the currently firing event, if any.
 */
function get_event(e) {
	if (!e)
		return window.event;
	return e;
}
/*
 * Gets the element currently firing the event.
 */
function get_event_target(e) {
	if(!e)
		e = window.event;
	if(e.target)
		return e.target;
	return e.srcElement;
}

/*
 * Prevents any other handlers for the currently-running
 *  event from activating.
 */
function clear_event(e) {
	e = get_event(e);
	if(!e)
		e = window.event;
	if(e.stopPropagation)
		e.stopPropagation();
	if(e.preventDefault)
		e.preventDefault();
	e.cancelBubble = true;
	e.cancel = true;
	e.returnValue = false;
	return false;
}
