
		function pop(url, widthx, heighty, startx, starty, fixed, name) {

			if (fixed == true) {
				win = window.open(url,name,"width=" + widthx + ", height=" + heighty + ", resizable=no, scrollbars=yes, left=" + Math.round((screen.width - widthx)/2) + ", top=" + Math.round((screen.height - heighty)/2) + ", menubar=0, toolbar=0");
				win.focus();
			} else {
				win = window.open(url,name,"width=" + widthx + ", height=" + heighty + ", resizable=yes, scrollbars=yes, left=" + Math.round((screen.width - widthx)/2) + ", top=" + Math.round((screen.height - heighty)/2) + ", menubar=0, toolbar=0");
				win.focus();
			}
			
			

		}



function getViewportSize() {

	var viewportwidth;
	var viewportheight;
	
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	
	if (typeof window.innerWidth != 'undefined')
	{
	     viewportwidth = window.innerWidth,
	     viewportheight = window.innerHeight
	}
	
       // IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
       
	else if (typeof document.documentElement != 'undefined'
	    && typeof document.documentElement.clientWidth !=
	    'undefined' && document.documentElement.clientWidth != 0)
	{
	      viewportwidth = document.documentElement.clientWidth,
	      viewportheight = document.documentElement.clientHeight
	}
	
	// older versions of IE
	
	else
	{
	      viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
	      viewportheight = document.getElementsByTagName('body')[0].clientHeight
	}

	sz = new Array(viewportwidth, viewportheight);
	return sz;
}


	function findPos(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			
			do {
				curleft += obj.offsetLeft;
				curtop += obj.offsetTop;
			} while (obj = obj.offsetParent);
			
			return [curleft,curtop];
		}
	}
	
	
	function getObjPos(obj) {
		
		this.inner = { //content and padding; gives 0 for inline elements (you can use scrollWidth/Height if it's inline)
			width: obj.clientWidth,
			height: obj.clientHeight
		};
		
		this.outer = { //everything (content, padding, scrollbar, border)
			width: obj.offsetWidth,
			height: obj.offsetHeight
		};
		
		this.scroll = {
			//width & height of entire content field (including padding), visible or not
			//incorrect in Opera; it doesn't include the padding
			width: obj.scrollWidth,
			//if there are no scrollbars, IE gives the actual height of the content instead of the height of the element
			height: obj.scrollHeight<obj.clientHeight ? obj.clientHeight : obj.scrollHeight,
			//scroll position of content & padding
			left: obj.scrollLeft,
			top: obj.scrollTop
		};
		
		//position of element from the top-left corner of the document
		var tmp = obj;
		this.left = this.top = 0;
		while(tmp.offsetParent) {
			this.left += tmp.offsetLeft;
			this.top += tmp.offsetTop;
			tmp = tmp.offsetParent;
		}
	}
	
	function getEventObj(e) {
		var targ;
		if (!e) var e = window.event;
		if (e.target) targ = e.target;
		else if (e.srcElement) targ = e.srcElement;
		if (targ.nodeType == 3) { targ = targ.parentNode; }
		return targ;
	}
	
	
	
	
	
	function isChildOf(ele, parent) {
		if (ele.parentNode === null) {
			return false;
		} else if (ele.parentNode === parent) {
			return true;
		} else {
			return isChildOf(ele.parentNode, parent);
		}
	}

	
	
	
	/*
	for(i in this.closers) {
		trigger[this.closers[i]] = function(e) {
			this.related = (!e) ? window.event.toElement : e.relatedTarget;
			if(!this.contains(this.related)) {
				if(!iskde) {
					trigger.link.className = trigger.link.className.replace(/[ ]?rollover/g, '');
				}
				if(trigger.menu != null) {
					trigger.menu.style[(trigger.ishoriz ? 'left' : 'top')] = trigger.ishoriz ? '-10000px' : '-100em';
				}
			}
		};
	}
	if(!isie){
		trigger.contains = function(node) {
			if (node == null) {
				return false;
			}
			if (node == this) {
				return true;
			} else {
				return this.contains(node.parentNode);
			}
		};
	}
	*/
	
	
	
	
	
	
	
