var bPageIsLoaded = false;
/***********************************************************************
*
* setCookie -	Generic Set Cookie routine
*
* Input: sName	 -	Name of cookie to create
*	 sValue	 -	Value to assign to the cookie
*	 sExpire -	Cookie expiry date/time (optional)
*
* Returns: null
*
************************************************************************/

function setCookie(sName, sValue, sExpire) 
    {
    var sCookie = sName + "=" + escape(sValue) +"; path=/";	// construct the cookie
    if (sExpire)
    	{
    	sCookie += "; expires=" + sExpire.toGMTString();	// add expiry date if present
    	}
    document.cookie = sCookie;					// store the cookie
    return null;
    }

/***********************************************************************
*
* getCookie	-	Generic Get Cookie routine
*
* Input: sName	-	Name of cookie to retrieve
*
* Returns:		Requested cookie or null if not found
*
************************************************************************/

function getCookie(sName) 
    {
    var sCookiecrumbs = document.cookie.split("; "); 	// break cookie into crumbs array
    var sNextcrumb
    for (var i=0; i < sCookiecrumbs.length; i++) 
	{
	sNextcrumb = sCookiecrumbs[i].split("=");	// break into name and value
	if (sNextcrumb[0] == sName)			// if name matches
	    {
	     return unescape(sNextcrumb[1]); 		// return value
	    }
	}
	return null;
    }

/***********************************************************************
*
* saveReferrer -	Saves the referrer to a Cookie
*
* Input: 		nothing
*
* Returns:		null
*
************************************************************************/

function saveReferrer() 
    {
	if ( window.name == 'ActPopup' ) return;	// don't save if on popup page	
    var bSetCookie = false;
    if (parent.frames.length == 0)					// No FrameSet
		{
		bSetCookie = true;
		}
    else														// FrameSet in use
		{
		var bCatalogFrameSet = false;
		for (var nFrameId = parent.frames.length; nFrameId > 0; nFrameId--)
			{
			if (parent.frames[nFrameId - 1].name == 'CatalogBody')	// Catalog FrameSet used
				{
				bCatalogFrameSet = true;
				break;
				}
			}
		if (bCatalogFrameSet)							// Catalog FrameSet
			{
			if (window.name=='CatalogBody')			// and this is the CatalogBody frame
				{
				bSetCookie = true;
				}
			}
		else													// Not Catalog FrameSet
			{
			bSetCookie = true;
			}
		}
    if (bSetCookie)
		{
		var sUrl = document.URL;
		var nHashPos = sUrl.lastIndexOf("#");		// Look for URL anchor
		if (nHashPos > 0)									// if it exists
		    {
		    sUrl = sUrl.substring(0,nHashPos);		// then remove it
		    }
		setCookie("ACTINIC_REFERRER", sUrl);		// Emulates HTTP_REFERER
		}
	    return null;
	    }

/***********************************************************************
*
* CreateArray	creates an array with n elements
*
* Input: n	-	number of elements
*
* Returns:		the created array
*
************************************************************************/

function CreateArray(n)
	{
	this.length = n;
	for (var i=1; i <= n; i++)							// for all ns
		{
		this[i] = new Section();						// create a section structure
		}
	return this;											// return the created array
	}

/***********************************************************************
*
* Section	-	creates the section structure for raw section lists
*
* Input: 				nothing
*
* Returns:				nothing
************************************************************************/

function Section()
	{
	this.sURL = null;
	this.sName = null;
	this.sImage = null;
	this.nImageWidth = null;
	this.nImageHeight= null;
	this.nSectionId	= null;
	this.pChild = null;
	}
	
/***********************************************************************
*
* SwapImage			-	swaps an image to the alternative
*
* Input:	sName		-	name of the image
*
*			sAltImage	-	filename of the alternative image
*
************************************************************************/

function SwapImage(sName, sAltImage)
	{
	var nCount = 0;
	document.aSource = new Array;						// array for images
	if (document[sName] != null)						// if image name exists
		{
		document.aSource[nCount++] = document[sName];	// store image
		if(null == document[sName].sOldSrc)
			{
			document[sName].sOldSrc = document[sName].src;	// store image source
			}
		document[sName].src = sAltImage;				// change image source to alternative
		}
	}

/***********************************************************************
*
* RestoreImage		-	restores an image to the original
*
* Input: 				nothing
*
* Returns:				nothing
************************************************************************/

function RestoreImage()
	{
	var nCount, aSource = document.aSource;
	if (aSource != null)									// if array of images exists
		{
		for(nCount=0; nCount < aSource.length; nCount++)	// restore all images
			{
			if ((aSource[nCount] != null) &&
				(aSource[nCount].sOldSrc != null))	// if we stored something for this image
				{
				aSource[nCount].src = aSource[nCount].sOldSrc;	// restore the original image
				}
			}
		}
	}

/***********************************************************************
*
* PreloadImages		-	restores an image to the original
*
* Input: 				nothing
*
* Returns:				nothing
*
************************************************************************/

function PreloadImages()
	{
	bPageIsLoaded = true;
	if(document.images)
		{
		if(!document.Preloaded)							// preload array defined?
			{
			document.Preloaded = new Array();		// no, define it
			}
		var nCounter , nLen = document.Preloaded.length, saArguments = PreloadImages.arguments;
		for(nCounter = 0; nCounter < saArguments.length; nCounter++)	// iterate through arguments
			{
			document.Preloaded[nLen] = new Image;
			document.Preloaded[nLen++].src = saArguments[nCounter];
			}
   	}
	}
	
/***********************************************************************
*
* ShowPopUp		-	creates pop up window
*
* Input: sUrl		-	URL o page to display
*			nWidth	-	Width of window
*			nHeight	-	Height of window
*
* Returns:				nothing
*
************************************************************************/

function ShowPopUp(sUrl, nWidth, nHeight)
  	{  
	window.open(sUrl, 'ActPopup', 'width=' + nWidth + ',height=' + nHeight + ',scrollbars, resizable').focus();
	if (!bPageIsLoaded)
		{
		window.location.reload(true);
		}
	}

/***********************************************************************
*
* DecodeMail		-	decodes the obfuscated mail address in 'contactus' link
*
* Input: 				nothing
*
* Returns:				nothing
*
************************************************************************/

function DecodeMail()
	{
	var nIdx = 0;
	for( ; nIdx < document.links.length; nIdx++ )
		if ( document.links[ nIdx ].name == "contactus" )
		{
		var sOldRef = document.links[ nIdx ].href;

		while( sOldRef.indexOf( " [dot] " ) != -1 )
			sOldRef = sOldRef.replace( " [dot] ", "." );
			
		while( sOldRef.indexOf( " [at] " ) != -1 )
			sOldRef = sOldRef.replace( " [at] ", "@" );
			
		document.links[ nIdx ].href = sOldRef;
		}
	}

/***********************************************************************
*
* HtmlInclude		-	Parses the page for <a href> tags and if any found 
*							with rel="fragment" attribute then create an XMLHTTP
*							request to download the referenced file and insert the
*							file content in place of the referring tag.
*							In case of error just leave it as is.
*
*	NOTE: this function is automatically attached to the onload event handler
*	therefore this processing is done on all pages where this js file is included.
*
* Returns:				nothing
*
* Author:				Zoltan Magyar
*
************************************************************************/

function HtmlInclude() 
	{ 
	var req;
	//
	// Check browser type
	//
	if (typeof(XMLHttpRequest) == "undefined") 	// IE
		{ 
		try 
			{ 
			req = new ActiveXObject("Msxml2.XMLHTTP"); 
			} 
		catch(e) 
			{ 
			try 
				{ 
				req = new ActiveXObject("Microsoft.XMLHTTP"); 
				} 
			catch(e) 										// no luck?
				{ 
				return; 										// nothing to do then
				} 
			} 
		} 
	else 														// Mozzila
		{  
		req = new XMLHttpRequest(); 
		} 
	//
	// Get <a href> tags and iterate on them
	//
	var tags = document.getElementsByTagName("A"); 
	var i; 
	for (i = 0; i < tags.length; i++) 
		{ 
		//
		// Check if we got "fragment" as rel attribute
		//
		if (tags[i].getAttribute("rel") == "fragment") 
			{
			try
				{
				//
				// Try to pull the referenced file from the server
				//
				req.open('GET', tags[i].getAttribute("href"), false); 
				if (document.characterSet) 
					{
					req.overrideMimeType("text/html; charset=" + document.characterSet);
					}
				req.send(null); 
				if (req.status == 200) 					// got the content?
					{ 
					//
					// Replace the reference with the pulled in content
					//
					var span = document.createElement("SPAN"); 
					span.innerHTML = req.responseText; 
					tags[i].parentNode.replaceChild(span, tags[i]);
					} 
				}
			catch(e)											// couldn't pull it from the server (maybe preview)
				{
				return;										// don't do anything then
				}
			} 
		} 
	} 

//
// The following lines will automatically parse all the pages 
// where this script is included by attaching the HtmlInclude
// function to the onload event.
//
if (window.attachEvent) 								// IE 
	{ 
	window.attachEvent("onload", HtmlInclude); 
	} 
else 															// DOM
	{  
	window.addEventListener("load", HtmlInclude, false); 
	}
	
// Bookmark
//
	function bookmark(url, description)
	{
	netscape="Netscape User's hit CTRL+D to add a bookmark to this site."
	if (navigator.appName=='Microsoft Internet Explorer')
	{
	window.external.AddFavorite(url, description);
	}
	else if (navigator.appName=='Netscape')
	{
	alert(netscape);
	}
	}
// End Bookmark


//***********************************************************************
// format		-	formats user input

function format(el,f){

var exclude=['Macclesfield','USA'];

if (!el.value) return false;
var str=el.value;
if (f=="cc"){
	var chr=" ";
	str=str.replace(/[^\d]/gi,"");
	str=str.substring(0,4)+chr+str.substring(4,8)+chr+str.substring(8,12)+chr+str.substring(12,str.length);
	}
else if (f=="upper") str=el.value.toUpperCase();
else if (f=="postcode" && isNaN(el.value)){
	str=(str.split(" ")).join("");
	str=str.substring(0,(str.length-3))+" "+str.substring((str.length-3),str.length)
	str=str.toUpperCase();
	}
else if (f=="lower") str=el.value.toLowerCase();
else if (f=="capitals"){
	str=str.toLowerCase();
	var arr=str.match(/(^.|\s.)/gi);
	for (var i=0;i<arr.length;i++) str=str.replace(arr[i],arr[i].toUpperCase());
	str=str.split(" ");
	for (var i=0;i<str.length;i++){
		index=has(exclude,str[i],1);
		if (index===false){
			var arr=str[i].match(/(-(.)|Mc(.)|Mac(.)|O'(.))/g);
			if (arr){
				for (var j=0;j<arr.length;j++){
					str[i]=str[i].replace(arr[j],arr[j].substring(0,arr[j].length-1)+(arr[j].substring(arr[j].length-1,arr[j].length)).toUpperCase());
					}
				}
			}
		else{
			str[i]=exclude[index];
			}
		}
	str=str.join(" ");
	}
el.value=str;

function has(a,v,m){
for (var i=0;i<a.length;i++){
	if (a[i].toLowerCase()===v.toLowerCase()) return (m ? i : true);
	}
return false;
}
}

// clear cart after cancel button

function createCookie(name,value,days) {
   if (days)
   {
      var date = new Date();
      date.setTime(date.getTime()+(days*24*60*60*1000));
      var expires = "; expires="+date.toGMTString();
   }
   else var expires = "";
   document.cookie = name+"="+value+expires+"; path=/";
}

function CancelOrder() {
   if (confirm('This will clear your order and address details completely.\nClick "View Cart" to change your order.\nDo you wish to proceed?') == true)
   {
      createCookie("ACTINIC_CART","",-2);
      createCookie("CART_CONTENT","",-2);
      createCookie("CART_COUNT","",-2);
      createCookie("CART_TOTAL","",-2);
      createCookie("ACTINIC_BUSINESS","",-2);
      createCookie("ACTINIC_REFERRER","",-2);
      window.location.href = 'http://www.baby-cares.co.uk';
   }
}

// end input case

// Google Analytics
//var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
//document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga" + "." + "js' //type='text/javascript'%3E%3C/script%3E"));




function IsAllDefined(){for(var i=0;i<arguments.length;++i){if(typeof(arguments[i])=='undefined')return false}return true}
function GetWinH(){var h=0;var a=0;if(((!document.compatMode||document.compatMode=='CSS1Compat')&&!window.opera)&&document.documentElement)a=document.documentElement;else if(document.body)a=document.body;if(a&&a.clientHeight)h=a.clientHeight;else if(IsAllDefined(window.innerWidth,window.innerHeight,document.width)){h=window.innerHeight;if(document.width>window.innerWidth)h=h-15}return h}
function GetWinW(){var w=0;var a=0;if(((!document.compatMode||document.compatMode=='CSS1Compat')&&!window.opera)&&document.documentElement)a=document.documentElement;else if(document.body)a=document.body;if(a&&a.clientWidth)w=a.clientWidth;else if(IsAllDefined(window.innerWidth,window.innerHeight,document.height)){w=window.innerWidth;if(document.height>window.innerHeight)w=w-15}return w}
function GetObjectRect(a){var x=0;var y=0;var o=a;while(a&&a!=null){x+=parseInt(isNS4?a.pageX:a.offsetLeft);y+=parseInt(isNS4?a.pageY:a.offsetTop);if(isNS4){if(a.style&&(a.style.position=='absolute'||a.style.position=='relative'))break}a=a.offsetParent}a=o;var w=0;var h=0;if(isOp&&!isOp7)w=a.style.pixelWidth;else if(isNS4)w=a.clip.width;else w=a.offsetWidth;if(isOp&&!isOp7)h=a.style.pixelHeight;else if(isNS4)h=a.clip.height;else h=a.offsetHeight;return{'x':x,'y':y,'w':w,'h':h}}
function LoadSrcImage(a){var b=new Image();b.src=a;return b}
function GetBrowserInfo(){isDOM=document.getElementById;isMz=isDOM&&(navigator.appName=="Netscape");isOp=isDOM&&window.opera;isIE=document.all&&document.all.item&&!isOp;isNS4=document.layers;isOp7=isOp&&document.readyState}
function GetViewRect(){var y=0;var x=0;if(isNS4||isMz||isOp){x=window.pageXOffset;y=window.pageYOffset}else{var a=(document.compatMode=='CSS1Compat'&&!isMz)?document.documentElement:document.body;x=a.scrollLeft;y=a.scrollTop}return{'x':x,'y':y,'w':GetWinW(),'h':GetWinH()}}
function SetElemOpacity(a,b){if(a&&a.style){if(b==1){a.style.opacity=(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null;if(/MSIE/.test(navigator.userAgent))if(a.style['filter'])a.style['filter']=a.style['filter'].replace(/alpha\([^\)]*\)/gi,'')}else{if(b<0.00001)b=0;a.style['opacity']=b;if(/MSIE/.test(navigator.userAgent)){a.style['filter']=(a.style['filter']?a.style['filter'].replace(/alpha\([^\)]*\)/gi,''):'')+'alpha(opacity='+b*100+')'}}}}
function ebmCreateMenuDiv(a,b){var c=document.createElement('div');c.id=a;c.className=b;c.style.position='absolute';c.style.left='0px';c.style.top='0px';if(ebmFadeEffect)SetElemOpacity(c,0);else if(cbnMenuAlpha)SetElemOpacity(c,cbnMenuAlpha);c.ebmFadeEffect=ebmFadeEffect;c.cbnMenuAlpha=cbnMenuAlpha;return c}
function ebmCreateShadowDiv(a,b){var c=ebmCreateMenuDiv(a,b);if(ebmFadeEffect)SetElemOpacity(c,0);else if(cbnMenuAlpha)SetElemOpacity(c,cbnMenuAlpha/2);else SetElemOpacity(c,0.5);return c}
function ebmTickerOn(a){for(var m=a;m;m=m.openSubmenuDiv)if(!m.ticker&&m.id)m.ticker=setTimeout('ebmRemoveSubmenu("'+m.id+'");',350)}
function ebmTickerOff(a){for(var m=a;m;m=m.upperTR?m.upperTR.menuDiv:0)if(m.ticker)m.ticker=clearTimeout(m.ticker)}
function ebmMenuPosY(a,b,c,d,H,e){var f=5;var y=c;var g=H;var h=e;if(g>b-2*f&&b>0){y=f+a;g=b-2*f}else{if(h==-1)y=c+d-g;else y=c;if(y<a+f){y=a+f;h=1}if(y+H>b+a-f&&b>0){y-=y+g-(b+a-f);h=-1}}return{'y':y,'direction':h,'size':g}}
function ebmMenuPosX(a,b,c,d,W,e){var f=5;var x=c;var g=W;var h=e;if(((h>=0)&&(c+d+W>b+a-f))||((h<0)&&(c-W<f))){if(c-a>b+a-(c+d)&&b>0)h=-1;else h=1}if(h>=0){x=c+d;if(b+a-f-x<g&&b>0)g=b+a-f-x}else{x=c-g;if(x-a<f){x=a+f;g=c-(a+f)}}return{'x':x,'direction':h,'size':g}}
function ebmFade(a){var m=document.getElementById(a);if(m){m.cbnOpacity+=0.1;SetElemOpacity(m,m.cbnOpacity);if(m.shadowDiv1&&m.shadowDiv2){var b=m.cbnOpacity/2;SetElemOpacity(m.shadowDiv1,b);SetElemOpacity(m.shadowDiv2,b)}if(m.ebmFadeTimer){clearTimeout(m.ebmFadeTimer);m.ebmFadeTimer=null;if(m.cbnOpacity<(m.cbnMenuAlpha?m.cbnMenuAlpha:1)){var c='ebmFade("'+a+'");';if(!m.ebmFadeTimer)m.ebmFadeTimer=setTimeout(c,20)}}}}
function ebmDisplaySubmenu(a,b,c){var m=document.getElementById(a);if(m&&m.style){if(m.style.visibility=='visible'){ebmTickerOff(m);return}m.style.left='0px';m.style.top='0px';m.style.height='auto';m.style.width='auto';if(!m.depth&&(cbnOpenTopMenu!=m))ebmRemoveSubmenu(cbnOpenTopMenu.id);if(b&&b.menuDiv&&b.menuDiv.openSubmenuDiv)ebmRemoveSubmenu(b.menuDiv.openSubmenuDiv.id);if(m.depth>0){m.cbnDirectionX=m.upperTR.menuDiv.cbnDirectionX;m.cbnDirectionY=m.upperTR.menuDiv.cbnDirectionY}else{m.cbnDirectionX=1;m.cbnDirectionY=1}m.style.overflow='visible';var p=b;if(p.tagName&&p.tagName.toLowerCase()=='a')p=p.parentNode;var d=GetObjectRect(p);var e=GetObjectRect(m);var f=GetViewRect();var g;if(c){g=ebmMenuPosY(f.y,f.h,d.y,d.h,e.h,m.cbnDirectionY)}else{g=ebmMenuPosX(f.y,f.h,d.y,d.h,e.h,m.cbnDirectionY);g.y=g.x}m.cbnDirectionY=g.direction;if(g.size<e.h&&g.size>0){if(isOp&&!m.OrigWidth)m.OrigWidth=m.clientWidth;m.style.overflow='auto';if(isIE){m.style.width=(m.offsetWidth+18)+'px';m.style.overflowX='visible'}else if(isMz)m.style.marginRight=20;m.style.height=g.size+'px';m.scrollTop=0;m.scrollLeft=0;if(isOp)m.style.width=m.OrigWidth+'px'}m.style.top=g.y-e.y+'px';var h=g.y-e.y;e=GetObjectRect(m);if(c){g=ebmMenuPosX(f.x,f.w,d.x,d.w,e.w,m.cbnDirectionX)}else{g=ebmMenuPosY(f.x,f.w,d.x,d.w,e.w,m.cbnDirectionX);g.x=g.y}m.cbnDirectionX=g.direction;if((g.size<e.w)&&(m.cbnDirectionX>0))g.x=g.x-(e.w-g.size);m.style.left=g.x-e.x+'px';var i=g.x-e.x;if(m.ebmFadeEffect){if(!m.ebmFadeTimer){var j='ebmFade("'+a+'");';m.cbnOpacity=0;m.ebmFadeTimer=setTimeout(j,20)}}if(!m.depth){cbnOpenTopMenu=m}else{b.menuDiv.openSubmenuDiv=m;b.MakeExpanded()}if(m.shadowDiv1&&m.shadowDiv1.style&&m.shadowDiv2&&m.shadowDiv2.style){e=GetObjectRect(m);m.shadowDiv1.style.left=i+ShadowOffsetX+'px';m.shadowDiv1.style.top=h+e.h+'px';m.shadowDiv1.style.width=e.w+'px';m.shadowDiv1.style.height=ShadowOffsetY+'px';m.shadowDiv1.style.visibility='visible';m.shadowDiv2.style.left=i+e.w+'px';m.shadowDiv2.style.top=h+ShadowOffsetY+'px';m.shadowDiv2.style.width=ShadowOffsetX+'px';m.shadowDiv2.style.height=e.h-ShadowOffsetY+'px';m.shadowDiv2.style.visibility='visible'}m.style.visibility='visible'}}
function ebmRemoveSubmenu(a){var m=document.getElementById(a);if(m&&(m.style.visibility=='visible')){if(m.openSubmenuDiv){ebmRemoveSubmenu(m.openSubmenuDiv.id)}if(m.shadowDiv1&&m.shadowDiv1.style)m.shadowDiv1.style.visibility='hidden';if(m.shadowDiv2&&m.shadowDiv2.style)m.shadowDiv2.style.visibility='hidden';m.style.visibility='hidden';m.openSubmenuDiv=0;m.RemoveSelection();if(m.upperTR){m.upperTR.MakeNormal()}if(m.ticker){clearTimeout(m.ticker);m.ticker=null}if(m.ebmFadeEffect){SetElemOpacity(m,0);if(m.shadowDiv1&&m.shadowDiv2){SetElemOpacity(m.shadowDiv1,0);SetElemOpacity(m.shadowDiv2,0)}if(m.ebmFadeTimer){clearTimeout(m.ebmFadeTimer);m.ebmFadeTimer=null}}}}
function ebmGenerateTree(b,c,d,e){var f=document.getElementById('BtnMenuContainer'+ebmMenuName);var g=ebmCreateMenuDiv(b.id+'mdiv',e);f.appendChild(g);if(useShadow){var h=ebmCreateShadowDiv(b.id+'sdiv1',e+'_shadow');f.appendChild(h);g.shadowDiv1=h;h.style.zIndex=100+d*3;var l=ebmCreateShadowDiv(b.id+'sdiv2',e+'_shadow');f.appendChild(l);g.shadowDiv2=l;l.style.zIndex=101+d*3}g.upperTR=c;g.depth=d;g.openSubmenuDiv=0;g.style.zIndex=102+g.depth*3;g.RemoveSelection=function(){if(this.childNodes[0].rows){for(var i=0;i<this.childNodes[0].rows.length;i++){var a=this.childNodes[0].rows[i];if(a.tagName&&a.tagName.toLowerCase()=='tr'){a.className=a.className.replace('hot','')}}}};g.onmouseover=function(){meDoMouseOver(this)};g.onmouseout=function(){meDoMouseOut(this)};var m=document.createElement('table');g.appendChild(m);m.cellSpacing=0;var n=/^([a-zA-Z]*?\:\/\/)?[^\(\)\:]*?(\?.*)?$/;for(var j=0;j<b.childNodes.length;j++){var o=b.childNodes[j];if(o.tagName&&o.tagName.toLowerCase()=='li'){var p=m.insertRow(-1);p.menuDiv=g;p.MakeExpanded=function(){this.className=this.className+' expanded'};p.MakeNormal=function(){this.className=this.className.replace('expanded','')};p.className=o.className;var q=null;var r=null;var s=null;var t=null;for(var k=0;k<o.childNodes.length;k++){var u=o.childNodes[k];if(u.tagName&&u.tagName.toLowerCase()=='a'){s=u}else if(u.tagName&&u.tagName.toLowerCase()=='span'&&u.className&&u.className.substr(0,8)=='ebul_img'){if(!s){if(!r)r=u}}else if(u.tagName&&u.tagName.toLowerCase()=='img'){if(!s){if(!q)q=u}}else if(u.tagName&&u.tagName.toLowerCase()=='ul'){t=u}}if(s!=null||q!=null||r!=null||t!=null){var v=p.insertCell(-1);v.style.borderRightWidth='0px';v.style.paddingRight='2px';if(q)v.appendChild(q);else if(r)v.appendChild(r);else v.innerHTML='&nbsp;';var w=p.insertCell(-1);w.style.borderRightWidth='0px';w.style.borderLeftWidth='0px';w.style.paddingRight='4px';w.style.paddingLeft='4px';if(s){w.appendChild(s);if(s.href&&s.href.match(n)&&!s.target){p.rowClickLink=s.href;p.onclick=function(){window.location.href=this.rowClickLink;return false}}}else w.innerHTML='&nbsp;';var x=p.insertCell(-1);x.style.borderLeftWidth='0px';x.style.paddingLeft='4px';if(t){if(markerSymbol){x.innerHTML='<a style="text-decoration: none;">'+markerSymbol+'</a>'}else{x.innerHTML='&nbsp;'}p.cbnTRSubmenuId=ebmGenerateTree(t,p,d+1,e)}else{x.innerHTML='&nbsp;'}p.onmouseover=function(){this.menuDiv.RemoveSelection();this.className=this.className+' hot';if(this.cbnTRSubmenuId)ebmDisplaySubmenu(this.cbnTRSubmenuId,this,1);else if(this.menuDiv.openSubmenuDiv)ebmTickerOn(this.menuDiv.openSubmenuDiv)};p.onmouseout=function(){this.menuDiv.RemoveSelection()}}else{var y=p.insertCell(-1);var z=document.createElement('div');y.colSpan=3;y.appendChild(z)}}}return g.id}
function meDoMs(a){su=a.substring(0,a.length-1);if(document['ebb'+su])document['ebb'+su].src=window['ebb'+a].src;return false}
function meDoShow(a,b,c){var d='ebul_'+a+'mdiv';var m=document.getElementById(d);if(m&&m.style){ebmTickerOff(cbnOpenTopMenu);ebmDisplaySubmenu(d,c,b)}}
function meDoMouseOut(a){if(a)ebmTickerOn(cbnOpenTopMenu)}
function meDoMouseOver(a){if(a)ebmTickerOff(a)}
function InitEasyMenu(){GetBrowserInfo();var a=document.getElementsByTagName('img');for(var i=0;i<a.length;i++){if(a[i].id&&a[i].id.substring(0,4)=='cbi_'&&a[i].parentNode&&a[i].parentNode.tagName&&a[i].parentNode.tagName.toLowerCase()=='a'){var b=a[i].parentNode;var c=null;if(b.parentNode&&b.parentNode.parentNode&&b.parentNode.parentNode.parentNode&&b.parentNode.parentNode.parentNode.parentNode){c=b.parentNode.parentNode.parentNode.parentNode;if(!(c.tagName&&c.tagName.toLowerCase()=='table'))c=null}if(!c&&b.parentNode&&b.parentNode.parentNode){c=b.parentNode.parentNode;if(!(c.tagName&&c.tagName.toLowerCase()=='ul'))c=null}if(c){if(c.id==InitTable){b.buttonnumber=a[i].id.substring(4);b.ebmMenuDirection=ebmMenuDirection;b.onmouseover=function(){meDoMs(this.buttonnumber+"o");meDoShow(this.buttonnumber,this.ebmMenuDirection,this)};b.onmouseout=function(){meDoMs(this.buttonnumber+"n");meDoMouseOut(this)};b.onmouseup=function(){meDoMs(this.buttonnumber+"o")};b.onmousedown=function(){meDoMs(this.buttonnumber+"c")}}}}}document.write('<div id="BtnMenuContainer'+ebmMenuName+'"></div>');var d=document.getElementsByTagName('ul');for(var i=0;i<d.length;i++){if(d[i].id&&d[i].id.substring(0,5)=='ebul_'&&d[i].className.substring(0,5)=='ebul_'){ebmGenerateTree(d[i],0,0,d[i].className)}}}var cbnOpenTopMenu=0;ebbcbinsmenu_1n = LoadSrcImage('ebbtcbinsmenu1_0.gif');ebbcbinsmenu_1o = LoadSrcImage('ebbtcbinsmenu1_1.gif');ebbcbinsmenu_1c = LoadSrcImage('ebbtcbinsmenu1_2.gif');ebbcbinsmenu_2n = LoadSrcImage('ebbtcbinsmenu2_0.gif');ebbcbinsmenu_2o = LoadSrcImage('ebbtcbinsmenu2_1.gif');ebbcbinsmenu_2c = LoadSrcImage('ebbtcbinsmenu2_2.gif');ebbcbinsmenu_3n = LoadSrcImage('ebbtcbinsmenu3_0.gif');ebbcbinsmenu_3o = LoadSrcImage('ebbtcbinsmenu3_1.gif');ebbcbinsmenu_3c = LoadSrcImage('ebbtcbinsmenu3_2.gif');ebbcbinsmenu_4n = LoadSrcImage('ebbtcbinsmenu4_0.gif');ebbcbinsmenu_4o = LoadSrcImage('ebbtcbinsmenu4_1.gif');ebbcbinsmenu_4c = LoadSrcImage('ebbtcbinsmenu4_2.gif');ebbcbinsmenu_5n = LoadSrcImage('ebbtcbinsmenu5_0.gif');ebbcbinsmenu_5o = LoadSrcImage('ebbtcbinsmenu5_1.gif');ebbcbinsmenu_5c = LoadSrcImage('ebbtcbinsmenu5_2.gif');ebbcbinsmenu_6n = LoadSrcImage('ebbtcbinsmenu6_0.gif');ebbcbinsmenu_6o = LoadSrcImage('ebbtcbinsmenu6_1.gif');ebbcbinsmenu_6c = LoadSrcImage('ebbtcbinsmenu6_2.gif');ebbcbinsmenu_7n = LoadSrcImage('ebbtcbinsmenu7_0.gif');ebbcbinsmenu_7o = LoadSrcImage('ebbtcbinsmenu7_1.gif');ebbcbinsmenu_7c = LoadSrcImage('ebbtcbinsmenu7_2.gif');var markerSymbol = "&raquo;";var ShadowOffsetX = 2; var ShadowOffsetY = 2; var useShadow = false;var InitTable = "cbinsmenuebul_table";var cbnMenuAlpha = 0;var ebmFadeEffect = true;var ebmMenuDirection = 0;var ebmMenuName = "cbinsmenu";InitEasyMenu();