//____________________________________________________________________
//
// prise_js_utilities.js - PRISE Frontend JavaScript Utilities
//
// PRISE Ecommerce System
// Copyright (c) 2007-2012 by WebShopsDirect, Dublin, Ireland
//____________________________________________________________________

var selected;
var submitter	= null;
var popwin		= null;

//____________________________________________________________________
// Form utilities

function submitFunction()
{
    submitter = 1;
}

//____________________________________________________________________
// Popup window functions

function popupWindow(url)
{
//	var popwin;
	//
	if (navigator.userAgent.indexOf('Chrome/') > 0
	 || navigator.userAgent.indexOf('Opera') >= 0
	 )
	{
		if (popwin != null
//		 && typeof(popwin) != ’undefined’
//		 && !popwin.closed
		 )
		{
			popwin.close();
//			popwin.blur();
		}
	}
	// Open popup window
	popwin = window.open(
		url,
		'popupPRISE',
		'width=480,height=600'
//			+ ',copyhistory=0'	//no'
			+ ',directories=0'	//no'
			+ ',location=0'		//no'
			+ ',menubar=0'		//no'
			+ ',resizable=1'	//yes'
			+ ',scrollbars=1'	//yes'
			+ ',status=1'		//no'
			+ ',titlebar=1'		//yes'
			+ ',toolbar=0'		//no
			+ ',screenX=150,screenY=120'
			+ ',top=120,left=150'
		);
	// Focus on popup window
	if (window.focus)
	{
		popwin.focus();
	}
}

function popupImageWindow(
	url
	)
{
//	var popwin;
	//
	if (navigator.userAgent.indexOf('Chrome/') > 0
	 || navigator.userAgent.indexOf('Opera') >= 0
	 )
	{
		if (popwin != null
//		 && typeof(popwin) != ’undefined’
//		 && !popwin.closed
		 )
		{
			popwin.close();
//			popwin.blur();
		}
	}
	// Open popup window
	var popwin = window.open(url,
		'popupPRISEImage',
		'width=100,height=100'
//			+ ',copyhistory=0'
			+ ',directories=0'
			+ ',location=0'
			+ ',menubar=0'
			+ ',resizable=1'
			+ ',scrollbars=0'
			+ ',status=1'
			+ ',titlebar=1'
			+ ',toolbar=0'
			+ ',screenX=150,screenY=150'
			+ ',top=150,left=150'
		);
	// Focus on popup window
	if (window.focus)
	{
		popwin.focus();
	}
}

//____________________________________________________________________
// JavaScript code end

