

	function confirmSubmit(url)
	{
		var strMsg = 'Are you sure you want to submit these form?';

		if (confirm(strMsg))
		{
			window.location = url;
		}
	}


	function createBookmarkLink(title, url)
	{
		if (window.sidebar)
		{
			window.sidebar.addPanel(title, url, '');	// Mozilla Firefox Bookmark
		}
		else if(window.external)
		{
			window.external.AddFavorite(url, title);	// IE Favorite
		}
		else if(window.opera && window.print)
		{
			// do nothing for opera
		}

		return false;			// opera Hotlist

	} 


	function validateAddThread(form)
	{
		var strMsg = 'Are you sure you want to submit this information?';

		if (form.body.value == '')
		{
			alert ('Please complete form field');
			return false;
		}
		else {
			if (confirm(strMsg))
			{
				return true;
			}
			else {
				return false;	
			}
		}
	}


	function popSupplierDialogue(supplier_id, step_id)
	{
		if (supplier_id == '')
		{
			alert ('No supplier selected');
		}
		if (step_id == '')
		{
			alert ('No step selected');
		}
		window.open('supplier_dialogue.php?action=dialogue&supplier_id=' + supplier_id + '&step_id=' + step_id, 'SupplierDialogue','status=yes,resizable=yes,scrollbars=yes,width=575,height=475');
	}


	function popSupplierProfile(supplier_id)
	{
		window.open('ppc_supplier.php?supplier_id=' + supplier_id, 'supplierprofile','status=yes,resizable=yes,scrollbars=yes,width=575,height=525');
	}


	function popUserProfile(user_id)
	{
		window.open('ppc_user.php?user_id=' + user_id, 'userprofile','status=yes,resizable=yes,scrollbars=yes,width=575,height=550');
	}


	function popPPCNotes(user_id)
	{
		window.open('ppc_notes.php?user_id=' + user_id, 'notes','status=yes,resizable=yes,scrollbars=yes,width=575,height=525');
	}


	function popPPCSignature()
	{
		window.open('ppc_signature.php', 'signature','status=yes,resizable=yes,scrollbars=yes,width=575,height=525');
	}


	function popEmailSupplier(user_id)
	{
		window.open('ppc_email_supplier.php?user_id=' + user_id, 'emailsupplier','status=yes,resizable=yes,scrollbars=yes,width=575,height=525');
	}


	function popPage(URL)
	{
		window.open(URL, 'page', 'status=no, resizable=yes, scrollbars=yes, width=425, height=475');
	}


	function printThis()
	{
		if (window.print) 
		{
			window.print();
		}
		void (null);
	}
