/*

Popup windows
							
Version History
2001-07-04	v1.0	Created					Shaun McCarthy (shaunm@web.co.nz)
2001-11-12	v1.1	Updated to move the form after popup 	Shaun McCarthy (shaunm@web.co.nz)

Copyright The Web Limited, 2001. All rights reserved.
This program may not be duplicated or transmitted in any way 
without the express written permission of The Web Limited.

*/

defaultHeight = 500;
defaultWidth  = 772;
demoWidth = 600;
demoHeight = 500;
moveToX = 20;
moveToY = 20;
toolHeight = 500;
toolWidth = 640;

function PopupDemo(url) {
	var newWindow = window.open(url, "onlineDemo", "width=" + demoWidth + ",height=" + demoHeight + ",scrollbars=no,status=no,resizable=yes");
	return false;
}

function popup(url, window_name, width, height) {
	var newWindow = window.open(url, window_name, "width=" + width + ",height=" + height + ",scrollbars=yes,status=no,resizable=yes");
	return false;
}

function popup_exact(url, window_name, width, height, scroll, resize) {
	var newWindow = window.open(url, window_name, "width=" + width + ",height=" + height + ",scrollbars=" + scroll + "status=no,resizable=" + resize);
	return false;
}

function popup_form(url) {
	popup(url, "telecom_form", defaultWidth, defaultHeight);
	return false;
}


function popup_tool(url) {
	popup(url, "telecom_tool", toolWidth, toolHeight);
	return false;
}


/* function CloseWindow
 *
 * This funciton will close the popup window and redirect the parent window to  
 * a different page
 *
 */

function CloseWindow(url) {
	window.opener.location = url;
	window.opener.focus();
//	window.close();
	return false;
}