document.write('<table id="vista-buttons_com_id5xhjt" width="0" cellpadding="0" cellspacing="0" border="0"><tr><td style="padding-bottom:0px" title ="STP Home"><a href="/index.php" onmouseover=\'xpe("5xhjto");\' onmouseout=\'xpe("5xhjtn");\' onmousedown=\'xpe("5xhjtc");\'><img id="xpi_5xhjt" src="'+vbImgPath+'/bt5xhjt_0.gif" name="vb5xhjt" width="150" height="25" border="0" alt="STP Home" /></a></td></tr><tr><td style="padding-bottom:0px" title ="Member Login"><a href="/members/restricted/login.php" onmouseover=\'xpe("axhjto");\' onmouseout=\'xpe("axhjtn");\' onmousedown=\'xpe("axhjtc");\'><img id="xpi_axhjt" src="'+vbImgPath+'/btaxhjt_0.gif" name="vbaxhjt" width="150" height="25" border="0" alt="Member Login" /></a></td></tr><tr><td style="padding-bottom:0px" title ="Get Involved in STP!"><a href="/administrative/getinvolved.php" onmouseover=\'xpe("sxhjto");\' onmouseout=\'xpe("sxhjtn");\' onmousedown=\'xpe("sxhjtc");\'><img id="xpi_sxhjt" src="'+vbImgPath+'/btsxhjt_0.gif" name="vbsxhjt" width="150" height="25" border="0" alt="Get Involved in STP!" /></a></td></tr><tr><td style="padding-bottom:0px" title ="Administration"><a href="/administrative/index.php" onmouseover=\'xpe("3xhjto");xpshow("3xhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("3xhjtc");\'><img id="xpi_3xhjt" src="'+vbImgPath+'/bt3xhjt_0.gif" name="vb3xhjt" width="150" height="25" border="0" alt="Administration" /></a><div><ul id="vbUL_3xhjt" class="vbUL5xhjt"><li><a href="/administrative/leadership.php" title="Leadership Directory">Leadership&nbsp;Directory</a></li><li><a href="/administrative/ecp.php" title="Early Career Psychologist (ECP)">Early&nbsp;Career&nbsp;Psychologist&nbsp;(ECP)</a></li><li><a href="/diversity/irc.php" title="International Relations">International&nbsp;Relations</a></li><li><a href="/administrative/agreements.php" title="Publication Agreement">Publication&nbsp;Agreement</a></li><li><a href="/administrative/guidelines.php" title="Publication Guidelines">Publication&nbsp;Guidelines</a></li><li><a href="/administrative/documents/STP-Bylaws-2009-08-08.pdf" title="2009 Bylaws">2009&nbsp;Bylaws</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="Awards/Grants"><a href="/members/awards/index.php" onmouseover=\'xpe("rxhjto");xpshow("rxhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("rxhjtc");\'><img id="xpi_rxhjt" src="'+vbImgPath+'/btrxhjt_0.gif" name="vbrxhjt" width="150" height="25" border="0" alt="Awards/Grants" /></a><div><ul id="vbUL_rxhjt" class="vbUL5xhjt"><li><a title="Teaching Awards">Teaching&nbsp;Awards</a><img src="'+vbImgPath+'/ar5xhjt.gif" alt="»" /><ul id="vbUL_vxhjt" class="vbUL5xhjt"><li><a href="/members/awards/eta.php" title="STP Excellence in Teaching Awards">STP&nbsp;Excellence&nbsp;in&nbsp;Teaching&nbsp;Awards</a></li><li><a href="/members/fellows/index.php" title="STP-APS Fellows">STP-APS&nbsp;Fellows</a></li><li><a href="/members/fellows/index.php" title="STP-APA Fellows">STP-APA&nbsp;Fellows</a></li><li><a href="/members/awards/ffe.php" title="Fund for Excellence">Fund&nbsp;for&nbsp;Excellence</a></li><li><a href="/members/citations/index.php" title="STP Presidential Citations">STP&nbsp;Presidential&nbsp;Citations</a></li><li><a href="/members/awards/APA Awards.pdf" title="Teaching Awards from Other APA Divisions">Teaching&nbsp;Awards&nbsp;from&nbsp;Other&nbsp;APA&nbsp;Divisions</a></li></ul></li><li><a title="Travel Awards">Travel&nbsp;Awards</a><img src="'+vbImgPath+'/ar5xhjt.gif" alt="»" /><ul id="vbUL_yxhjt" class="vbUL5xhjt"><li><a href="/members/awards/sage.php" title="Sage Travel Award">Sage&nbsp;Travel&nbsp;Award</a></li><li><a href="/members/grants/smallgrantsFD.php" title="Faculty Development Grants">Faculty&nbsp;Development&nbsp;Grants</a></li></ul></li><li><a title="Special Projects/Research">Special&nbsp;Projects/Research</a><img src="'+vbImgPath+'/ar5xhjt.gif" alt="»" /><ul id="vbUL_xxhjt" class="vbUL5xhjt"><li><a href="/otrp/ira.php" title="Instructional Resource Awards">Instructional&nbsp;Resource&nbsp;Awards</a></li><li><a href="/members/grants/smallgrants.php" title="Small Partnership Grants">Small&nbsp;Partnership&nbsp;Grants</a></li><li><a href="/members/grants/psichi-stp.php" title="Psi Chi/STP Assessment Resource Grants">Psi&nbsp;Chi/STP&nbsp;Assessment&nbsp;Resource&nbsp;Grants</a></li><li><a href="/members/grants/SoTL.php" title="SoTL Grant">SoTL&nbsp;Grant</a></li></ul></li><li><a href="/members/policies.php" title="Policies for STP Grants/Awards">Policies&nbsp;for&nbsp;STP&nbsp;Grants/Awards</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="Conferences"><a href="/conferences/index.php" onmouseover=\'xpe("6xhjto");xpshow("6xhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("6xhjtc");\'><img id="xpi_6xhjt" src="'+vbImgPath+'/bt6xhjt_0.gif" name="vb6xhjt" width="150" height="25" border="0" alt="Conferences" /></a><div><ul id="vbUL_6xhjt" class="vbUL5xhjt"><li><a href="/conferences/bp/index.php" title="Best Practices">Best&nbsp;Practices</a></li><li><a href="/conferences/bp/books.php" title="Best Practices Books">Best&nbsp;Practices&nbsp;Books</a></li><li><a href="/conferences/writing/index.php" title="Writing Workshop">Writing&nbsp;Workshop</a></li><li><a href="/conferences/upace/index.php" title="U-Pace Training Workshop">U-Pace&nbsp;Training&nbsp;Workshop</a></li><li><a href="/conferences/eworkshop/index.php" title="Online e-workshop">Online&nbsp;e-workshop</a></li><li><a href="/conferences/apa/index.php" title="APA Program">APA&nbsp;Program</a></li><li><a href="/conferences/gsh/index.php" title="Hall/Wolfe Lectures">Hall/Wolfe&nbsp;Lectures</a></li><li><a href="http://www.psychologicalscience.org/convention/index.cfm" title="APS Program">APS&nbsp;Program</a></li><li><a href="/conferences/mpa/index.php" title="MPA Program">MPA&nbsp;Program</a></li><li><a href="/conferences/conferences.php" title="Psychology Conferences">Psychology&nbsp;Conferences</a></li><li><a href="/members/grants/masterteacher.php" title="Master Teacher Speaker Program">Master&nbsp;Teacher&nbsp;Speaker&nbsp;Program</a></li><li><a href="/conferences/speakers.php" title="Speakers Network">Speakers&nbsp;Network</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="News"><a href="/news/index.php" onmouseover=\'xpe("2xhjto");xpshow("2xhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("2xhjtc");\'><img id="xpi_2xhjt" src="'+vbImgPath+'/bt2xhjt_0.gif" name="vb2xhjt" width="150" height="25" border="0" alt="News" /></a><div><ul id="vbUL_2xhjt" class="vbUL5xhjt"><li><a href="/news/news.php" title="Recent News">Recent&nbsp;News</a></li><li><a href="http://teachpsych.blogspot.com" title="STP Blog" target="_blank">STP&nbsp;Blog</a></li><li><a href="/news/topcontents.php" title="Recent ToP Articles">Recent&nbsp;ToP&nbsp;Articles</a></li><li><a href="/news/topnews/index.php" title="TOPNews Online">TOPNews&nbsp;Online</a></li><li><a href="/news/psychteacher.php" title="PsychTeacher Listserv">PsychTeacher&nbsp;Listserv</a></li><li><a href="/news/diversityteach.php" title="Diversity-Teach Listserv">Diversity-Teach&nbsp;Listserv</a></li><li><a href="/news/rss.php" title="Subscribe to Site Updates">Subscribe&nbsp;to&nbsp;Site&nbsp;Updates</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="Membership"><a href="/members/index.php" onmouseover=\'xpe("txhjto");xpshow("txhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("txhjtc");\'><img id="xpi_txhjt" src="'+vbImgPath+'/bttxhjt_0.gif" name="vbtxhjt" width="150" height="25" border="0" alt="Membership" /></a><div><ul id="vbUL_txhjt" class="vbUL5xhjt"><li><a href="/members/registration/index.php" title="Join or Renew Membership">Join&nbsp;or&nbsp;Renew&nbsp;Membership</a></li><li><a href="/members/whyjoin.php" title="Member Benefits">Member&nbsp;Benefits</a></li><li><a href="/members/maps/map_static.php" title="Member Map">Member&nbsp;Map</a></li><li><a href="/gsta/index.php" title="Graduate Student Assoc">Graduate&nbsp;Student&nbsp;Assoc</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="OTRP Home"><a href="/otrp/index.php" onmouseover=\'xpe("pxhjto");xpshow("pxhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("pxhjtc");\'><img id="xpi_pxhjt" src="'+vbImgPath+'/btpxhjt_0.gif" name="vbpxhjt" width="150" height="25" border="0" alt="OTRP Home" /></a><div><ul id="vbUL_pxhjt" class="vbUL5xhjt"><li><a href="/otrp/syllabi/index.php" title="Project Syllabus">Project&nbsp;Syllabus</a></li><li><a href="/otrp/resources/index.php" title="Teaching Resources">Teaching&nbsp;Resources</a></li><li><a href="http://topix.teachpsych.org/" title="ToP Idea Exchange (ToPIX)" target="_blank">ToP&nbsp;Idea&nbsp;Exchange&nbsp;(ToPIX)</a></li><li><a href="/otrp/otrp_search.php" title="Search OTRP">Search&nbsp;OTRP</a></li><li><a href="/otrp/deptconsult.php" title="Departmental Consulting">Departmental&nbsp;Consulting</a></li><li><a href="/otrp/mentoring/index.php" title="Mentoring Service">Mentoring&nbsp;Service</a></li><li><a href="/administrative/agreements.php" title="Publication Agreement">Publication&nbsp;Agreement</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="ToP Journal"><a href="/top/index.php" onmouseover=\'xpe("oxhjto");xpshow("oxhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("oxhjtc");\'><img id="xpi_oxhjt" src="'+vbImgPath+'/btoxhjt_0.gif" name="vboxhjt" width="150" height="25" border="0" alt="ToP Journal" /></a><div><ul id="vbUL_oxhjt" class="vbUL5xhjt"><li><a href="/top/index.php" title="ToP Home">ToP&nbsp;Home</a></li><li><a href="/top/editors.php" title="Editorial Board">Editorial&nbsp;Board</a></li><li><a href="/top/authors.php" title="For Authors">For&nbsp;Authors</a></li><li><a href="/news/topcontents.php" title="Recent ToP Articles">Recent&nbsp;ToP&nbsp;Articles</a></li><li><a href="/top/subscriptions.php" title="Subscriptions">Subscriptions</a></li><li><a href="/otrp/top/index.php" title="ToP Index">ToP&nbsp;Index</a></li><li><a href="http://www.informaworld.com/smpp/title~content=t775653707~tab=subscribe" title="Publisher\'s web site" target="_blank">Publisher\'s&nbsp;web&nbsp;site</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="Diversity Resources"><a href="/diversity/index.php" onmouseover=\'xpe("wxhjto");xpshow("wxhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("wxhjtc");\'><img id="xpi_wxhjt" src="'+vbImgPath+'/btwxhjt_0.gif" name="vbwxhjt" width="150" height="25" border="0" alt="Diversity Resources" /></a><div><ul id="vbUL_wxhjt" class="vbUL5xhjt"><li><a href="/diversity/index.php" title="Diversity Committee">Diversity&nbsp;Committee</a></li><li><a href="/diversity/irc.php" title="International Relations Committee">International&nbsp;Relations&nbsp;Committee</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="E-Books"><a href="/ebooks/index.php" onmouseover=\'xpe("4xhjto");\' onmouseout=\'xpe("4xhjtn");\' onmousedown=\'xpe("4xhjtc");\'><img id="xpi_4xhjt" src="'+vbImgPath+'/bt4xhjt_0.gif" name="vb4xhjt" width="150" height="25" border="0" alt="E-Books" /></a></td></tr><tr><td style="padding-bottom:0px" title ="Other Resources"><a onmouseover=\'xpe("zxhjto");xpshow("zxhjt",1,this);xpsmover(this);\' onmouseout=\'xpsmout(this);\' onmousedown=\'xpe("zxhjtc");\'><img id="xpi_zxhjt" src="'+vbImgPath+'/btzxhjt_0.gif" name="vbzxhjt" width="150" height="25" border="0" alt="Other Resources" /></a><div><ul id="vbUL_zxhjt" class="vbUL5xhjt"><li><a href="/members/deptconsult.php" title="Program Reviews">Program&nbsp;Reviews</a></li><li><a href="http://www.facebook.com/group.php?gid=33366519348" title="STP Facebook Group" target="_blank">STP&nbsp;Facebook&nbsp;Group</a></li><li><a href="/links/index.php" title="TeachPsych Links">TeachPsych&nbsp;Links</a></li></ul></div></td></tr><tr><td style="padding-bottom:0px" title ="FAQs"><a href="/faqs/index.php" onmouseover=\'xpe("uxhjto");\' onmouseout=\'xpe("uxhjtn");\' onmousedown=\'xpe("uxhjtc");\'><img id="xpi_uxhjt" src="'+vbImgPath+'/btuxhjt_0.gif" name="vbuxhjt" width="150" height="25" border="0" alt="FAQs" /></a></td></tr></table>');
vb5xhjtn=xppr('5xhjt_0.gif');vb5xhjto=xppr('5xhjt_1.gif');vb5xhjtc=xppr('5xhjt_2.gif');vbaxhjtn=xppr('axhjt_0.gif');vbaxhjto=xppr('axhjt_1.gif');vbaxhjtc=xppr('axhjt_2.gif');vbsxhjtn=xppr('sxhjt_0.gif');vbsxhjto=xppr('sxhjt_1.gif');vbsxhjtc=xppr('sxhjt_2.gif');vb3xhjtn=xppr('3xhjt_0.gif');vb3xhjto=xppr('3xhjt_1.gif');vb3xhjtc=xppr('3xhjt_2.gif');vbrxhjtn=xppr('rxhjt_0.gif');vbrxhjto=xppr('rxhjt_1.gif');vbrxhjtc=xppr('rxhjt_2.gif');vb6xhjtn=xppr('6xhjt_0.gif');vb6xhjto=xppr('6xhjt_1.gif');vb6xhjtc=xppr('6xhjt_2.gif');vb2xhjtn=xppr('2xhjt_0.gif');vb2xhjto=xppr('2xhjt_1.gif');vb2xhjtc=xppr('2xhjt_2.gif');vbtxhjtn=xppr('txhjt_0.gif');vbtxhjto=xppr('txhjt_1.gif');vbtxhjtc=xppr('txhjt_2.gif');vbpxhjtn=xppr('pxhjt_0.gif');vbpxhjto=xppr('pxhjt_1.gif');vbpxhjtc=xppr('pxhjt_2.gif');vboxhjtn=xppr('oxhjt_0.gif');vboxhjto=xppr('oxhjt_1.gif');vboxhjtc=xppr('oxhjt_2.gif');vbwxhjtn=xppr('wxhjt_0.gif');vbwxhjto=xppr('wxhjt_1.gif');vbwxhjtc=xppr('wxhjt_2.gif');vb4xhjtn=xppr('4xhjt_0.gif');vb4xhjto=xppr('4xhjt_1.gif');vb4xhjtc=xppr('4xhjt_2.gif');vbzxhjtn=xppr('zxhjt_0.gif');vbzxhjto=xppr('zxhjt_1.gif');vbzxhjtc=xppr('zxhjt_2.gif');vbuxhjtn=xppr('uxhjt_0.gif');vbuxhjto=xppr('uxhjt_1.gif');vbuxhjtc=xppr('uxhjt_2.gif');/*
 *==============================================================================
 *
 *     Copyright (c) 2007-2009, by Vista-buttons.com
 *     Version 2.1.2i
 *     http://vista-buttons.com
 *
 *==============================================================================
 * 
 * todo:
 * - item move into anchor
 * - item over using css
 * - item base on li structure
 *
 * variables:
 *   @btIdPref
 *   @pItem
 *   @ulIdPref
 *   @frameSubmenu
 *
 */
 
 
var btIdPref='vb';

function xppr(im) {
	var i=new Image();
	i.src=vbImgPath+'bt'+im;
	return i;
};

function xpe(id) {
	x=id.substring(0,id.length-1);
	if(document[btIdPref+x])document[btIdPref+x].src=eval(btIdPref+id+'.src');
};


/*
*	Vista buttons engine functions
*/ 
function vistaButtons(params){
	// init global vars
	var xobtn = null; // curent element text identifier curent
	var menuContId = 'xpMenuCont';
	var ulIdPref='vbUL_';
	
	
	//Detect browser
	var isDOM=document.getElementById; //DOM1 browser (MSIE 5+, Netscape 6, Opera 5+)
	var isOp=isO5=window.opera && isDOM; //Opera 5+
	var isOp7=isOp && document.readyState; //Opera 7+
	var isIE=document.all && document.all.item && !isOp; //Microsoft Internet Explorer 4+
	var isMz=isDOM && navigator.appName=="Netscape"; //Mozilla or Netscape 6.*


	
	/*
	 *  vistabuttons engine and global object
	 */
	
	/* create new menu and insert it to page */
	document.write('<div id="' + menuContId + '" ></div>');
	var menuCont = document.getElementById(menuContId);
		
	var ULs = document.getElementsByTagName('UL');
	for (var i=0, cnt=ULs.length; i<cnt; i++)
		if (ULs[i].id
		&& (ULs[i].id.substring(0, ulIdPref.length)==ulIdPref) // if is xp UL
		&& !(
			(ULs[i].parentNode)
			&& (ULs[i].parentNode.parentNode)
			&& (ULs[i].parentNode.parentNode.id.substring(0, ulIdPref.length)==ulIdPref)
			)
		)
		{
			// hide vista-buttons link
			var A=document.getElementById(ULs[i].id+'a');
			if (A) A.style.display='none';
		
			createMenu(ULs[i], 0, 0, params, menuCont);
			ULs[i].style.display = 'none';
		};
		
	

	/*
	 * create menu
	 * structure:	<div - menu >
	 *			<table>
	 *				<tr - item>
	 *					<td - for icon><img></td>
	 *					<td - for label><a></a></td>
	 *					<td - for arrow><img></td>
	 *				</tr>
		 *				...
	 *			</table>
	 *		</div>
	 * @ulParent - main parent of menu UL
	 * @iParent - parent item
	 * @level - level
	 */
	function createMenu(ulParent, iParent, level, params, owner){
	
		// create menu obj
		var oMenu = document.createElement((params.subFrame?'table':'div'));
		owner.appendChild(oMenu);
		if (oMenu.tagName == 'TABLE') oMenu.cellSpacing = 0; // set even if don't need in concert
		
		
		// assign menu content and crate a frame if need
		var oMenuCont;
		if (params.subFrame)
			for (var i=0; i<3; i++){
				var row = oMenu.insertRow(-1);
				for (var j=0; j<3; j++){
					var cell = row.insertCell(-1);
					if (i==1 && j==1) oMenuCont = cell
					else cell.className = 'imgFrame'+i+j;
				}
			}
		else
			oMenuCont = (oMenu.tagName == 'DIV')? oMenu: oMenu.insertRow(-1).insertCell(-1);
		
		oMenuCont.className = 'subContent';
		
		
		var oTable = document.createElement('table');
		oMenuCont.appendChild(oTable);

		oMenu.id = ulParent.id + 'tbl';
		oMenu.className = ulParent.className; // inherite style from menu definition with ul
		//oTable.style.visibility = 'hidden';
		oMenu.style.position = 'absolute'; // set here without fail
		oMenu.xpItems = [];		/* submenu items list */
		oMenu.iParent = iParent;
		oMenu.level = level;
		
		oMenu.style.zIndex = 9 + oMenu.level;
		oTable.cellSpacing = 0;

		// set menu events and metods
		oMenu.onmouseover = function (){
			xpStopTimeOut(this);
		};
		oMenu.onmouseout = function (){
			xpStartTimeOut(xpShownMenu)
		};
		oMenu.xpClearMenuMark = function(){
			for (var j = 0; j < this.xpItems.length; j++){
				var p = this.xpItems[j];
				if (p.tagName == 'TR') {
					p.className = p.className.replace('over','');
					if (p.className.indexOf('popup')<0)	p.clrOverImg();
				}
			};
		};
		
		oMenu.smShown = 0;
		
		/* create items  - organizing circle for LI */
		for (var i=0, cntLI=ulParent.childNodes.length; i<cntLI; i++){
			var oLI = ulParent.childNodes[i];
			if (oLI.tagName != 'LI') continue;
			
			
			/* 
			*	create menu item
			*/
			
			// create item base
			var oItem = oTable.insertRow(-1);
			
					
			// parse LI content 
			// <img src="icon">     <a> Item Label </a>     <img src="arrow">     <ul></ul>
			var InnerAnchor = 0;
			oItem.Img = null;
			oItem.ImgOver = null;
			var InnerUl = 0;
			oItem.ImgArrow = null;
			oItem.ImgArrowOver = null;

			// parse LI content
			for (var j=0; j < oLI.childNodes.length; j++)
				if (oLI.childNodes[j].tagName == 'A') InnerAnchor = oLI.childNodes[j];
				else if (oLI.childNodes[j].tagName == 'IMG'){
					if (!InnerAnchor){
						if (!oItem.Img) oItem.Img = oLI.childNodes[j];
						else oItem.ImgOver = oLI.childNodes[j]
					}
					else {
						if(!oItem.ImgArrow) oItem.ImgArrow = oLI.childNodes[j];
						else oItem.ImgArrowOver = oLI.childNodes[j]
					}
				}
				else if (oLI.childNodes[j].tagName == 'UL') InnerUl = oLI.childNodes[j];
				else if (oLI.childNodes[j].tagName == 'DIV'){
					for (var k=0; k<oLI.childNodes[j].childNodes.length; k++)
						if (oLI.childNodes[j].childNodes[k].tagName=='UL') InnerUl = oLI.childNodes[j].childNodes[k];
				}


			if (InnerAnchor || InnerUl || oItem.ImgArrow){ // it is not a separator

				var oItemCont = oItem;
				oItem.className = oLI.className;
				oItem.menu = oMenu;		
				oItem.setPopup = function(){
					this.className +=  ' popup';
				};
				oItem.clrPopup = function(){
					this.className = this.className.replace('popup','');
					if (this.className.indexOf('over')<0) this.clrOverImg();
				};
				oItem.clrOverImg = function(){
					if (this.Img) this.Img.style.display = 'inline';
					if (this.ImgOver) this.ImgOver.style.display = 'none';
					if (this.ImgArrow) this.ImgArrow.style.display = 'inline';
					if (this.ImgArrowOver) this.ImgArrowOver.style.display = 'none'
				};
			
				// create item content
				var oTDIMG = oItemCont.insertCell(-1);
				var oTDLabel = oItemCont.insertCell(-1);
				var oTDArrow = oItemCont.insertCell(-1);
				
				oTDIMG.style.borderRightWidth = '0px';
				oTDLabel.style.borderRightWidth = '0px';
				oTDLabel.style.borderLeftWidth = '0px';
				oTDArrow.style.borderLeftWidth = '0px';
				oTDIMG.style.paddingRight = '4px';
				oTDLabel.style.paddingRight = '4px';
				oTDLabel.style.paddingLeft = '4px';
				oTDArrow.style.paddingLeft = '4px';

				if (oItem.Img) oTDIMG.appendChild(oItem.Img);
				else oTDIMG.innerHTML = '&nbsp;';
				if (oItem.ImgOver) {
					oItem.ImgOver.style.display = 'none';
					oTDIMG.appendChild(oItem.ImgOver);
				};

				// create anchor with link execution
				if (InnerAnchor){
					var newText = document.createElement('SPAN');
					newText.innerHTML = InnerAnchor.innerHTML;

					if (InnerAnchor.href.indexOf('.pdf')>=0 && document.all)
						oTDLabel.appendChild(newText)
					else{
						oTDLabel.appendChild(InnerAnchor);
						
						// off standart click 
						InnerAnchor.onclick = function(){
							return false;
						};
					};
					
					oItem.linkHref = InnerAnchor.href;
					oItem.linkTarget = InnerAnchor.target;
					
					/* add item to menu info */
					with(oMenu) xpItems[xpItems.length] = oItem;
					
					// define my click handle event
					oItem.onclick = function(){
						if (this.linkHref)
							open(this.linkHref, (this.linkTarget? this.linkTarget :"_self"));
					}
				}
				else oTDLabel.innerHTML = '&nbsp;';

				// set item events
				oItem.onmouseover = function (){
					// clear other mark
					this.menu.xpClearMenuMark();
					this.className += ' over';// mark this item
					if (this.ImgOver){
						this.Img.style.display = 'none';
						this.ImgOver.style.display = 'inline';
					};
					if (this.ImgArrowOver){
						this.ImgArrow.style.display = 'none';
						this.ImgArrowOver.style.display = 'inline';
					};

					if (this.smPopup) xpshowmenu(this.smPopup, 1, this); // show new menu
					else xpStartTimeOut(this.menu.smShown); // hide bug
				};
				oItem.onmouseout = function (){
					this.menu.xpClearMenuMark();
				};

				// define submenu
				if (InnerUl){
					// set event for over
					oTDArrow.className = 'arrow';
					if (oItem.ImgArrow){ 
						oTDArrow.appendChild(oItem.ImgArrow);
						if (oItem.ImgArrowOver){
							oItem.ImgArrowOver.style.display = 'none';
							oTDArrow.appendChild(oItem.ImgArrowOver)
						}
					}
					else {
						if (typeof(arrowChar)!='undefined' && arrowChar){
							oTDArrow.appendChild(document.createElement('a'));
							oTDArrow.lastChild.innerHTML = arrowChar;
						}
						else oTDArrow.innerHTML = '&nbsp;';
					};

					oItem.smPopup = createMenu(InnerUl, oItem, level + 1, params, owner);
				}
				else oTDArrow.innerHTML = '&nbsp;';
			}
			else{ // add a separator
				oItem.className = 'separator';
				var oTD = oItem.insertCell(-1);
				oTD.colSpan = 3;
				
				oTD.innerHTML = '<div></div>';
			}

		}

		return oMenu;
	};



	function xpDef(){
	  for(var i=0; i<arguments.length; ++i){if(typeof(arguments[i])=='undefined') return false;}
	  return true;
	};


	function xpClientSize(){
	
		var x=0,y=0,w=0,h=0,doc=document,win=window;

		var cond = (!doc.compatMode || doc.compatMode == 'CSS1Compat') /*&& !win.opera */&& doc.documentElement;
		// height
		if(cond && doc.documentElement.clientHeight) h=doc.documentElement.clientHeight;
		else if(doc.body && doc.body.clientHeight) h=doc.body.clientHeight;
		else if(xpDef(win.innerWidth,win.innerHeight,doc.width)) {
			h=win.innerHeight;
			if(doc.width>win.innerWidth) h-=16;
		};
		//width
		if(cond && doc.documentElement.clientWidth) w=doc.documentElement.clientWidth;
		else if(doc.body && doc.body.clientWidth) w=doc.body.clientWidth;
		else if(xDef(win.innerWidth,win.innerHeight,doc.height)) {
			w=win.innerWidth;
			if(doc.height>win.innerHeight) w-=16;
		}

		if(doc.documentElement && doc.documentElement.scrollLeft) x=doc.documentElement.scrollLeft;
		else if(doc.body && xpDef(doc.body.scrollLeft)) x=doc.body.scrollLeft;

		if(doc.documentElement && doc.documentElement.scrollTop) y=doc.documentElement.scrollTop;
		else if(doc.body && xpDef(doc.body.scrollTop)) y=doc.body.scrollTop;
		
		return {x:x,y:y,w:w,h:h};
	};



	function xpObjectSize(o){
		var w = (isOp&&!isOp7) ? o.style.pixelWidth  : document.layers ? o.clip.width /* Netscape 4.*/ : o.offsetWidth;
		var h = (isOp&&!isOp7) ? o.style.pixelHeight : document.layers ? o.clip.height/* Netscape 4.*/ : o.offsetHeight;
		return {x:w, y:h};
	};



	/*
	 * calc absolute coordinates of specified object
	 */
	function xppos(obj){
		var l=0, t=0;
		while (obj) //  && obj.tagName!='BODY'
		{
			l += obj.offsetLeft;
			t += obj.offsetTop;
		
			// some browser not right set offsetParent
			//		if (obj.style && obj.style.position=='absolute') break;// this is a fix but not constant
			
			obj = obj.offsetParent;
		};	

		// fix special for opera
		if (document.body) with (document){
			if (body.leftMargin) l -= body.leftMargin;
			if (body.topMargin) t -= body.topMargin
		}

		return {x: l, y: t};
	};



	/* show menu item
	 * ind - part of object identifier
	 * @isVertical - previous menu is vertical
	 * @iParent - object created events identifier - this is about a anchor or previous menu item
	 */
	var xpshow = window.xpshow = function(ind, isVertical, iParent){
		xpshowmenu(ulIdPref+ind+'tbl', isVertical, iParent);
	}

	function xpshowmenu(menu, isVertical, iParent)
	{
		menu = get(menu);
		if (!menu) return;
		
		// already showing?
		if (menu.style.visibility == 'visible'){
			xpStopTimeOut(menu);
			return;
		};
		
		// hide previous menu in this level
		if (iParent && iParent.menu)
			xphide(iParent.menu.smShown);
		if (!menu.level && (xpShownMenu != menu))
			xphide(xpShownMenu);

		// it saves button main menu
		if (!menu.level) xobtn = menu.id.replace(ulIdPref,'').replace('tbl','');

		// Parent - parent menu item
		var parentObj =  (iParent.tagName == 'A')? iParent.parentNode: iParent;

		var pos = xppos(parentObj); // parent coordinate
		if (iParent && iParent.menu){
			pos.x -= iParent.menu['scrollLeft'] || 0;
			pos.y -= iParent.menu['scrollTop'] || 0;
		};
		var size = xpObjectSize(parentObj);

		menu.xpMenuX = 1; // menu open direction
		menu.xpMenuDx = 1; // menu open  offset
		if (menu.level > 0){
			// inherit direction from previous level
			menu.xpMenuX = menu.iParent.menu.xpMenuX;
			menu.xpMenuDx = menu.iParent.menu.xpMenuDx;
		};
		
		// initialize property
		menu.style.overflow = 'visible';
		menu.style.height = 'auto';
		menu.style.width = 'auto';

		// fix bug position for some document structure
		menu.style.left = '0px';
		menu.style.top = '0px';
		var parentAbs = xppos(menu);

		// detect window size
		var WinSize = xpClientSize();
		var menuSize = xpObjectSize(menu);

		// calc and init Y coordinate
		var CalcedPos = xpCalcMenuPos(WinSize.y, WinSize.h, pos.y, size.y, menuSize.y, menu.xpMenuDx, isVertical);

		menu.xpMenuDx = CalcedPos.align;

		// fix scrollbar bug for opera
		if (isOp && !menu.OrigWidth) menu.OrigWidth = menu.clientWidth;//menu.clientWidth;


		// size was changed - resize height, open scroll, correct width for scrollbar
		if (CalcedPos.size < menuSize.y){
			//xpsm.style.overflowY = 'auto';
			menu.style.overflow = 'auto';
			//menu.style.overflow = 'visible';
			if (isIE) menu.style.overflowX = 'visible';
			if (isIE) menu.style.width = menu.offsetWidth + 17 + 'px';
			else if (isMz) menu.style.magrinRight = 20;

			menu.style.height = CalcedPos.size + 'px';
			menu.scrollTop  = 0;
			menu.scrollLeft = 0;

			// fix scrollbar bug for opera
			if (isOp) menu.style.width = menu.OrigWidth + 'px';
		};

		menu.style.top = CalcedPos.xy - parentAbs.y + 'px';

		// calc and init X coorinate
		menuSize = xpObjectSize(menu);
		CalcedPos = xpCalcMenuPos(WinSize.x, WinSize.w, pos.x, size.x, menuSize.x, menu.xpMenuX, !isVertical);
		menu.xpMenuX = CalcedPos.align;
		if (CalcedPos.size < menuSize.x)// size was changed
			if (menu.xpMenuX > 0)
				CalcedPos.xy -= (menuSize.x - CalcedPos.size); // covered
		menu.style.left = CalcedPos.xy - parentAbs.x + 'px';

		menu.style.visibility = 'visible';

		if (!menu.level) xpShownMenu = menu
		else {
			iParent.menu.smShown = menu;
			iParent.setPopup();
		}
		
	};

	
	

	/*
	 calc menu pos for one coordinate 
	 use size of menu, parent object and screen, menu direction and parent menu orientation
	 screenSize - size of screen
	 parentXY, parentSize - position and size of parent menu
	 size - size of selected menu
	 align = +1(right, bottom), 0(center), -1(left, top)  - direction of menu
	 oHoriz  = 0(vertical), 1(horizontal) - orientation of parent menu
	*/
	function xpCalcMenuPos(screenXY, screenSize, parentXY, parentSize, size, align, oHoriz){
		var xy = parentXY;
		var newSize = size;
		var newAlign = align;
		var space = 5; // space to document borders
		
		if ((align == 0) && (!oHoriz)) align = 1; //center may be only for horizontal orientation
		
		if (!oHoriz) {// VERTICAL
			// |------<--------->)<---parent--->(<---------->---------|
			// check the place for the future menu and correct orientation
			if	(((newAlign >= 0) && (parentXY + parentSize + size > screenSize + screenXY - space)) // don't go in screen from the algin
								|| ((newAlign < 0) && (parentXY - size < space))){
				// correct direction about most of place
				if (parentXY - screenXY > screenSize + screenXY - (parentXY + parentSize)) newAlign = -1; else newAlign = 1;
			};
			// set coordinate and size
			if (newAlign >= 0){
				xy = parentXY + parentSize;
				if (screenSize + screenXY - space - xy < newSize) newSize = screenSize + screenXY  - space - xy;
			}
			else {
				xy = parentXY - newSize;
				if (xy - screenXY < space){
					xy = space + screenXY;
					newSize = parentXY - space - screenXY;
				}
			}
		}
		else {
			// --------------- <---parent---> -------------------
			//                      (<------------------------>--------|
			//   |-----<--------------------->)
			// if menu not go in screen
			if (newSize > screenSize - 2*space) {
				xy = space + screenXY;
				newSize = screenSize - 2*space;
			}
			else{
				// calc
				xy = parentXY + parentSize/2 - newSize/2 + newAlign * (newSize/2 - parentSize/2);

				// correct
				if (xy < space + screenXY){
					newAlign = 1;
					xy = space + screenXY;
				}
				if (xy + size > screenSize  + screenXY - space){
					newAlign = -1;
					xy -= xy + newSize - (screenSize  + screenXY - space);
				}
			}
		};

		return {xy: xy, size: newSize, align: newAlign};
	};
	
	
	function get(o){
		return (typeof o == 'string')? document.getElementById(o): o
	}
	

	/*
	 * hide submenu
	 * @menu
	 */
	function xphide(menu){
		menu = get(menu);
		if (!menu || menu.style.visibility != 'visible') return;

		// hide child
		xphide(menu.smShown);
		
		// off cursor selection
		menu.xpClearMenuMark();

		// hide the menu
		menu.style.visibility = 'hidden';

		// if all submenu close, then change button icon
		if (menu.level == 0){
			xpe(xobtn + 'n');//???????????
		}

		menu.smShown = 0;
		if (menu.iParent) menu.iParent.clrPopup();

		// clear to hide timeout
		if (menu.hideTimer){
			clearTimeout(menu.hideTimer);
			menu.hideTimer = null;
		}
	};
	window.xphide = xphide;
	
	

	// on mouse out from menu
	window.xpsmout = function(sender){
		if (!sender) return;
		// set time out
		xpStartTimeOut(xpShownMenu)
	};
	

	// on mouse over menu
	window.xpsmover = function(menu)
	{
		xpStopTimeOut(menu);
	};


	/*
	*	clear Time out for all parent and this menu 
	*	run in submenu engine context
	*/
	function xpStopTimeOut(menu){
		for( var o = menu; o; o = o.iParent? o.iParent.menu: 0)
			if (o.hideTimer)
				o.hideTimer = clearTimeout(o.hideTimer);
	};

	
	/*
	 * 	 start hide timer for this menu and all its submenu 
	 */
	function xpStartTimeOut(menu){
		if (menu) {
			if (!menu.hideTimer) 
				menu.hideTimer = setTimeout( function (){ xphide(menu) } , 300);
			xpStartTimeOut(menu.smShown)
		}
	}


};// end of menu component

var xpShownMenu = 0; // curent open menu tread

new vistaButtons({
	subFrame: 0
});



