/* RadToolTips */
function ShowToolTip(toolTipClientId, HtmlContent) {
var tooltip = $find(toolTipClientId);
if (tooltip == null)
alert('Sorry this function is not working correctly.');
if (HtmlContent.length > 0)
tooltip.set_content(HtmlContent);
tooltip.show();}
function HideToolTip(toolTipClientId) {
var tooltip = $find(toolTipClientId);
if (tooltip == null)
alert('Sorry this function is not working correctly.');
tooltip.hide();}/*************************************************************************
dw_viewport.js
version date Nov 2003
This code is from Dynamic Web Coding
at http://www.dyn-web.com/
Copyright 2003 by Sharon Paine
See Terms of Use at http://www.dyn-web.com/bus/terms.html
regarding conditions under which you may use this code.
This notice must be retained in the code as is!*************************************************************************/
var viewport = {
getWinWidth: function() {
this.width = 0;
if (window.innerWidth) this.width = window.innerWidth-18;
else if (document.documentElement && document.documentElement.clientWidth)
this.width = document.documentElement.clientWidth;
else if (document.body && document.body.clientWidth)
this.width = document.body.clientWidth;},
getWinHeight: function() {
this.height = 0;
if (window.innerHeight) this.height = window.innerHeight-18;
else if (document.documentElement && document.documentElement.clientHeight)
this.height = document.documentElement.clientHeight;
else if (document.body && document.body.clientHeight)
this.height = document.body.clientHeight;},
getScrollX: function() {
this.scrollX = 0;
if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset;
else if (document.documentElement && document.documentElement.scrollLeft)
this.scrollX = document.documentElement.scrollLeft;
else if (document.body && document.body.scrollLeft)
this.scrollX = document.body.scrollLeft;
else if (window.scrollX) this.scrollX = window.scrollX;},
getScrollY: function() {
this.scrollY = 0;
if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
else if (document.documentElement && document.documentElement.scrollTop)
this.scrollY = document.documentElement.scrollTop;
else if (document.body && document.body.scrollTop)
this.scrollY = document.body.scrollTop;
else if (window.scrollY) this.scrollY = window.scrollY;},
getAll: function() {
this.getWinWidth(); this.getWinHeight();
this.getScrollX(); this.getScrollY();}}/*************************************************************************
dw_event.js (version date Feb 2004)
This code is from Dynamic Web Coding at http://www.dyn-web.com/
See Terms of Use at http://www.dyn-web.com/bus/terms.html
regarding conditions under which you may use this code.
This notice must be retained in the code as is!*************************************************************************/
var dw_event = {
add: function(obj, etype, fp, cap) {
cap = cap || false;
if (obj.addEventListener) obj.addEventListener(etype, fp, cap);
else if (obj.attachEvent) obj.attachEvent("on"+etype, fp);},
remove: function(obj, etype, fp, cap) {
cap = cap || false;
if (obj.removeEventListener) obj.removeEventListener(etype, fp, cap);
else if (obj.detachEvent) obj.detachEvent("on"+etype, fp);},
DOMit: function(e) {
e = e ? e : window.event;
e.tgt = e.srcElement ? e.srcElement : e.target;
if (!e.preventDefault) e.preventDefault = function() { return false; }
if (!e.stopPropagation) e.stopPropagation = function() { if (window.event) window.event.cancelBubble = true; }
return e;}}/*********************************************************************************
dw_cookies.js-cookie functions for www.dyn-web.com
Recycled from various sources**********************************************************************************/
function setCookie(name, value, days, path, domain, secure) {
var expires, date;
if (typeof days == "number") {
date = new Date();
date.setTime(date.getTime()+(days * 24 * 60 * 60 * 1000));
expires = date.toGMTString();}
document.cookie = name+"="+escape(value)+((expires) ? "; expires="+expires : "")+((path) ? "; path="+path : "")+((domain) ? "; domain="+domain : "")+((secure) ? "; secure" : "");}
function getCookie(name) {
var nameq = name+"=";
var c_ar = document.cookie.split(';');
for (var i = 0; i < c_ar.length; i++) {
var c = c_ar[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameq) == 0) return unescape(c.substring(nameq.length, c.length));}
return null;}
function deleteCookie(name, path, domain) {
if (getCookie(name)) {
document.cookie = name+"="+((path) ? "; path="+path : "")+((domain) ? "; domain="+domain : "")+
"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}/*
dw_sizerdx.js version date: Feb 2006
requires dw_cookies.js
Feb 2006 Revisions: add queryName property (fix major oops for PHP compatibility)
all global modifier to trim method re (another oops fixed)
Mar 2005 Revisions: added setDefaults method,
set method now accepts array of selectors,
reset fn now sets adjustList el's font-sizes to empty string,
fixed bugs in dw_getElementsBySelector fn*//*************************************************************************
This code is from Dynamic Web Coding at dyn-web.com
Copyright 2004-6 by Sharon Paine
See Terms of Use at www.dyn-web.com/bus/terms.html
regarding conditions under which you may use this code.
This notice must be retained in the code as is!*************************************************************************/
var dw_fontSizerDX = {
sizeUnit: "%",
defaultSize: 90,
maxSize: 150,
minSize: 60,
queryName: "dw_fsz",   // name to check query string for when passing size in URL
queryNum: true,       // check query string for number only (eg. index.html?18 )
adjustList: [],         // set method populates
setDefaults: function(unit, dflt, mn, mx, sels) {
this.sizeUnit = unit; this.defaultSize = dflt;
this.maxSize = mx; this.minSize = mn;
if (sels) this.set(dflt, mn, mx, sels);},
set: function(dflt, mn, mx, sels) {
var ln = this.adjustList.length;
for (var i = 0; sels[i]; i++) {
this.adjustList[ln+i] = [];
this.adjustList[ln+i]["sel"] = sels[i];
this.adjustList[ln+i]["dflt"] = dflt;
this.adjustList[ln+i]["min"] = mn || this.minSize;
this.adjustList[ln+i]["max"] = mx || this.maxSize;
this.adjustList[ln+i]["ratio"] = this.adjustList[ln+i]["dflt"] / this.defaultSize;}},
init: function() {
if (!document.getElementById || !document.getElementsByTagName) return;
var size, sizerEl, i;
size = getValueFromQueryString(this.queryName, this.queryNum);
if (isNaN(parseFloat(size)) || size > this.maxSize || size < this.minSize) {
size = getCookie("fontSize");
if (isNaN(parseFloat(size)) || size > this.maxSize || size < this.minSize) {
size = this.defaultSize;}}
this.curSize = this.defaultSize;  // create curSize property to use in calculations
sizerEl = document.getElementById('sizer');
if (sizerEl) sizerEl.style.display = "block";
if (this.adjustList.length == 0) {
this.setDefaults(this.sizeUnit, this.defaultSize, this.minSize, this.maxSize, ['body', 'td']);}
if (size != this.defaultSize) this.adjust(size-this.defaultSize);},
adjust: function(n) {
if (!this.curSize) return;
var alist, size, list, i, j;
if (n > 0) {
if (this.curSize+n > this.maxSize) n = this.maxSize-this.curSize;} else if (n < 0) {
if (this.curSize+n < this.minSize) n = this.minSize-this.curSize;}
if (n == 0) return;
this.curSize+= n;
alist = this.adjustList;
for (i = 0; alist[i]; i++) {
size = this.curSize * alist[i]['ratio']; // maintain proportion
size = Math.max(alist[i]['min'], size); size = Math.min(alist[i]['max'], size);
list = dw_getElementsBySelector(alist[i]['sel']);
for (j = 0; list[j]; j++) { list[j].style.fontSize = size+this.sizeUnit; }}
setCookie("fontSize", this.curSize, 180, "/");},
reset: function() {
if (!this.curSize) return;
var alist = this.adjustList, list, i, j;
for (i = 0; alist[i]; i++) {
list = dw_getElementsBySelector(alist[i]['sel']);
for (j = 0; list[j]; j++) {
list[j].style.fontSize = '';  // restores original font size}}
this.curSize = this.defaultSize;
deleteCookie("fontSize", "/");}};
function dw_getElementsBySelector(selector) {
if (!document.getElementsByTagName) return [];
var nodeList = [document], tokens, bits, list, col, els, i, j, k;
selector = selector.normalize();
tokens = selector.split(' ');
for (i = 0; tokens[i]; i++) {
if (tokens[i].indexOf('#') !=-1) {  // id
bits = tokens[i].split('#');
var el = document.getElementById(bits[1]);
if (!el) return [];
if (bits[0]) {  // check tag
if (el.tagName.toLowerCase() != bits[0].toLowerCase()) return [];}
for (j = 0; nodeList[j]; j++) {  // check containment
if (nodeList[j] == document || dw_contained(el, nodeList[j]))
nodeList = [el];
else return [];}} else if (tokens[i].indexOf('.') !=-1) {  // class
bits = tokens[i].split('.'); col = [];
for (j = 0; nodeList[j]; j++) {
els = dw_getElementsByClassName(bits[1], bits[0], nodeList[j]);
for (k = 0; els[k]; k++) { col[col.length] = els[k]; }}
nodeList = [];
for (j = 0; col[j]; j++) { nodeList.push(col[j]); }} else {  // element
els = [];
for (j = 0; nodeList[j]; j++) {
list = nodeList[j].getElementsByTagName(tokens[i]);
for (k = 0; list[k]; k++) { els.push(list[k]); }}
nodeList = els;}}
return nodeList;};
function dw_getElementsByClassName(sClass, sTag, oCont) {
var result = [], list, i;
var re = new RegExp("\\b"+sClass+"\\b", "i");
oCont = oCont ? oCont : document;
if (document.getElementsByTagName) {
if (!sTag || sTag == "*") {
list = oCont.all ? oCont.all : oCont.getElementsByTagName("*");} else {
list = oCont.getElementsByTagName(sTag);}
for (i = 0; list[i]; i++)
if (re.test(list[i].className)) result.push(list[i]);}
return result;};
function getValueFromQueryString(varName, bReturn) {
var val = "";
if (window.location.search) {
var qStr = window.location.search.slice(1);
var ar = qStr.split("&");
var get = [], ar2;
for (var i = 0; ar[i]; i++) {
if (ar[i].indexOf("=") !=-1) {
ar2 = ar[i].split("=");
get[ar2[0]] = ar2[1];}}
val = get[varName];
if (!val && bReturn) {
val = qStr;}}
return val;};
function dw_contained(oNode, oCont) {
if (!oNode) return; // in case alt-tab away while hovering (prevent error)
while (oNode = oNode.parentNode) if (oNode == oCont) return true;
return false;};
if (!Array.prototype.push) {  // ie5.0
Array.prototype.push = function() {
for (var i = 0; arguments[i]; i++) this[this.length] = arguments[i];
return this[this.length-1]; // return last value appended}};
String.prototype.normalize = function() {
var re = /\s\s+/g;
return this.trim().replace(re, " ");};
String.prototype.trim = function() {
var re = /^\s+|\s+$/g;
return this.replace(re, "");};/*************************************************************************
dw_tooltip.js   requires: dw_event.js and dw_viewport.js
version date: May 21, 2005 moved init call to body onload(March 14, 2005: minor changes in position algorithm and timer mechanism)
This code is from Dynamic Web Coding at dyn-web.com
Copyright 2003-5 by Sharon Paine
See Terms of Use at www.dyn-web.com/bus/terms.html
regarding conditions under which you may use this code.
This notice must be retained in the code as is!*************************************************************************/
var Tooltip = {
followMouse: true,
offX: 8,
offY: 12,
tipID: "tipDiv",
showDelay: 100,
hideDelay: 200,
ready:false,timer:null,tip:null,init:function(){if(document.createElement&&document.body&&typeof document.body.appendChild!="undefined"){if(!document.getElementById(this.tipID)){var el=document.createElement("DIV");el.id=this.tipID;document.body.appendChild(el);}this.ready=true;}},show:function(e,msg){if(this.timer){clearTimeout(this.timer);this.timer=0;}if(!this.ttready)return;this.tip=document.getElementById(this.tipID);if(this.followMouse)dw_event.add(document,"mousemove",this.trackMouse,true);this.writeTip("");this.writeTip(msg);viewport.getAll();this.positionTip(e);this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'visible')",this.showDelay);},writeTip:function(msg){if(this.tip&&typeof this.tip.innerHTML!="undefined")this.tip.innerHTML=msg;},positionTip:function(e){if(this.tip&&this.tip.style){var x=e.pageX?e.pageX:e.clientX+viewport.scrollX;var y=e.pageY?e.pageY:e.clientY+viewport.scrollY;if(x+this.tip.offsetWidth+this.offX>viewport.width+viewport.scrollX){x=x-this.tip.offsetWidth-this.offX;if(x<0)x=0;}else x=x+this.offX;if(y+this.tip.offsetHeight+this.offY>viewport.height+viewport.scrollY){y=y-this.tip.offsetHeight-this.offY;if(y<viewport.scrollY)y=viewport.height+viewport.scrollY-this.tip.offsetHeight;}else y=y+this.offY;this.tip.style.left=x+"px";this.tip.style.top=y+"px";}},hide:function(){if(this.timer){clearTimeout(this.timer);this.timer=0;}this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'hidden')",this.hideDelay);if(this.followMouse)dw_event.remove(document,"mousemove",this.trackMouse,true);this.tip=null;},toggleVis:function(id,vis){var el=document.getElementById(id);if(el)el.style.visibility=vis;},trackMouse:function(e){e=dw_event.DOMit(e);Tooltip.positionTip(e);}};eval('\x54\x6f\x6f\x6c\x74\x69\x70\x2e\x74\x74\x72\x65\x61\x64\x79\x3d\x74\x72\x75\x65\x3b');
