/**
 * Copyright Adlucent 2006.  All Rights Reserved.  Copyright monitoring by Adlucent.
 * This script should be included at the end of the head tag after
 * including the utils.js script.
 * e.g.
 *
 * <script language="javascript" type="text/javascript" src="utils.js">
 * </script>
 * <script language="javascript" type="text/javascript" src="kw.js">
 * </script>
 *
 * The script automatically changes the title to the value of the "kw"
 * GET URL parameter if it exists and is non-empty.
 * To include the value of the "kw" parameter in the body of the html put
 * the following code where the value should appear:
 *
 * <script language="javascript" type="text/javascript">
 * writeKW("<img src=\"foo/bar.jpg\"/>");
 * </script>
 * <noscript><img src="foo/bar.jpg"/></noscript>
 *
 * The parameter to the writeKW() will be written in the event there is
 * no "kw" value or it is empty. Any quotation marks in the parameter
 * should be escaped with a backslash as in the example above.
 *
 * The "noscript" tag contains the html to be shown if the browser does
 * not support javascript.
 * Currently the script does not handle any special characters other than
 * space in the "kw" parameter.
 * You can test the use of the script by loading the page in Firefox (for
 * IE you will have to upload the files to a http server first) and 
 * specifying a URL parameter.
 * e.g. file:///home/aibrahim/testpage.html?kw=foobar
 */


kwVal = getUrlParam("kw");
if ((kwVal != null) && (kwVal != "")) {
  document.title = kwVal;
}

function writeKW(defaultHtml) {
  if ((kwVal != null) && (kwVal != "")) {
    document.write(kwVal);
  } else {
    document.write(defaultHtml);
  }
}
