





//(C) Copyright IBM Corp. 2002, 2003, 2004. All Rights Reserved
//
BrowserDimensions.prototype=new Object();BrowserDimensions.prototype.constructor=BrowserDimensions;BrowserDimensions.superclass=null;function BrowserDimensions(){
this.body=document.body;if (this.isStrictDoctype() && !this.isSafari()) {
this.body=document.documentElement;}};BrowserDimensions.prototype.getScrollFromLeft=function(){
return this.body.scrollLeft ;};BrowserDimensions.prototype.getScrollFromTop=function(){
return this.body.scrollTop ;};BrowserDimensions.prototype.getViewableAreaWidth=function(){
return this.body.clientWidth ;};BrowserDimensions.prototype.getViewableAreaHeight=function(){
return this.body.clientHeight ;};BrowserDimensions.prototype.getHTMLElementWidth=function(){
return this.body.scrollWidth ;};BrowserDimensions.prototype.getHTMLElementHeight=function(){
return this.body.scrollHeight ;};BrowserDimensions.prototype.isStrictDoctype=function(){
return (document.compatMode && document.compatMode != "BackCompat");};BrowserDimensions.prototype.isSafari=function(){
return (navigator.userAgent.toLowerCase().indexOf("safari") >= 0);};
//(C) Copyright IBM Corp. 2002, 2003, 2004. All Rights Reserved
//
function ElementJavascriptEventController()
{
this.elements=new Array();this.arrayPosition=0;this.enableAll=enableRegisteredElementsInternal;this.disableAll=disableRegisteredElementsInternal;this.register=registerElementInternal;this.enable=enableRegisteredElementInternal;this.disable=disableRegisteredElementInternal;function enableRegisteredElementsInternal()
{
for (c=0; c < this.arrayPosition; c=c+1)
{
this.elements[c].enable();};};function enableRegisteredElementInternal(id)
{
for (c=0; c < this.arrayPosition; c=c+1)
{
if (this.elements[c].ID == id)
{
this.elements[c].enable();}};};function disableRegisteredElementsInternal()
{
for (c=0; c < this.arrayPosition; c=c+1)
{
this.elements[c].disable();};};function disableRegisteredElementInternal(id)
{
for (c=0; c < this.arrayPosition; c=c+1)
{
if (this.elements[c].ID == id)
{
this.elements[c].disable();}};};function registerElementInternal(HTMLElementID, doNotDisable, optionalOnEnableJavascriptAction)
{
this.elements[this.arrayPosition]=new RegisteredElement(HTMLElementID, doNotDisable, optionalOnEnableJavascriptAction);this.arrayPosition=this.arrayPosition + 1;};};function RegisteredElement(ElementID, doNotDisable, optionalOnEnableJavascriptAction)
{
this.ID=ElementID;this.oldCursor="normal";this.ItemOnMouseDown=null;this.ItemOnMouseUp=null;this.ItemOnMouseOver=null;this.ItemOnMouseOut=null;this.ItemOnMouseClick=null;this.ItemOnBlur=null;this.ItemOnFocus=null;this.ItemOnChange=null;this.onEnableJS=optionalOnEnableJavascriptAction;this.enable=enableInternal;this.disable=disableInternal;function enableInternal()
{
document.getElementById(this.ID).style.cursor=this.oldCursor;if (document.getElementById(this.ID).tagName == "BUTTON")
{
document.getElementById(this.ID).disabled=false;}else
{
document.getElementById(this.ID).onmousedown=this.ItemOnMouseDown;document.getElementById(this.ID).onmouseup=this.ItemOnMouseUp;document.getElementById(this.ID).onmouseover=this.ItemOnMouseOver;document.getElementById(this.ID).onmouseout=this.ItemOnMouseOut;document.getElementById(this.ID).onclick=this.ItemOnMouseClick;document.getElementById(this.ID).onblur=this.ItemOnBlur;document.getElementById(this.ID).onfocus=this.ItemOnFocus;document.getElementById(this.ID).onchange=this.ItemOnChange;};if (this.onEnableJS != null)
{
eval(this.onEnableJS);}};function disableInternal()
{
this.oldCursor=document.getElementById(this.ID).style.cursor;document.getElementById(this.ID).style.cursor="not-allowed";if (document.getElementById(this.ID).tagName == "BUTTON")
{
document.getElementById(this.ID).disabled=true;}else
{
this.ItemOnMouseDown=document.getElementById(this.ID).onmousedown;this.ItemOnMouseUp=document.getElementById(this.ID).onmouseup;this.ItemOnMouseOver=document.getElementById(this.ID).onmouseover;this.ItemOnMouseOut=document.getElementById(this.ID).onmouseout;this.ItemOnMouseClick=document.getElementById(this.ID).onclick;this.ItemOnBlur=document.getElementById(this.ID).onblur;this.ItemOnFocus=document.getElementById(this.ID).onfocus;this.ItemOnChange=document.getElementById(this.ID).onchange;document.getElementById(this.ID).onmousedown=function () { void(0); return false; };document.getElementById(this.ID).onmouseup=function () { void(0); return false; };document.getElementById(this.ID).onmouseover=function () { void(0); return false; };document.getElementById(this.ID).onmouseout=function () { void(0); return false; };document.getElementById(this.ID).onclick=function () { void(0); return false; };document.getElementById(this.ID).onblur=function () { void(0); return false; };document.getElementById(this.ID).onfocus=function () { void(0); return false; };document.getElementById(this.ID).onchange=function () { void(0); return false; };};};if (!doNotDisable)
{
this.disable();}};
//(C) Copyright IBM Corp. 2002, 2003, 2004. All Rights Reserved
//
var wpsFLY_isIE=document.all?1:0;var wpsFLY_isNetscape=document.layers?1:0;var wpsFLY_isMoz=document.getElementById && !document.all;var wpsFLY_minFlyout=0;var wpsFLY_move=15;if (wpsFLY_isIE)
wpsFLY_move=12;var wpsFLY_scrollSpeed=1;var wpsFLY_timeoutID=1;var wpsFLY_fromTop=100;var wpsFLY_leftResize;var wpsFLY_browserDimensions=new BrowserDimensions();var wpsFLY_initFlyoutExpanded=wpsFLY_getInitialFlyoutState();var wpsFLY_state=true;var wpsFLY_currIndex=-1;function wpsFLY_initFlyout(showHidden)
{
wpsFLY_Flyout=new wpsFLY_makeFlyout('wpsFLYflyout');wpsFLY_Flyout.setWidth(wpsFLY_minFlyout);wpsFLY_Flyout.css.overflow='hidden';wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() - wpsFLY_minFlyout-1);if (wpsFLY_isNetscape||wpsFLY_isMoz)
scrolled="window.pageYOffset";else if (wpsFLY_isIE)
scrolled="document.body.scrollTop";if (wpsFLY_isNetscape||wpsFLY_isMoz)
wpsFLY_fromTop=wpsFLY_Flyout.css.top;else if (wpsFLY_isIE)
wpsFLY_fromTop=wpsFLY_Flyout.css.pixelTop;if (wpsFLY_isIE) {
window.onscroll=wpsFLY_internalScroll;window.onresize=wpsFLY_internalScroll;}else {
window.onscroll=wpsFLY_internalScroll();}if (showHidden)
wpsFLY_Flyout.css.visibility="hidden";else
wpsFLY_Flyout.css.visibility="visible";if (wpsFLY_initFlyoutExpanded != null)
{
wpsFLY_toggleFlyout(wpsFLY_initFlyoutExpanded, true);}return;};function wpsFLY_initFlyoutLeft(showHidden)
{
wpsFLY_FlyoutLeft=new wpsFLY_makeFlyoutLeft('wpsFLYflyout');if (wpsFLY_isIE) {
wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);wpsFLY_FlyoutLeft.css.overflow='hidden';wpsFLY_FlyoutLeft.setLeft(0);} else {
wpsFLY_FlyoutLeft.setLeft(wpsFLY_minFlyout - wpsFLY_FlyoutLeft.getWidth()- 4);};if (wpsFLY_isNetscape||wpsFLY_isMoz)
scrolled="window.pageYOffset";else if (wpsFLY_isIE)
scrolled="document.body.scrollTop";if (wpsFLY_isNetscape||wpsFLY_isMoz)
wpsFLY_fromTop=wpsFLY_FlyoutLeft.css.top;else if (wpsFLY_isIE)
wpsFLY_fromTop=wpsFLY_FlyoutLeft.css.pixelTop;if (wpsFLY_isIE) {
window.onscroll=wpsFLY_internalScrollLeft;window.onresize=wpsFLY_internalResizeLeft;} else
window.onscroll=wpsFLY_internalScrollLeft();if (showHidden)
wpsFLY_FlyoutLeft.css.visibility="hidden";else
wpsFLY_FlyoutLeft.css.visibility="visible";if (wpsFLY_initFlyoutExpanded != null)
{
wpsFLY_toggleFlyout(wpsFLY_initFlyoutExpanded, true);}};function wpsFLY_makeFlyout(obj)
{
this.origObject=document.getElementById(obj);if (wpsFLY_isNetscape)
this.css=eval('document.'+obj);else if (wpsFLY_isMoz)
this.css=document.getElementById(obj).style;else if (wpsFLY_isIE)
this.css=eval(obj+'.style');wpsFLY_state=1;this.go=0;if (wpsFLY_isNetscape)
this.width=this.css.document.width;else if (wpsFLY_isMoz)
this.width=document.getElementById(obj).offsetWidth;else if (wpsFLY_isIE)
this.width=eval(obj+'.offsetWidth');this.setWidth=wpsFLY_internalSetWidth;this.getWidth=wpsFLY_internalGetWidth;this.left=wpsFLY_internalGetLeft;this.pageWidth=wpsFLY_internalGetPageWidth;this.setLeft=wpsFLY_internalSetLeft;this.obj=obj + "Object";eval(this.obj + "=this");};function wpsFLY_makeFlyoutLeft(obj)
{
this.origObject=document.getElementById(obj);if (wpsFLY_isNetscape)
this.css=eval('document.'+obj);else if (wpsFLY_isMoz)
this.css=document.getElementById(obj).style;else if (wpsFLY_isIE)
this.css=eval(obj+'.style');wpsFLY_state=1;this.go=0;if (wpsFLY_isNetscape)
this.width=this.css.document.width;else if (wpsFLY_isMoz)
this.width=document.getElementById(obj).offsetWidth;else if (wpsFLY_isIE)
this.width=eval(obj+'.offsetWidth');this.setWidth=wpsFLY_internalSetWidthLeft;this.getWidth=wpsFLY_internalGetWidthLeft;this.left=wpsFLY_internalGetLeft;this.pageWidth=wpsFLY_internalGetPageWidth;this.setLeft=wpsFLY_internalSetLeft;this.obj=obj + "Object";eval(this.obj + "=this");};function wpsFLY_internalGetPageWidth()
{
return wpsFLY_browserDimensions.getViewableAreaWidth();};function wpsFLY_internalSetLeft(value)
{
this.css.left=value + "px";};function wpsFLY_internalSetWidth(value)
{
this.css.width=value + "px";if (navigator.userAgent.indexOf ("Opera") != -1) {
var operaIframe=document.getElementById('wpsFLY_flyoutIFrame');operaIframe.style.width=(value-wpsFLY_minFlyout) + "px" ;}};function wpsFLY_internalSetWidthLeft(value)
{
this.css.width=value + "px";if (navigator.userAgent.indexOf ("Opera") != -1) {
var operaIframe=document.getElementById('wpsFLY_flyoutIFrame');operaIframe.style.width=(value-wpsFLY_minFlyout) + "px" ;}};function wpsFLY_internalGetWidth()
{
if (wpsFLY_isNetscape)
return eval(this.css.document.width);else if (wpsFLY_isMoz||wpsFLY_isIE)
return eval(this.origObject.offsetWidth);};function wpsFLY_internalGetWidthLeft()
{
var width;if (wpsFLY_isNetscape)
width=eval(this.css.document.width);else if (wpsFLY_isMoz||wpsFLY_isIE)
width=eval(this.origObject.offsetWidth);return width;};function wpsFLY_internalGetLeft()
{
if (wpsFLY_isNetscape||wpsFLY_isMoz)
leftfunc=parseInt(this.css.left);else if (wpsFLY_isIE)
leftfunc=eval(this.css.pixelLeft);return leftfunc;};function wpsFLY_internalMoveOut()
{
document.getElementById('wpsFLYflyout').className="portalFlyoutExpanded";if (wpsFLY_Flyout.left() - wpsFLY_move > wpsFLY_Flyout.pageWidth()+ wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_Flyout.width) {
var newwidth= wpsFLY_Flyout.getWidth()+wpsFLY_move;wpsFLY_Flyout.setWidth(newwidth);wpsFLY_Flyout.setLeft(wpsFLY_Flyout.left() - wpsFLY_move);wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOut()",wpsFLY_scrollSpeed);wpsFLY_Flyout.go=1;} else {
wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_Flyout.width);wpsFLY_Flyout.setWidth(wpsFLY_Flyout.width);wpsFLY_Flyout.go=0;wpsFLY_state=0;};};function wpsFLY_internalMoveOutLeft()
{
document.getElementById('wpsFLYflyout').className="portalFlyoutExpanded";if (wpsFLY_isIE) {
if (wpsFLY_FlyoutLeft.getWidth() + wpsFLY_move < wpsFLY_FlyoutLeft.width) {
var newwidth= wpsFLY_FlyoutLeft.getWidth()+wpsFLY_move;wpsFLY_FlyoutLeft.setWidth(newwidth);wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOutLeft()",wpsFLY_scrollSpeed);wpsFLY_FlyoutLeft.go=1;} else {
wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left());wpsFLY_FlyoutLeft.setWidth(wpsFLY_FlyoutLeft.width);wpsFLY_FlyoutLeft.go=0;wpsFLY_state=0;};} else {
if(wpsFLY_FlyoutLeft.left()+wpsFLY_move < wpsFLY_browserDimensions.getScrollFromLeft()) {
wpsFLY_FlyoutLeft.go=1;wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left()+wpsFLY_move);wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveOutLeft()",wpsFLY_scrollSpeed);} else {
wpsFLY_FlyoutLeft.setLeft(wpsFLY_browserDimensions.getScrollFromLeft());wpsFLY_FlyoutLeft.go=0;wpsFLY_state=0;};};};function wpsFLY_internalMoveIn()
{
if (wpsFLY_Flyout.left() + wpsFLY_move < wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_minFlyout) {
wpsFLY_Flyout.go=1;var newwidth= wpsFLY_Flyout.getWidth()-wpsFLY_move;wpsFLY_Flyout.setWidth(newwidth);wpsFLY_Flyout.setLeft(wpsFLY_Flyout.left()+wpsFLY_move);wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveIn()",wpsFLY_scrollSpeed);} else {
wpsFLY_Flyout.setWidth(wpsFLY_minFlyout);wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_minFlyout);wpsFLY_Flyout.go=0;wpsFLY_state=1;};};function wpsFLY_internalMoveInLeft()
{
if (wpsFLY_isIE) {
if (wpsFLY_FlyoutLeft.getWidth() - wpsFLY_move >  wpsFLY_minFlyout) {
var newwidth= wpsFLY_FlyoutLeft.getWidth() - wpsFLY_move;wpsFLY_FlyoutLeft.setWidth(newwidth);wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveInLeft()",wpsFLY_scrollSpeed);wpsFLY_FlyoutLeft.go=1;} else {
wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left());wpsFLY_FlyoutLeft.go=0;wpsFLY_state=1;};} else {
if(wpsFLY_FlyoutLeft.left()>-wpsFLY_FlyoutLeft.width+wpsFLY_minFlyout) {
wpsFLY_FlyoutLeft.go=1;wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left()-wpsFLY_move);wpsFLY_timeoutID=setTimeout("wpsFLY_internalMoveInLeft()",wpsFLY_scrollSpeed);} else {
wpsFLY_FlyoutLeft.setLeft(wpsFLY_minFlyout - wpsFLY_FlyoutLeft.getWidth()- 4);wpsFLY_FlyoutLeft.go=0;wpsFLY_state=1;};};};function wpsFLY_internalScroll() {
if (!wpsFLY_Flyout.go) {
if (wpsFLY_state==1) {
wpsFLY_Flyout.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() + wpsFLY_browserDimensions.getViewableAreaWidth() - wpsFLY_minFlyout);} else {
wpsFLY_Flyout.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() + wpsFLY_browserDimensions.getViewableAreaWidth() - wpsFLY_Flyout.width);};}if (wpsFLY_isNetscape||wpsFLY_isMoz)
setTimeout('wpsFLY_internalScroll()',20);};function wpsFLY_internalScrollLeft() {
if (!wpsFLY_FlyoutLeft.go) {
if (wpsFLY_state==1) {
if (wpsFLY_isIE) {
if (wpsFLY_leftResize == null) {
wpsFLY_leftResize=wpsFLY_browserDimensions.getScrollFromLeft();}wpsFLY_FlyoutLeft.setWidth(wpsFLY_minFlyout);wpsFLY_FlyoutLeft.css.overflow='hidden';wpsFLY_FlyoutLeft.setLeft(wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_leftResize);} else {
wpsFLY_FlyoutLeft.setLeft(wpsFLY_minFlyout + wpsFLY_browserDimensions.getScrollFromLeft() - wpsFLY_FlyoutLeft.getWidth() - 4);};}}if (wpsFLY_isNetscape||wpsFLY_isMoz)
setTimeout('wpsFLY_internalScrollLeft()',20);};function wpsFLY_internalResizeLeft(){
if (wpsFLY_isIE) {
wpsFLY_leftResize=wpsFLY_browserDimensions.getScrollFromLeft(); - wpsFLY_browserDimensions.getViewableAreaWidth();}};function wpsFLY_moveOutFlyout(skipSlide)
{
if (this.wpsFLY_Flyout != null)
{
if (wpsFLY_state && !skipSlide) {
clearTimeout(wpsFLY_timeoutID);wpsFLY_internalMoveOut();}if (wpsFLY_state && skipSlide)
{
wpsFLY_Flyout.setLeft(wpsFLY_Flyout.pageWidth() + document.body.scrollLeft - wpsFLY_Flyout.width);wpsFLY_Flyout.setWidth(wpsFLY_Flyout.width);wpsFLY_Flyout.go=0;wpsFLY_state=0;document.getElementById('wpsFLYflyout').className="portalFlyoutExpanded";}}if (this.wpsFLY_FlyoutLeft != null)
{
if (wpsFLY_state && !skipSlide) {
clearTimeout(wpsFLY_timeoutID);wpsFLY_internalMoveOutLeft();}if (wpsFLY_state && skipSlide)
{
if (wpsFLY_isIE)
{
wpsFLY_FlyoutLeft.setLeft(wpsFLY_FlyoutLeft.left());wpsFLY_FlyoutLeft.setWidth(wpsFLY_FlyoutLeft.width);wpsFLY_FlyoutLeft.go=0;wpsFLY_state=0;}else
{
wpsFLY_FlyoutLeft.setLeft(document.body.scrollLeft);wpsFLY_FlyoutLeft.go=0;wpsFLY_state=0;};document.getElementById('wpsFLYflyout').className="portalFlyoutExpanded";}}};function wpsFLY_moveInFlyout()
{
if (this.wpsFLY_Flyout != null)
{
if (!wpsFLY_state) {
clearTimeout(wpsFLY_timeoutID);wpsFLY_internalMoveIn();}}if (this.wpsFLY_FlyoutLeft != null)
{
if (!wpsFLY_state) {
clearTimeout(wpsFLY_timeoutID);wpsFLY_internalMoveInLeft();}}document.getElementById('wpsFLYflyout').className="portalFlyoutCollapsed";};function wpsFLY_toggleFlyout(index, skipSlide)
{
var checkIndex=index;var prevIndex=wpsFLY_getCurrIndex();if(checkIndex==prevIndex){
if(flyOut[index].active==true){
flyOut[index].active=false;document.getElementById("toolBarIcon"+prevIndex).src=flyOut[prevIndex].icon;document.getElementById("toolBarIcon"+prevIndex).alt=flyOut[prevIndex].altText;document.getElementById("toolBarIcon"+prevIndex).title=flyOut[prevIndex].altText;}else{
flyOut[index].active=true;document.getElementById("toolBarIcon"+index).src=flyOut[index].activeIcon;document.getElementById("toolBarIcon"+index).alt=flyOut[index].activeAltText;document.getElementById("toolBarIcon"+index).title=flyOut[index].activeAltText;};wpsFLY_clearStateCookie();wpsFLY_moveInFlyout();}else{
if(prevIndex > -1){
flyOut[prevIndex].active=false;document.getElementById("toolBarIcon"+prevIndex).src=flyOut[prevIndex].icon;document.getElementById("toolBarIcon"+prevIndex).alt=flyOut[prevIndex].altText;document.getElementById("toolBarIcon"+prevIndex).title=flyOut[prevIndex].altText;}flyOut[index].active=true;document.getElementById("toolBarIcon"+index).src=flyOut[index].activeIcon;document.getElementById("toolBarIcon"+index).alt=flyOut[index].activeAltText;document.getElementById("toolBarIcon"+index).title=flyOut[index].activeAltText;wpsFLY_setCurrIndex(index);document.getElementById("wpsFLY_flyoutIFrame").src=flyOut[index].url;};if(wpsFLY_state){
wpsFLY_setStateCookie(index);wpsFLY_moveOutFlyout(skipSlide);}};function wpsFLY_getCurrIndex()
{
return wpsFLY_currIndex;};function wpsFLY_setCurrIndex(index)
{
wpsFLY_currIndex=index;};function wpsFLY_setStateCookie(index)
{
document.cookie='portalOpenFlyout=' + index + '; path=/;';};function wpsFLY_clearStateCookie()
{
document.cookie='portalOpenFlyout=null; expires=Wed, 1 Jan 2003 11:11:11 UTC; path=/;';};function wpsFLY_onloadShow(isRTL)
{
if (this.wpsFLY_minFlyout != null) {
var bodyObj=document.getElementById("FLYParent");if (bodyObj != null) {
var showHidden=false;if (isRTL) {
bodyObj.onload=wpsFLY_initFlyoutLeft(showHidden);} else {
bodyObj.onload=wpsFLY_initFlyout(showHidden);};}}};function wpsFLY_markupLoop(flyOut)
{
for(arrayIndex=0; arrayIndex < flyOut.length; arrayIndex++){
if(flyOut[arrayIndex].url != "" && flyOut[arrayIndex].url != null){
document.write('<a tabIndex="5" class="toolbarLink" id="toolBarLink'+arrayIndex+'" href="javascript:void(0);" onclick="wpsFLY_toggleFlyout('+arrayIndex+'); return false;" >');document.write('<img src="'+flyOut[arrayIndex].icon+'" id="toolBarIcon'+arrayIndex+'" title="'+flyOut[arrayIndex].altText+'" border="0" alt="'+flyOut[arrayIndex].altText+'" onmouseover="this.src=flyOut['+arrayIndex+'].hoverIcon;" onmouseout="if (flyOut['+arrayIndex+'].active) {this.src=flyOut['+arrayIndex+'].activeIcon;} else this.src=flyOut['+arrayIndex+'].icon;" />');document.write('</a>');}if (javascriptEventController)
{
javascriptEventController.register("toolBarLink" + arrayIndex);javascriptEventController.register("toolBarIcon" + arrayIndex);}};};function wpsFLY_checkForEmptyExpandedFlyout()
{
var index=wpsFLY_getInitialFlyoutState();if (index != null)
{
document.getElementById("wpsFLY_flyoutIFrame").src=flyOut[index].url;}};function wpsFLY_getInitialFlyoutState()
{
if (document.cookie.indexOf("portalOpenFlyout=") >= 0)
{
var cookies=document.cookie.split(";");var c=0;while (c < cookies.length && (cookies[c].indexOf("portalOpenFlyout=") == -1))
{
c=c+1;};initCookieValue=cookies[c].substring(18, cookies[c].length);if (initCookieValue != "null")
{
return initCookieValue;}else
{
return null;}}else
{
return null;}};
/** Preloaded Content**/
document.write('<div id="calHolder"></div>');


/*------------Init Function------------------*/
function init(){
		setCol();

//		setPage();
//		setGraphRadios();
}

/*------------Function will retive page link and sidebar file from URL------------------*/
function setPage(){
	var currentLocation = document.location.href;
	
	var initVar = currentLocation.indexOf('?');
	
	currentLocation = currentLocation.substring(initVar+1, currentLocation.length);
	var arg = new Array();
	
	arg = currentLocation.split('|');
	if(arg.length>1){
		getContent(arg[0],arg[1],arg[2]);
	}
}


/*--------------Set Height for Coloum,Main panel & Left Navigation------------*/
function setCol(){
		var _body = document.getElementsByTagName("body");
		
		if(_body[0].id!="home"){
			var mainBox = document.getElementById("Main");
			var menuBox = document.getElementById("Menu");
			//var slider = document.getElementById("Sidebar");
			//var slContainer = document.getElementById("container");

			
			var constent=0;
		/*	
			if(slContainer==null){
				var _div =  document.getElementsByTagName("div");
				for(o=0;o<_div.length;o++){
					if(_div[o].className.indexOf('lbContent')!=-1){
						slContainer = _div[o];
						constent=15;
					}
				}					
			}
			*/
			var mHeight;
			
			menuBox.style.height="auto";
// --added--	if(slContainer){slContainer.style.height="auto";}else{slider.style.height="auto";}

			mainBox.style.height="auto";
				
//Added new line below	--	mHeight =parseInt(compareHeight(mainBox.offsetHeight,menuBox.offsetHeight,slider.offsetHeight));

			mHeight =parseInt(compareHeight(mainBox.offsetHeight,menuBox.offsetHeight,0));
			menuBox.style.height=mHeight+"px";
			
			
		/*
			if(slContainer)
			{
				slContainer.style.height=slContainer.offsetHeight+(mHeight-slider.offsetHeight)-(constent)+5+"px";
			}else{
				slider.style.height=mHeight+"px";
			}
            */

			mainBox.style.height=mHeight+"px";
		}else{
				panel_sh();
		}
}

/*--------------Compare Heught of Coloum,Main panel & Left Navigation------------*/
function compareHeight(main,menu,side){
	if(main>menu){
		if(main>side){
			return main-5;
		}else{
			return side;
		}
	}else{
		if(menu>side){
			return menu;
		}else{
			return side;
		}
	}
}


/*------------------Function to get Content for Left Menu Item -----------------------*/
function getContent(file,aLink,sideBar){
	closeCalendar();
	if(file!=""){setHTML('Main', file);}
	setLink(aLink);
	if(sideBar!=""){
			hideSideBar(0);
			setHTML('Sidebar',sideBar);
			var cal =  document.getElementById('_calendar');
			if(cal){
					setHTML('_calendar','_calendar.html');
					setCalendar('05/07/2008','','');
			}
			
	}else{
		hideSideBar(1);
	}
	setCol();
	panel_sh();
	setGraphRadios();
}

/*------------------Function will expand the Left link -----------------------*/
function setLink(aLink){

	var aLi = document.getElementById("Menu").getElementsByTagName("li");
	
	for(i=0;i<aLi.length;i++){
		aLi[i].className="";	
	}

	if(aLink.indexOf('sub')!=-1){
		var ids = aLink.split("_");
		
		if(ids.length>2){
			var al1 = document.getElementById(ids[0]+"_"+ids[1]+"_"+ids[2]);
			var al2 = document.getElementById(ids[0]+"_"+ids[1]);
			var al3 = document.getElementById(ids[0]);
			
			al1.className="selected";
			al2.className="selected";
			al3.className="selected";
			
		}else{
			var al2 = document.getElementById(ids[0]+"_"+ids[1]);
			var al3 = document.getElementById(ids[0]);
			
			al2.className="selected";
			al3.className="selected";
		}
		
	}else{
		var al = document.getElementById(aLink);
		al.className="selected";
	}
}

/*------------------Function is for Show hide Sidebar-----------------------*/
function hideSideBar(show){
	if(show){
		var sb = document.getElementById("Sidebar");
		var mainBox = document.getElementById("Main");
		if(sb){
			sb.style.display="none";
			mainBox.style.width="768px";
		}
	}else{
		var sb = document.getElementById("Sidebar");
		var mainBox = document.getElementById("Main");
		if(sb){
			sb.style.display="block";
			mainBox.style.width="573px";
		}
	}
}


/*------------------Function is to set External HTML file to particular DIV-----------------------*/
function setHTML(id, url) {
  var req = false;
  // For Safari, Firefox, and other non-MS browsers
  if (window.XMLHttpRequest) {
    try {
      req = new XMLHttpRequest();
    } catch (e) {
      req = false;
    }
  } else if (window.ActiveXObject) {
    // For Internet Explorer on Windows
    try {
      req = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e) {
      try {
        req = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        req = false;
      }
    }
  }
 var element = document.getElementById(id);
 if (!element) {
  alert("Bad id " + id +
   "passed to clientSideInclude." +
   "You need a div or span element " +
   "with this id in your page.");
  return;
 }
  if (req) {
    // Synchronous request, wait till we have it all
    req.open('GET', url, false);
		//req.onreadystatechange =function() {if (req.readyState == 4) {preloadSlideshow(req,id);}
    req.send(null);
    element.innerHTML = req.responseText;
		
  } else {
    element.innerHTML ="Sorry, your browser does not support XMLHTTPRequest objects. This page requires Internet Explorer 5 or better for Windows, or Firefox for any system, or Safari. Other compatible browsers may also exist.";
  }
	initCalendar();
}



/*------------------Function is to attach click event to showhide panel in box-----------------------*/
function panel_sh(){
	var _shPanels =  document.getElementsByTagName("div")

	for(i=0;i<_shPanels.length;i++){
			
		if(_shPanels[i].className.indexOf("showHidePanel")!=-1){

			if(_shPanels[i].id!=""){
				
				var gId = _shPanels[i].id.split("_");
	
					gId = gId[(gId.length-1)];	//Global Number

					var _panel = document.getElementById("panel_"+gId);
					var _pAnchor = document.getElementById("pa_"+gId);
					var _options = document.getElementById("opt_"+gId);
					var _oAnchor = document.getElementById("oa_"+gId);
					var _eoPanel = document.getElementById("ext_opt_"+gId);
					var _eoAnchor = document.getElementById("eoa_"+gId);
					var _shPanel = document.getElementById("sh_"+gId);
					
					if(_pAnchor!=null){_pAnchor.onclick = new Function('onp_anchor(\''+ gId +'\')');}
					
					if(_oAnchor!=null){_oAnchor.onclick = new Function('showOptions(\''+ gId +'\')');}
	
					if(_eoAnchor!=null){_eoAnchor.onclick = new Function('hideOPtions(\''+ gId +'\')');}

			}
		}
		
	}
}

function onp_anchor(gId){

	var _pAnchor = document.getElementById("pa_"+gId);
	var _panel = document.getElementById("panel_"+gId);
	var _shPanel = document.getElementById("sh_"+gId);

	if(_shPanel.style.display!="none"||_shPanel.style.display==""){_shPanel.style.display="none";}else{_shPanel.style.display="block";}								
							
	if(_pAnchor.innerHTML!="Expand"){
		_pAnchor.innerHTML="Expand";
		_pAnchor.className="coll-Down";
		_panel.className=_panel.className.replace(/ flat-bottom/g,'');		
		_panel.className= "dark-blue-box";
		
	}else{
		_pAnchor.innerHTML="Collapse";
		_pAnchor.className="coll-Up";
		_panel.className=_panel.className.replace(/ dark-blue-box/g,'');
		_panel.className="black-box";
	}
	
	setCol();
	
}

function showOptions(gId){

	var _options = document.getElementById("opt_"+gId);
	var _eoPanel = document.getElementById("ext_opt_"+gId);

	_options.style.display="none";
	_eoPanel.style.display="block";
	
	setCol();
}

function hideOPtions(gId){
	var _options = document.getElementById("opt_"+gId);
	var _eoPanel = document.getElementById("ext_opt_"+gId);

	_eoPanel.style.display="none";
	_options.style.display="block";

	setCol();
		
}

function setIframe(){
		var _iFrame =  document.getEelementById("mainFrame");
			_iFrame.style.width=_iFrame.scrollHeight+"px";
}



/*------------------Function will attach click event to Calendar Image-----------------------*/
function initCalendar(){

	var _dImage = document.getElementsByTagName("img");
	
	for(i=0;i<_dImage.length;i++){
		if(_dImage[i].className.indexOf('calBtn')!=-1){
				_dImage[i].onclick = new Function('openCalendar(\''+ _dImage[i].id +'\')')
		}
	}
}

function closeCalendar(){
	var _calHolder = document.getElementById('calHolder');
	if(_calHolder){	_calHolder.style.display="none";}
}

function openCalendar(obj){
	var _cal = document.getElementById(obj);
	var _header =  document.getElementById('Header');
	var _calHolder = document.getElementById('calHolder');
	var _main =  document.getElementById('Master');
	var _screenWidth = 	document.documentElement.clientWidth;
	var _textBox =  document.getElementById(obj+'_text');
	
	var _filledDate=_textBox.value	//mm/dd/yyyy
	_screenWidth=Math.round((_screenWidth-_main.offsetWidth)/2);

	_calHolder.style.top= _cal.offsetTop+_header.offsetHeight+4+"px";
	_calHolder.style.left= _cal.offsetLeft+_screenWidth+13+"px";
	
	setHTML('calHolder','_calendar.html');
	_calHolder.style.display="block";
	setCalendar(_filledDate,'',obj);	
}



function _getMonth(m){
	
	var _months=new Array();

	_months[0]="January";
	_months[1]="Feburary";
	_months[2]="March";
	_months[3]="April";
	_months[4]="May";
	_months[5]="June";
	_months[6]="July";
	_months[7]="August";
	_months[8]="September";
	_months[9]="October";
	_months[10]="November";
	_months[11]="December";
	
	return _months[m];
}

function _getWeekDay(wd){
	
	var _weekDays=new Array();

	_weekDays[0]="Sunday";
	_weekDays[1]="Monday";
	_weekDays[2]="Tuesday";
	_weekDays[3]="Wednesday";
	_weekDays[4]="Thursday";
	_weekDays[5]="Firday";
	_weekDays[6]="Saturday";
	
	return _weekDays[wd];
		
}

function Leap(Year){
	if((Year%4)==0){
		if((Year%100)==0){
			Result=((Year%400)==0);
		}else{
			Result=1;
		}
	}else{
		Result = 0;
	}
	return (Result);
}

function setCalMonth(_userDate,_textbox){
	setCalendar(_userDate,'',_textbox);
}

function setDateToTextBox(date,textBox){
	
	var _txtBox = document.getElementById(textBox+'_text');
	if(_txtBox){
		_txtBox.value=date;
	}
	javascript:closeCalendar();
	
}
function setCalendar(fillDate,_week,_textBox){
	
	
	if(_week==null){
		_week=0;
	}
	
	var _userDate = fillDate.split("/");
	var _lastDate=0;
	var _cDate = new Date();
	var _pmDate = new Date();
	var _mLDate = new Date();
	var _fillDates;
	var maxLoop = 42;
	
	var _preMonth = document.getElementById('preMonth');
	var _nxtMonth = document.getElementById('nxtMonth');
	var _iframe = document.getElementById("dummyFrame");
				
	var _pMonth,_pDate,_pYear;
	_pDate = parseInt(_userDate[1]);
	
	if(parseInt(_userDate[0])<=1){
		_pMonth=12;
		_pYear = parseInt(_userDate[2])-1;
	}else{
		_pMonth = parseInt(_userDate[0]-1);
		_pYear = parseInt(_userDate[2]);	
	}

	var prevMonth = _pMonth + "/" + _pDate + "/" + _pYear;

	_preMonth.onclick= new Function('setCalMonth("'+prevMonth+'","'+ _textBox +'")');
	
	var _nMonth,_nDate,_nYear;
	_nDate = parseInt(_userDate[1]);
	
	if(parseInt(_userDate[0])>=12){
		_nMonth=1;
		_nYear = parseInt(_userDate[2])+1;
	}else{
		_nMonth = parseInt(_userDate[0])+1;
		_nYear = parseInt(_userDate[2]);
	}

	var nextMonth = _nMonth + "/" + _nDate + "/" + _nYear;

	_nxtMonth.onclick= new Function('setCalMonth("'+nextMonth+'","'+ _textBox +'")');
	
	
	document.getElementById('monthYear').innerHTML="<strong>"+_getMonth(parseInt(_userDate[0])-1)+" "+_userDate[2]+"</strong>";

	_cDate.setDate(1);
	_cDate.setMonth(parseInt(_userDate[0])-1);
	_cDate.setYear(parseInt(_userDate[2]));

	_pmDate.setDate(1);
	_pmDate.setMonth(parseInt(_userDate[0])-2);
	_pmDate.setYear(parseInt(_userDate[2]));
	
	var _firstWeekDay = _cDate.getDay();
	

	if(_firstWeekDay==0){
		_firstWeekDay=7;
	}
	

	var febNum =0; 
	if(Leap(_userDate[2])){
		febNum=29;
	}else{
		febNum=28;
	}
	
	for(i=1;i<=31;i++){
		if(parseInt(_userDate[0])==2){
			if(i>febNum){
				break;
			}
		}

		_cDate.setDate(i);	
		if(_cDate.getDate()>=i){
			_lastDate = _cDate.getDate();
		}
	}
	
	_mLDate.setDate(_lastDate);
	_mLDate.setMonth(parseInt(_userDate[0])-1);
	_mLDate.setYear(parseInt(_userDate[2]));

	var _lastWeekDay = _mLDate.getDay();
	
	if(_lastWeekDay ==0){
		_lastWeekDay =7;
	}
	
	for(i=1;i<=31;i++){
		_pmDate.setDate(i);	
		if(_pmDate.getDate()>=i){
			_pmLastDate = _pmDate.getDate();
		}
	}
	

	var _dateTable =  document.getElementById('dateTable');
	var tableCal="";
	var _cWeek=1;
	var _dates=1;
	var _date=1;
	var pMonth=0;
	var nMonth=1;
	
	for(c=1;c<=maxLoop/7;c++){
		if(_dates>_lastDate){		
			break;
		}else{
			if(c==_week){
				tableCal=tableCal+"<tr class='week'>"
			}else{
				tableCal=tableCal+"<tr>"
			}
			for(w=1;w<=7;w++){

				if(_date >= _firstWeekDay && _dates <= _lastDate){
					date=_userDate[0]+"/"+_dates+"/"+_userDate[2]
					if(_dates==(_userDate[1])){
						tableCal=tableCal+"<td><a href='javascript:setDateToTextBox(\"" + date + "\",\"" + _textBox + "\");' class='currentDate'>"+_dates+"</a></td>"
					}else{
						tableCal=tableCal+"<td><a href='javascript:setDateToTextBox(\"" + date + "\",\"" + _textBox + "\");'>"+_dates+"</a></td>"
					}
					_dates=_dates+1
				}else{
					if(_date < _firstWeekDay){
						pMonth=(_pmLastDate-_firstWeekDay)+_date+1;
						tableCal=tableCal+"<td><strong>"+pMonth+"</strong></td>"
					}
					if(_dates > _lastDate){
						tableCal=tableCal+"<td><strong>"+ nMonth+"</strong></td>"
						nMonth=nMonth+1;
					}
				}
				_date=_date+1;
			}
			
			tableCal=tableCal+"</tr>"
		}
	}

	_dateTable.innerHTML='<table width="100%" border="0" cellspacing="0" cellpadding="0" >'+tableCal+'</table>';
	_iframe.style.height=_dateTable.offsetHeight+27+"px";
	_iframe.style.width=_dateTable.offsetWidth-2+"px";
	setCol();
}


/*--------------- Select ALL & None CheckBox ----------------*/

function checkAll(_container){
	var _obj = document.getElementById(_container);
	
	var _chkBoxes = _obj.getElementsByTagName('input');
	
	for(i=0;i<_chkBoxes.length;i++){
		if(_chkBoxes[i].type="checkBox"){
			_chkBoxes[i].checked = "checked";
		}
	}
}

function checkNone(_container){
	var _obj = document.getElementById(_container);
	
	var _chkBoxes = _obj.getElementsByTagName('input');
	
	for(i=0;i<_chkBoxes.length;i++){
		if(_chkBoxes[i].type="checkBox"){
			_chkBoxes[i].checked = "";
		}
	}
}

function whichBrs() {
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1) return 'Opera';
	if (agt.indexOf("staroffice") != -1) return 'Star Office';
	if (agt.indexOf("webtv") != -1) return 'WebTV';
	if (agt.indexOf("beonex") != -1) return 'Beonex';
	if (agt.indexOf("chimera") != -1) return 'Chimera';
	if (agt.indexOf("netpositive") != -1) return 'NetPositive';
	if (agt.indexOf("phoenix") != -1) return 'Phoenix';
	if (agt.indexOf("firefox") != -1) return 'Firefox';
	if (agt.indexOf("safari") != -1) return 'Safari';
	if (agt.indexOf("skipstone") != -1) return 'SkipStone';
	if (agt.indexOf("msie") != -1) return 'Internet Explorer';
	if (agt.indexOf("netscape") != -1) return 'Netscape';
	if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
	if (agt.indexOf('\/') != -1) {
	if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
	return navigator.userAgent.substr(0,agt.indexOf('\/'));}
	else return 'Netscape';} else if (agt.indexOf(' ') != -1)
	return navigator.userAgent.substr(0,agt.indexOf(' '));
	else return navigator.userAgent;
}

/*---------------------- Expand Collapse of Table Row -----------------------*/

function toogleData(rowID){
	var _sRowId = rowID+"_sub"
	var _rows =  document.getElementsByTagName('tr');
	var _hRow = document.getElementById(rowID);
	
	var bowser = whichBrs();
	
	for(i=0;i<_rows.length;i++){
		var cRow = _rows[i].id;
		if(cRow.indexOf(_sRowId)!=-1){
			if(bowser!="Internet Explorer"){
				if(_rows[i].style.visibility==""||_rows[i].style.visibility=="visible"){
					_rows[i].style.visibility="hidden";
					if(_hRow.rowIndex!=1){
						_hRow.className=_hRow.className.replace(/rowHeadingOpen/g,'rowHeading');
					}else{
						_hRow.className=_hRow.className.replace(/rowHeadingOpen/g,'first-row rowHeading');
					}
				}else{
					_rows[i].style.visibility="visible";
					if(_hRow.rowIndex!=1){
						_hRow.className=_hRow.className.replace(/rowHeading/g,' rowHeadingOpen');
					}else{
						_hRow.className=_hRow.className.replace(/first-row rowHeading/g,' rowHeadingOpen');
					}
				}
			}else{
				if(_rows[i].style.display==""||_rows[i].style.display=="block"){
					_rows[i].style.display="none";
					if(_hRow.rowIndex!=1){
						_hRow.className=_hRow.className.replace(/rowHeadingOpen/g,' rowHeading');
					}else{
						_hRow.className=_hRow.className.replace(/rowHeadingOpen/g,' rowHeading first-row');
					}
				}else{
					_rows[i].style.display="block";
					if(_hRow.rowIndex!=1){
						_hRow.className=_hRow.className.replace(/rowHeading/g,' rowHeadingOpen');
					}else{
						_hRow.className=_hRow.className.replace(/rowHeading first-row/g,' rowHeadingOpen');
					}
				}
			}
		}
	}
	
	setCol();

}


/*---------Colostrum Calculator Graph----------*/
function setGraphRadios(){
 var _bottomDiv = document.getElementById("ccGraphBP");
 if(_bottomDiv){
	 var _radioButtons = _bottomDiv.getElementsByTagName("input");
	
	 for(i=0;i<_radioButtons.length;i++){
		 if(_radioButtons[i].type=="radio"){
				_radioButtons[i].onclick =  new Function('setBar('+(i+1)+')');
				_radioButtons[i].onchange =  new Function('setBar('+(i+1)+')');
		 }
	 }
 }
}

function setBar(number){
		var _col = document.getElementById("col"+number);
		var _bar = document.getElementById("bar"+number);
		
		resetGraph();
		_col.className = _col.className.replace(/ppValue/g, 'ppValue-selected');
		_bar.className = _bar.className.replace(/bar/g, 'bar-selected');
	
}

function resetGraph(){
	for(k=1;k<8;k++){

		var _col = document.getElementById("col"+k);
		var _bar = document.getElementById("bar"+k);

		if(_col.className.indexOf('ppValue-selected')!=-1){
		_col.className = _col.className.replace(/ppValue-selected/g, 'ppValue');
		}
		if(_bar.className.indexOf('bar-selected')!=-1){
		_bar.className = _bar.className.replace(/bar-selected/g, 'bar');
		}
	}
}

/*---------------Open Browser Window------------------*/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

/*---------------- Disable & unable Adress----------------------*/
function udAdress(){
	
	var _checkBox = document.getElementById("postAddress");
	var _dTable =  document.getElementById("disableTable");
	var _uTable =  document.getElementById("unableTable");
	
	
	if(_dTable.style.display=="none"){
			_dTable.style.display="block";
			_uTable.style.display="none";
	}else{
			_uTable.style.display="block";
			_dTable.style.display="none";
	}
}

/*-------------------Disable & Unable DropDown-------------------*/
function duDropDown(id){
		var _radio = document.getElementById(id);
		var _dropdown = document.getElementById(id+"_dd");
		
		resetDropDown()
		if(_radio.checked){
			_dropdown.disabled=false;
		}else{
			_dropdown.disabled=true;
		}
}

function resetDropDown(){
	var _drop1 = document.getElementById("oda_dd");
	var _drop2 = document.getElementById("mp_dd");
	var _drop3 = document.getElementById("sf_dd");
	
	_drop1.disabled=true;
	_drop2.disabled=true;
	_drop3.disabled=true;
}
/*----------------Attach Function on window onload----------------*/
window.onload= new Function ('init()');
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0,mobile:null,air:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A&&A[1]){C.webkit=parseFloat(A[1]);if(/ Mobile\//.test(B)){C.mobile="Apple";}else{A=B.match(/NokiaN[^\/]*/);if(A){C.mobile=A[0];}}A=B.match(/AdobeAIR\/([^\s]*)/);if(A){C.air=A[0];}}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);A=B.match(/Opera Mini[^;]*/);if(A){C.mobile=A[0];}}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang=YAHOO.lang||{isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return !YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that "+"all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=arguments,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C<A;C=C+1){YAHOO.lang.augmentObject(D,B[C],true);}return D;},later:function(H,B,I,D,E){H=H||0;B=B||{};var C=I,G=D,F,A;if(YAHOO.lang.isString(I)){C=B[I];}if(!C){throw new TypeError("method undefined");}if(!YAHOO.lang.isArray(G)){G=[D];}F=function(){C.apply(B,G);};A=(E)?setInterval(F,H):setTimeout(F,H);return{interval:E,cancel:function(){if(this.interval){clearInterval(A);}else{clearTimeout(A);}}};},isValue:function(B){var A=YAHOO.lang;return(A.isObject(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.5.1",build:"984"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
(function(){var B=YAHOO.util,K,I,J={},F={},M=window.document;YAHOO.env._id_counter=YAHOO.env._id_counter||0;var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i,OP_SCROLL:/^(?:inline|table-row)$/i};var N=function(P){if(!E.HYPHEN.test(P)){return P;}if(J[P]){return J[P];}var Q=P;while(E.HYPHEN.exec(Q)){Q=Q.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[P]=Q;return Q;};var O=function(Q){var P=F[Q];if(!P){P=new RegExp("(?:^|\\s+)"+Q+"(?:\\s+|$)");F[Q]=P;}return P;};if(M.defaultView&&M.defaultView.getComputedStyle){K=function(P,S){var R=null;if(S=="float"){S="cssFloat";}var Q=P.ownerDocument.defaultView.getComputedStyle(P,"");if(Q){R=Q[N(S)];}return P.style[S]||R;};}else{if(M.documentElement.currentStyle&&G){K=function(P,R){switch(N(R)){case"opacity":var T=100;try{T=P.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(S){try{T=P.filters("alpha").opacity;}catch(S){}}return T/100;case"float":R="styleFloat";default:var Q=P.currentStyle?P.currentStyle[R]:null;return(P.style[R]||Q);}};}else{K=function(P,Q){return P.style[Q];};}}if(G){I=function(P,Q,R){switch(Q){case"opacity":if(YAHOO.lang.isString(P.style.filter)){P.style.filter="alpha(opacity="+R*100+")";if(!P.currentStyle||!P.currentStyle.hasLayout){P.style.zoom=1;}}break;case"float":Q="styleFloat";default:P.style[Q]=R;}};}else{I=function(P,Q,R){if(Q=="float"){Q="cssFloat";}P.style[Q]=R;};}var D=function(P,Q){return P&&P.nodeType==1&&(!Q||Q(P));};YAHOO.util.Dom={get:function(R){if(R&&(R.nodeType||R.item)){return R;}if(YAHOO.lang.isString(R)||!R){return M.getElementById(R);}if(R.length!==undefined){var S=[];for(var Q=0,P=R.length;Q<P;++Q){S[S.length]=B.Dom.get(R[Q]);}return S;}return R;},getStyle:function(P,R){R=N(R);var Q=function(S){return K(S,R);};return B.Dom.batch(P,Q,B.Dom,true);},setStyle:function(P,R,S){R=N(R);var Q=function(T){I(T,R,S);};B.Dom.batch(P,Q,B.Dom,true);},getXY:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}return H(R);};return B.Dom.batch(P,Q,B.Dom,true);},getX:function(P){var Q=function(R){return B.Dom.getXY(R)[0];};return B.Dom.batch(P,Q,B.Dom,true);},getY:function(P){var Q=function(R){return B.Dom.getXY(R)[1];};return B.Dom.batch(P,Q,B.Dom,true);},setXY:function(P,S,R){var Q=function(V){var U=this.getStyle(V,"position");if(U=="static"){this.setStyle(V,"position","relative");U="relative";}var X=this.getXY(V);if(X===false){return false;}var W=[parseInt(this.getStyle(V,"left"),10),parseInt(this.getStyle(V,"top"),10)];if(isNaN(W[0])){W[0]=(U=="relative")?0:V.offsetLeft;}if(isNaN(W[1])){W[1]=(U=="relative")?0:V.offsetTop;}if(S[0]!==null){V.style.left=S[0]-X[0]+W[0]+"px";}if(S[1]!==null){V.style.top=S[1]-X[1]+W[1]+"px";}if(!R){var T=this.getXY(V);if((S[0]!==null&&T[0]!=S[0])||(S[1]!==null&&T[1]!=S[1])){this.setXY(V,S,true);}}};B.Dom.batch(P,Q,B.Dom,true);},setX:function(Q,P){B.Dom.setXY(Q,[P,null]);},setY:function(P,Q){B.Dom.setXY(P,[null,Q]);},getRegion:function(P){var Q=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=R.ownerDocument.body){return false;}var S=B.Region.getRegion(R);return S;};return B.Dom.batch(P,Q,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(T,X,U,V){X=X||"*";U=(U)?B.Dom.get(U):null||M;if(!U){return[];}var Q=[],P=U.getElementsByTagName(X),W=O(T);for(var R=0,S=P.length;R<S;++R){if(W.test(P[R].className)){Q[Q.length]=P[R];if(V){V.call(P[R],P[R]);}}}return Q;},hasClass:function(R,Q){var P=O(Q);var S=function(T){return P.test(T.className);};return B.Dom.batch(R,S,B.Dom,true);},addClass:function(Q,P){var R=function(S){if(this.hasClass(S,P)){return false;}S.className=YAHOO.lang.trim([S.className,P].join(" "));return true;};return B.Dom.batch(Q,R,B.Dom,true);},removeClass:function(R,Q){var P=O(Q);var S=function(T){if(!Q||!this.hasClass(T,Q)){return false;}var U=T.className;T.className=U.replace(P," ");if(this.hasClass(T,Q)){this.removeClass(T,Q);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},replaceClass:function(S,Q,P){if(!P||Q===P){return false;}var R=O(Q);var T=function(U){if(!this.hasClass(U,Q)){this.addClass(U,P);return true;}U.className=U.className.replace(R," "+P+" ");if(this.hasClass(U,Q)){this.replaceClass(U,Q,P);}U.className=YAHOO.lang.trim(U.className);return true;};return B.Dom.batch(S,T,B.Dom,true);},generateId:function(P,R){R=R||"yui-gen";var Q=function(S){if(S&&S.id){return S.id;}var T=R+YAHOO.env._id_counter++;if(S){S.id=T;}return T;};return B.Dom.batch(P,Q,B.Dom,true)||Q.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);Q=B.Dom.get(Q);if(!P||!Q){return false;}if(P.contains&&Q.nodeType&&!L){return P.contains(Q);}else{if(P.compareDocumentPosition&&Q.nodeType){return !!(P.compareDocumentPosition(Q)&16);}else{if(Q.nodeType){return !!this.getAncestorBy(Q,function(R){return R==P;});}}}return false;},inDocument:function(P){return this.isAncestor(M.documentElement,P);},getElementsBy:function(W,Q,R,T){Q=Q||"*";R=(R)?B.Dom.get(R):null||M;if(!R){return[];}var S=[],V=R.getElementsByTagName(Q);for(var U=0,P=V.length;U<P;++U){if(W(V[U])){S[S.length]=V[U];if(T){T(V[U]);}}}return S;},batch:function(T,W,V,R){T=(T&&(T.tagName||T.item))?T:B.Dom.get(T);if(!T||!W){return false;}var S=(R)?V:window;if(T.tagName||T.length===undefined){return W.call(S,T,V);}var U=[];for(var Q=0,P=T.length;Q<P;++Q){U[U.length]=W.call(S,T[Q],V);}return U;},getDocumentHeight:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollHeight:M.documentElement.scrollHeight;var P=Math.max(Q,B.Dom.getViewportHeight());return P;},getDocumentWidth:function(){var Q=(M.compatMode!="CSS1Compat")?M.body.scrollWidth:M.documentElement.scrollWidth;var P=Math.max(Q,B.Dom.getViewportWidth());return P;},getViewportHeight:function(){var P=self.innerHeight;
var Q=M.compatMode;if((Q||G)&&!C){P=(Q=="CSS1Compat")?M.documentElement.clientHeight:M.body.clientHeight;}return P;},getViewportWidth:function(){var P=self.innerWidth;var Q=M.compatMode;if(Q||G){P=(Q=="CSS1Compat")?M.documentElement.clientWidth:M.body.clientWidth;}return P;},getAncestorBy:function(P,Q){while(P=P.parentNode){if(D(P,Q)){return P;}}return null;},getAncestorByClassName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return B.Dom.hasClass(S,P);};return B.Dom.getAncestorBy(Q,R);},getAncestorByTagName:function(Q,P){Q=B.Dom.get(Q);if(!Q){return null;}var R=function(S){return S.tagName&&S.tagName.toUpperCase()==P.toUpperCase();};return B.Dom.getAncestorBy(Q,R);},getPreviousSiblingBy:function(P,Q){while(P){P=P.previousSibling;if(D(P,Q)){return P;}}return null;},getPreviousSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getPreviousSiblingBy(P);},getNextSiblingBy:function(P,Q){while(P){P=P.nextSibling;if(D(P,Q)){return P;}}return null;},getNextSibling:function(P){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getNextSiblingBy(P);},getFirstChildBy:function(P,R){var Q=(D(P.firstChild,R))?P.firstChild:null;return Q||B.Dom.getNextSiblingBy(P.firstChild,R);},getFirstChild:function(P,Q){P=B.Dom.get(P);if(!P){return null;}return B.Dom.getFirstChildBy(P);},getLastChildBy:function(P,R){if(!P){return null;}var Q=(D(P.lastChild,R))?P.lastChild:null;return Q||B.Dom.getPreviousSiblingBy(P.lastChild,R);},getLastChild:function(P){P=B.Dom.get(P);return B.Dom.getLastChildBy(P);},getChildrenBy:function(Q,S){var R=B.Dom.getFirstChildBy(Q,S);var P=R?[R]:[];B.Dom.getNextSiblingBy(R,function(T){if(!S||S(T)){P[P.length]=T;}return false;});return P;},getChildren:function(P){P=B.Dom.get(P);if(!P){}return B.Dom.getChildrenBy(P);},getDocumentScrollLeft:function(P){P=P||M;return Math.max(P.documentElement.scrollLeft,P.body.scrollLeft);},getDocumentScrollTop:function(P){P=P||M;return Math.max(P.documentElement.scrollTop,P.body.scrollTop);},insertBefore:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}return P.parentNode.insertBefore(Q,P);},insertAfter:function(Q,P){Q=B.Dom.get(Q);P=B.Dom.get(P);if(!Q||!P||!P.parentNode){return null;}if(P.nextSibling){return P.parentNode.insertBefore(Q,P.nextSibling);}else{return P.parentNode.appendChild(Q);}},getClientRegion:function(){var R=B.Dom.getDocumentScrollTop(),Q=B.Dom.getDocumentScrollLeft(),S=B.Dom.getViewportWidth()+Q,P=B.Dom.getViewportHeight()+R;return new B.Region(R,S,P,Q);}};var H=function(){if(M.documentElement.getBoundingClientRect){return function(Q){var R=Q.getBoundingClientRect();var P=Q.ownerDocument;return[R.left+B.Dom.getDocumentScrollLeft(P),R.top+B.Dom.getDocumentScrollTop(P)];};}else{return function(R){var S=[R.offsetLeft,R.offsetTop];var Q=R.offsetParent;var P=(L&&B.Dom.getStyle(R,"position")=="absolute"&&R.offsetParent==R.ownerDocument.body);if(Q!=R){while(Q){S[0]+=Q.offsetLeft;S[1]+=Q.offsetTop;if(!P&&L&&B.Dom.getStyle(Q,"position")=="absolute"){P=true;}Q=Q.offsetParent;}}if(P){S[0]-=R.ownerDocument.body.offsetLeft;S[1]-=R.ownerDocument.body.offsetTop;}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(Q.scrollTop||Q.scrollLeft){if(!E.OP_SCROLL.test(B.Dom.getStyle(Q,"display"))){if(!C||B.Dom.getStyle(Q,"overflow")!=="visible"){S[0]-=Q.scrollLeft;S[1]-=Q.scrollTop;}}}Q=Q.parentNode;}return S;};}}();})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.1",build:"984"});
/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.5.1
*/
YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var D=this.subscribers.length;if(!D&&this.silent){return true;}var H=[].slice.call(arguments,0),F=true,C,I=false;if(!this.silent){}var B=this.subscribers.slice();for(C=0;C<D;++C){var K=B[C];if(!K){I=true;}else{if(!this.silent){}var J=K.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var A=null;if(H.length>0){A=H[0];}try{F=K.fn.call(J,A,K.obj);}catch(E){this.lastError=E;}}else{try{F=K.fn.call(J,this.type,H,K.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}return true;},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L<K.length;L=L+1){F.push({id:K[L],fn:M,obj:Q,override:O,checkReady:N});}C=this.POLL_RETRYS;this.startInterval();},onContentReady:function(M,K,N,L){this.onAvailable(M,K,N,L,true);},onDOMReady:function(K,M,L){if(this.DOMReady){setTimeout(function(){var N=window;if(L){if(L===true){N=M;}else{N=L;}}K.call(N,"DOMReady",[],M);},0);}else{this.DOMReadyEvent.subscribe(K,M,L);}},addListener:function(M,K,V,Q,L){if(!V||!V.call){return false;}if(this._isValidCollection(M)){var W=true;for(var R=0,T=M.length;R<T;++R){W=this.on(M[R],K,V,Q,L)&&W;}return W;}else{if(YAHOO.lang.isString(M)){var P=this.getEl(M);if(P){M=P;}else{this.onAvailable(M,function(){YAHOO.util.Event.on(M,K,V,Q,L);});return true;}}}if(!M){return false;}if("unload"==K&&Q!==this){J[J.length]=[M,K,V,Q,L];return true;}var Y=M;if(L){if(L===true){Y=Q;}else{Y=L;}}var N=function(Z){return V.call(Y,YAHOO.util.Event.getEvent(Z,M),Q);};var X=[M,K,V,N,Y,Q,L];var S=I.length;I[S]=X;if(this.useLegacyEvent(M,K)){var O=this.getLegacyIndex(M,K);if(O==-1||M!=G[O][0]){O=G.length;B[M.id+K]=O;G[O]=[M,K,M["on"+K]];E[O]=[];M["on"+K]=function(Z){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(Z),O);};}E[O].push(X);}else{try{this._simpleAdd(M,K,N,false);}catch(U){this.lastError=U;this.removeListener(M,K,V);return false;}}return true;},fireLegacyEvent:function(O,M){var Q=true,K,S,R,T,P;S=E[M].slice();for(var L=0,N=S.length;L<N;++L){R=S[L];if(R&&R[this.WFN]){T=R[this.ADJ_SCOPE];P=R[this.WFN].call(T,O);Q=(Q&&P);}}K=G[M];if(K&&K[2]){K[2](O);}return Q;},getLegacyIndex:function(L,M){var K=this.generateId(L)+M;if(typeof B[K]=="undefined"){return -1;}else{return B[K];}},useLegacyEvent:function(L,M){if(this.webkit&&("click"==M||"dblclick"==M)){var K=parseInt(this.webkit,10);if(!isNaN(K)&&K<418){return true;}}return false;},removeListener:function(L,K,T){var O,R,V;if(typeof L=="string"){L=this.getEl(L);}else{if(this._isValidCollection(L)){var U=true;for(O=L.length-1;O>-1;O--){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=J.length-1;O>-1;O--){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J.splice(O,1);return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O<R;++O){V=M[O];if(V&&V[this.EL]==L&&V[this.TYPE]==K&&V[this.FN]==T){M.splice(O,1);break;}}}}else{try{this._simpleRemove(L,K,P[this.WFN],false);}catch(S){this.lastError=S;return false;}}delete I[Q][this.WFN];delete I[Q][this.FN];I.splice(Q,1);return true;},getTarget:function(M,L){var K=M.target||M.srcElement;return this.resolveTextNode(K);},resolveTextNode:function(L){try{if(L&&3==L.nodeType){return L.parentNode;}}catch(K){}return L;},getPageX:function(L){var K=L.pageX;if(!K&&0!==K){K=L.clientX||0;if(this.isIE){K+=this._getScrollLeft();}}return K;},getPageY:function(K){var L=K.pageY;if(!L&&0!==L){L=K.clientY||0;if(this.isIE){L+=this._getScrollTop();}}return L;},getXY:function(K){return[this.getPageX(K),this.getPageY(K)];},getRelatedTarget:function(L){var K=L.relatedTarget;
if(!K){if(L.type=="mouseout"){K=L.toElement;}else{if(L.type=="mouseover"){K=L.fromElement;}}}return this.resolveTextNode(K);},getTime:function(M){if(!M.time){var L=new Date().getTime();try{M.time=L;}catch(K){this.lastError=K;return L;}}return M.time;},stopEvent:function(K){this.stopPropagation(K);this.preventDefault(K);},stopPropagation:function(K){if(K.stopPropagation){K.stopPropagation();}else{K.cancelBubble=true;}},preventDefault:function(K){if(K.preventDefault){K.preventDefault();}else{K.returnValue=false;}},getEvent:function(M,K){var L=M||window.event;if(!L){var N=this.getEvent.caller;while(N){L=N.arguments[0];if(L&&Event==L.constructor){break;}N=N.caller;}}return L;},getCharCode:function(L){var K=L.keyCode||L.charCode||0;if(YAHOO.env.ua.webkit&&(K in D)){K=D[K];}return K;},_getCacheIndex:function(O,P,N){for(var M=0,L=I.length;M<L;M=M+1){var K=I[M];if(K&&K[this.FN]==N&&K[this.EL]==O&&K[this.TYPE]==P){return M;}}return -1;},generateId:function(K){var L=K.id;if(!L){L="yuievtautoid-"+A;++A;K.id=L;}return L;},_isValidCollection:function(L){try{return(L&&typeof L!=="string"&&L.length&&!L.tagName&&!L.alert&&typeof L[0]!=="undefined");}catch(K){return false;}},elCache:{},getEl:function(K){return(typeof K==="string")?document.getElementById(K):K;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(L){if(!H){H=true;var K=YAHOO.util.Event;K._ready();K._tryPreloadAttach();}},_ready:function(L){var K=YAHOO.util.Event;if(!K.DOMReady){K.DOMReady=true;K.DOMReadyEvent.fire();K._simpleRemove(document,"DOMContentLoaded",K._ready);}},_tryPreloadAttach:function(){if(F.length===0){C=0;clearInterval(this._interval);this._interval=null;return ;}if(this.locked){return ;}if(this.isIE){if(!this.DOMReady){this.startInterval();return ;}}this.locked=true;var Q=!H;if(!Q){Q=(C>0&&F.length>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=F.length;L<K;L=L+1){O=F[L];if(O){N=this.getEl(O.id);if(N){if(O.checkReady){if(H||N.nextSibling||!Q){M.push(O);F[L]=null;}}else{R(N,O);F[L]=null;}}else{P.push(O);}}}for(L=0,K=M.length;L<K;L=L+1){O=M[L];R(this.getEl(O.id),O);}C--;if(Q){for(L=F.length-1;L>-1;L--){O=F[L];if(!O||!O.id){F.splice(L,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N<K;++N){this.purgeElement(M.childNodes[N],P,R);}}},getListeners:function(M,K){var P=[],L;if(!K){L=[I,J];}else{if(K==="unload"){L=[J];}else{L=[I];}}var R=(YAHOO.lang.isString(M))?this.getEl(M):M;for(var O=0;O<L.length;O=O+1){var T=L[O];if(T){for(var Q=0,S=T.length;Q<S;++Q){var N=T[Q];if(N&&N[this.EL]===R&&(!K||K===N[this.TYPE])){P.push({type:N[this.TYPE],fn:N[this.FN],obj:N[this.OBJ],adjust:N[this.OVERRIDE],scope:N[this.ADJ_SCOPE],index:Q});}}}}return(P.length)?P:null;},_unload:function(Q){var K=YAHOO.util.Event,N,M,L,P,O,R=J.slice();for(N=0,P=J.length;N<P;++N){L=R[N];if(L){var S=window;if(L[K.ADJ_SCOPE]){if(L[K.ADJ_SCOPE]===true){S=L[K.UNLOAD_OBJ];}else{S=L[K.ADJ_SCOPE];}}L[K.FN].call(S,K.getEvent(Q,L[K.EL]),L[K.UNLOAD_OBJ]);R[N]=null;L=null;S=null;}}J=null;if(I){for(M=I.length-1;M>-1;M--){L=I[M];if(L){K.removeListener(L[K.EL],L[K.TYPE],L[K.FN],M);}}L=null;}G=null;K._simpleRemove(window,"unload",K._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;
/* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */
if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);
I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}return false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(J,I){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(J.shiftKey==F.shift&&J.altKey==F.alt&&J.ctrlKey==F.ctrl){var G;if(F.keys instanceof Array){for(var H=0;H<F.keys.length;H++){G=F.keys[H];if(G==J.charCode){D.fire(J.charCode,J);break;}else{if(G==J.keyCode){D.fire(J.keyCode,J);break;}}}}else{G=F.keys;if(G==J.charCode){D.fire(J.charCode,J);}else{if(G==J.keyCode){D.fire(J.keyCode,J);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=true;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.util.KeyListener.KEY={ALT:18,BACK_SPACE:8,CAPS_LOCK:20,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,META:224,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PRINTSCREEN:44,RIGHT:39,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,UP:38};YAHOO.register("event",YAHOO.util.Event,{version:"2.5.1",build:"984"});
function selectText(field) {
	field.select();
}

function CheckNumeric(event,obj) {

	 var code = (event.which) ? event.which : event.keyCode;
    var character = String.fromCharCode(code);
 //alert(code)
 if (code == 8 || code == 9 || code ==13) {
 	return true;
 }
    if ((code >= 48 && code <= 57) || code == 32)
    { // check digits
 
       return true;
    }
     else if (code == 8)
    { // Allow backspace
      return true;
    }
    else if (code ==13)
    { // Allow directional arrows
      return true;
    }
 
    return false;
}

// displays supplementary questions pertaining to Question 3 - Do you intend to continue to supply Fonterra in the next three years			
function showSupplementaryQuestion3(elementId) {
	
	var element = elementId.value;
	var supplementaryQuestions = document.getElementById("displayPanel");
	
	if (element == "1") {
		supplementaryQuestions.style.visibility='hidden';
	} else {
		supplementaryQuestions.style.visibility='visible';
	}
}

// displays supplementary questions pertaining to Question 
function showSupplementary1(elementId) {
	var supplementaryQuestions1 = document.getElementById("radio1_supp");
	
	if (elementId.value == "1") {
		supplementaryQuestions1.style.visibility='hidden';
	} else {
		supplementaryQuestions1.style.visibility='visible';
	}
}

function showSupplementary2(elementId) {

	var supplementaryQuestions2 = document.getElementById("radio3_supp");
	
	if (elementId.value == "1") {
		supplementaryQuestions2.style.visibility='hidden';
	} else {
		supplementaryQuestions2.style.visibility='visible';
	}
}




  
  	
  
        
 
