//	openWindow.js
//	opens new pop up window

//initialise global variables
var sampleformWindow = '';
var cushionform = '';
var newWindow = '';

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
		var	newWindow=window.open(URLtoOpen, windowName, windowFeatures);
		newWindow.focus();
}

function openCushionWindow(URLtoOpen, windowName, windowFeatures) {
	var	newWindow=window.open(URLtoOpen, windowName, windowFeatures);
		newWindow.focus();
}
//	add the following code for the links
// javascript:openNewWindow('url.htm', 'fashion','height=400, width=313, toolbar=no, scrollbars=no')

/*	
Function openSampleForm(URLtoOpen, windowName, windowFeatures)
	Checks to see if the sample form is open, if not open a new window with the form.
	If the sample form is already open bring the form to the front of all windows.
Parameters: 
	URLtoOpen - the address of the window that needs to be opened
	windowName - windowName
	windowFeatures - string containing features of how the pop up window should be displayed e.g. height width, position etc
*/

function openSampleForm(URLtoOpen, windowName, windowFeatures) {
	if (!sampleformWindow.closed && sampleformWindow.location)
	{
		sampleformWindow.focus();
	}
	else
	{
		sampleformWindow=window.open(URLtoOpen, windowName, windowFeatures);
		sampleformWindow.focus();		
	}
}

/*	
Function openCushionForm(URLtoOpen, windowName, windowFeatures)
	Checks to see if the cushion form is open, if not open a new window with the form.
	If the sample form is already open bring the form to the front of all windows.
Parameters: 
	URLtoOpen - the address of the window that needs to be opened
	windowName - windowName
	windowFeatures - string containing features of how the pop up window should be displayed e.g. height width, position etc
*/
function openCushionForm(URLtoOpen, windowName, windowFeatures) {
	if (!cushionform.closed && cushionform.location)
	{
		cushionform.focus();
	}
	else
	{
		cushionform=window.open(URLtoOpen, windowName, windowFeatures);
		cushionform.focus();
		
	}
}
//	add the following code for the links
// javascript:openWindow('url.htm', 'fashion','height=400, width=313, toolbar=no, scrollbars=no')

