var isIE = (document.all);
var msie = isIE;
var isOpera = (window.opera);

function getScrollPos(win) {
	var x,y;
	if (win.pageYOffset) // all except Explorer
	{
		x = win.pageXOffset;
		y = win.pageYOffset;
	}
	else if (win.document.documentElement && win.document.documentElement.scrollTop)
		// Explorer 6 Strict
	{
		x = win.document.documentElement.scrollLeft;
		y = win.document.documentElement.scrollTop;
	}
	else if (win.document.body) // all other Explorers
	{
		x = win.document.body.scrollLeft;
		y = win.document.body.scrollTop;
	}
	return Array(x,y);
}

function getOffset(obj) { // get the right position
  otop = 0; oleft = 0;
  ctop = 0; cleft = 0;
  if (obj) {
    ctop = obj.offsetTop; cleft = obj.offsetLeft;
    otop = ctop; oleft = cleft;
    p = obj.offsetParent;
    while (p) {
      ctop += p.offsetTop; cleft += p.offsetLeft;
      p = p.offsetParent;
    }
    return Array(ctop,cleft,otop,oleft);
  }
}

function removeObj(obj) { // remove any object or element
  if (obj) if (pn = obj.parentNode) {
	  pn.removeChild(obj);
  	obj = null;
	}
	return obj;
}

function is_set() {
	if (arguments.length) {
		obj = arguments[0];
		if (typeof obj != 'undefined') return true;
	}
	return false;
}

function openDownDiv() {
	var downdiv = document.getElementById('downdiv')
	if (downdiv && downdiv.style.visibility) {
		downdiv.style.visibility="visible";
		window.setTimeout("closeDownDiv()",5000);
	}
}

function closeDownDiv() {
	var downdiv = document.getElementById('downdiv')
	if (downdiv && downdiv.style.visibility) downdiv.style.visibility="hidden";
}

