var myBrowser = function()
{    var a = {};
a.features = {xpath: !!(document.evaluate), air: !!(window.runtime), query: !!(document.querySelector), DOM: !!(document.getElementById)};
a.isMSIE = !!(document.all && document.all.item && !window.opera); 
a.isOpera = !!(window.opera); 
a.isNetscape = !!(document.layers); 
a.isMozilla = !!(a.features.DOM && !a.isMSIE && !a.isOpera);
a.isGecko = !!(document.getBoxObjectFor);
a.isSafari = !!(navigator.vendor && navigator.vendor.indexOf("Apple") != 0);
a.version = 0;
var tmp1;
if (a.isMSIE && (tmp1 = navigator.appVersion.match(/MSIE (\d+(\.\d+)?)/)))
a.version = Number(tmp1[1]);
else if (a.isOpera && (tmp1 = navigator.appVersion.match(/^\d+(\.\d+)?/)))
a.version = Number(tmp1[0]);
else if (a.isGecko && (tmp1 = navigator.userAgent.match(/rv:(\d+(\.\d+)?)/)))
a.version = Number(tmp1[1]);
else if (tmp1 = navigator.appVersion.match(/^\d+(\.\d+)*/))
a.version = Number(tmp1[0]);
return a; }();
function isElement(itm)
{    return ((typeof itm).toLowerCase()=='object' && itm.tagName) ? true : false; }
function getDocumentBody() {
return document.documentElement || document.body; }
function getScrolls() {
var docElem = getDocumentBody();
var scrollTop =  window.pageYOffset || docElem.scrollTop;
var scrollLeft = window.pageXOffset || docElem.scrollLeft;
return {x: scrollLeft, y: scrollTop}; }
function qf_getbyid(id) {
var itm = null;
if (document.getElementById)
itm = document.getElementById(id);
else if (document.all)
itm = document.all[id];
else if (document.layers)
itm = document.layers[id];
return itm; }
function toggleview(id) {
if (!id) return;
var itm = null;
if (itm = qf_getbyid(id)) {
if (itm.style.display == "none")
qf_show_div(itm); else
qf_hide_div(itm); } }
function qf_hide_div(itm) {
if (!itm)
return;
itm.style.display = "none"; }
function qf_show_div(itm) {
if (!itm)
return;
itm.style.display = ""; }
function qf_hide_div_id(id) {
var itm = null;
if (itm = qf_getbyid(id))
itm.style.display = "none"; }
function qf_show_div_id(id) {
var itm = null;
if (itm = qf_getbyid(id))
itm.style.display = ""; }
function getAbsolutePos(itm) {
var obj = itm;
var r = { x: obj.offsetLeft, y: obj.offsetTop };
while (obj = obj.offsetParent) {
r.x += obj.offsetLeft;
r.y += obj.offsetTop; }
return r; }
function qf_show_div_mouse(id, evt) {
var mousex = evt.clientX;
var mousey = evt.clientY;
var pagexoff = 0;
var pageyoff = 0;
var obj = null;
if (obj = qf_getbyid(id)) {
var stl = getStyleObj(obj);
if (myBrowser.isMSIE) {
var oCanvas = document.getElementsByTagName(
(document.compatMode && document.compatMode == 'CSS1Compat') ? 'HTML' : 'BODY' )[0];
pagexoff = oCanvas.scrollLeft;
pageyoff = oCanvas.scrollTop;
var w_width  = oCanvas.clientWidth + oCanvas.scrollLeft; } else {
pagexoff = window.pageXOffset;
pageyoff = window.pageYOffset;
var w_width  = window.innerWidth + window.pageXOffset; }
if(stl){
stl.display = '';
var c_width = obj.offsetWidth;
if (mousex + pagexoff + c_width > w_width)
stl.left = w_width - c_width + 'px'; else
stl.left = (mousex+pagexoff-0.7*c_width) + 'px';
stl.top = (mousey+pageyoff) + 25 + 'px'; } }
return true; }
function isBody(element){
return (/^(?:body|html)$/i).test(element.tagName); };
function getElementComputedStyle(elem, prop) {
if (!isElement(elem))
elem = document.getElementById(elem);
if (document.defaultView && document.defaultView.getComputedStyle) {
if (prop.match(/[A-Z]/)) prop = prop.replace(/([A-Z])/g, "-$1").toLowerCase();
return document.defaultView.getComputedStyle(elem, "").getPropertyValue(prop); }
if (elem.currentStyle) {
var i;
while ((i=prop.indexOf("-"))!=-1) prop = prop.substr(0, i) + prop.substr(i+1,1).toUpperCase() + prop.substr(i+2);
return elem.currentStyle[prop]; }
return ""; }
var styleString = getElementComputedStyle;
function styleNumber(element, style) {
return parseInt(styleString(element, style), 10) || 0; }
function getElementOffsetParent(element) {
if (!isElement(element) || isBody(element))
return null;
if (element.offsetParent)
return element.offsetParent;
while ((element = element.parentNode)) {
if (styleString(element, 'position') != 'static' || isBody(element))
return element; }
return null; }
function getStyleObj(itm) {
if ((typeof itm).toLowerCase()!='object')
return null;
return (myBrowser.isNetscape) ? itm : itm.style; }
function mousePageXY(e) {
var x = 0, y = 0;
if (!e) e = window.event;
if (e.pageX || e.pageY) {
x = e.pageX;
y = e.pageY; }
else if (e.clientX || e.clientY) {
x = e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) - document.documentElement.clientLeft;
y = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop) - document.documentElement.clientTop; }
return {x: x, y: y}; }
function getElementClientPos(itm) {
if (!isElement(itm))
return null;
if (this.getBoundingClientRect) {
var bound = itm.getBoundingClientRect();
return {x: parseInt(bound.left, 10), y: parseInt(bound.top, 10)}; }
var element = itm, position = {x: 0, y: 0}, isFixed = false; do {
position.x += element.offsetLeft;
position.y += element.offsetTop;
if (myBrowser.isGecko) { }
isFixed = (styleString(element, 'position') == 'fixed');
element = getElementOffsetParent(element);
} while (element && !isBody(element) && !isFixed)
var html = getDocumentBody(), scroll = getScrolls();
position.x += html.clientLeft - ((isFixed) ? 0 : scroll.x);
position.y += html.clientTop  - ((isFixed) ? 0 : scroll.y);
return position; }
QF_TIMERS = function()
{    var TIMECTRLS = { s: window.setTimeout, c: window.clearTimeout };
var onLoadFuncs = [];
window.onload = function() {
for (var i in onLoadFuncs)
{            var func = onLoadFuncs[i];
func(); } };
return {        setTimeout: function(func, dt) {
window.QF_TIMERS_tmp = TIMECTRLS.s;
if ((typeof func).toLowerCase() == 'string')
id = window.QF_TIMERS_tmp(func, dt); else {
var id = null;
var mediator = function() {
func();
delete TIMECTRLS[id];  }
id = window.QF_TIMERS_tmp(mediator, dt);
TIMECTRLS[id] = mediator; }
window.QF_TIMERS_tmp = null; 
return id; },
clearTimeout: function(id) {
window.QF_TIMERS_tmp = TIMECTRLS.c;
delete TIMECTRLS[id]; 
var r = window.QF_TIMERS_tmp(id);
window.QF_TIMERS_tmp = null; 
return r; },
addOnLoad: function(func) {            
onLoadFuncs.push(func); } } }(); /*
QF_TIMERS.addOnLoad(function()
{    var inps = document.getElementsByTagName('input');
for (var i in inps) {
var type = 'input-' + (inps[i].type ? inps[i].type : 'text');
if (inps[i].className)
type += ' ' + inps[i].className
inps[i].className = type; } }); */
