/*****************************************************************************
*
*  ikn_apps.js
*  Author:  Peter Adams (pta@interkan.net)
*  http://www.interkan.net/
*  Date Created: 21 March 2002
*  Last Modified: 3 June 2003
*
*  Description:
*    This file contains JavaScript code for use with IKN Universal Apps.
*
* Copyright (c) 2002-2003 InterKan.Net, Inc.  All rights reserved.
*
*****************************************************************************/

function openWin(url, w, h) {
/*****************************************************************************
openWin opens a new window pointing to the supplied URL.  The window will
have no borders, no menus, and vertical scroll bar only.
*****************************************************************************/
    if (w == null) w = 500;
	if (h == null) h = 400;
	var tmp = new Date();
	var success = window.open(url,"vcprPopup",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=' + w + ',height=' + h);
}

function openWinfull(url, w, h) {
/*****************************************************************************
openWin opens a new window pointing to the supplied URL.  The window will
have no borders, no menus, and vertical scroll bar only.
*****************************************************************************/
    if (w == null) w = 500;
	if (h == null) h = 400;
	var tmp = new Date();
	var success = window.open(url,"vcprPopup",'toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=' + w + ',height=' + h);
}

function add_emoticon(icon) {
/*****************************************************************************
Adds the specified emoticon to the end of the message body element of the
post form.
*****************************************************************************/
    self.document.STPostForm.body.value += icon + " ";
	self.document.STPostForm.body.focus();
}

function checkAll(f) {
/*****************************************************************************
Marks all checkboxes in the specified form.
*****************************************************************************/
	for (i=0; i<f.elements.length; i++) {
	    f.elements[i].checked = f.check_all_listed.checked;
	}
}

function useProduct(textbox, value) {
/*****************************************************************************
Populates the specified textbox with the specified value.
*****************************************************************************/
    textbox.value = value;
}