if(typeof Common_js_parsed=='undefined'){
function searchFocus(box){
box.value='';}
function searchTest(box,event){
if(document.all){
if(event.keyCode==13){
event.returnValue=false;
event.cancel=true;
searchGo(box.id);
return false;}}
else if(document.getElementById){
if(event.which==13){
event.returnValue=false;
event.cancel=true;
if(typeof event.preventDefault!='undefined')
event.preventDefault();
searchGo(box.id);
return false;}}
else if(document.layers){
if(event.which==13){
event.returnValue=false;
event.cancel=true;
searchGo(box.id);
return false;}}}
function searchBlur(box){
if(box.value=='')
box.value='Search';}

function bWindow(){
this.left=0;
this.windowOffsetLeft=0;
this.top=0;
this.windowOffsetTop=0;
this.width=0;
this.height=0;
this.windowTop=0;
this.windowLeft=0;
this.windowRight=0;
this.windowBottom=0;
this.init=function(){
if(!document.height){
this.height=document.body.offsetHeight;
this.width=document.body.offsetWidth;}else{
this.height=document.height;
this.width=document.width;}
if(typeof(window.innerWidth)=='number'){
this.windowRight=window.innerWidth;
this.windowBottom=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
this.windowRight=document.documentElement.clientWidth;
this.windowBottom=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
this.windowRight=document.body.clientWidth;
this.windowBottom=document.body.clientHeight;}
this.windowTop=0;
this.windowLeft=0;
if(typeof(window.pageYOffset)=='number'){
this.windowTop=window.pageYOffset;
this.windowLeft=window.pageXOffset;
this.windowBottom+=window.pageYOffset;
this.windowRight+=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
this.windowTop=document.body.scrollTop;
this.windowLeft=document.body.scrollLeft;
this.windowBottom+=document.body.scrollTop;
this.windowRight+=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
this.windowTop=document.documentElement.scrollTop;
this.windowLeft=document.documentElement.scrollLeft;
this.windowBottom+=document.documentElement.scrollTop;
this.windowRight+=document.documentElement.scrollLeft;}}}
function EkTbWebMenuPopUpWindow(url,hWind,nWidth,nHeight,nScroll,nResize){
if(nWidth>screen.width){
nWidth=screen.width;}
if(nHeight>screen.height){
nHeight=screen.height;}
var cToolBar='toolbar=0,location=0,directories=0,status='+nResize+',menubar=0,scrollbars='+nScroll+',resizable='+nResize+',width='+nWidth+',height='+nHeight;
var popupwin=window.open(url,hWind,cToolBar);
return popupwin;}
Common_js_parsed=true;}


if(typeof AtlasCommon_js_Parsed=='undefined'){
Infragistics=function(){}
Infragistics.UI=function(){}
Sys=function(){}
Sys.UI=function(){}
Sys.UI.Control=function(){}
var DEBUG=true;
var LOGGING=false;
var LOGGING_URL='';
Infragistics.WebClient=function(responseType,disposeOnComplete,timeout,errorCallback){
this.__http=null;
this.__callback=null;
this.__callbackParams=null;
this.__target=null;
this.__responseType=null;
this.__timeout=timeout&&!isNaN(timeout)?parseInt(timeout):15000;
this.__timeoutTimer=null;
this.__disposeOnComplete=disposeOnComplete==true;
this.__errorCallback=errorCallback;
if(typeof Infragistics.WebClient.__initialized=='undefined'){
Infragistics.WebClient.prototype.request=function(target,action,values,responseType){
return this.__doRequest(target,action,values,false,null,null,responseType);}
Infragistics.WebClient.prototype.beginRequest=function(target,callback,callbackParams,action,values,responseType){
this.__doRequest(target,action,values,true,callback,callbackParams,responseType);}
Infragistics.WebClient.prototype.__processResponse=function(){
if(this.__http.readyState==4){
this.__clearTimer();
try{
if(this.__http.status!=200){
this.__responseError();
if(this.__http.status!=0)
Infragistics.ExceptionHandling.handleException('Request to '+this.__target+' failed with status of '+this.__http.status+'.');
return;}
if(this.__callback){
var response=this.__getResponse();
var headers=this.__http.getAllResponseHeaders();
this.__callback(new Infragistics.WebClient.Response(response,headers,this.__callbackParams));}}catch(e){
this.__responseError();
Infragistics.ExceptionHandling.handleException('Error processing response.',e);}
finally{
if(this.__disposeOnComplete)
this.dispose();}}}
Infragistics.WebClient.prototype.__responseError=function(status,params){
if(this.__errorCallback){
try{
var status=this.__http.status;
var params=this.__callbackParams;
this.__errorCallback(status,params);}catch(e){}}}
Infragistics.WebClient.prototype.__clearTimer=function(){
if(this.__timeoutTimer){
window.clearTimeout(this.__timeoutTimer);
this.__timeoutTimer=null;}}
Infragistics.WebClient.prototype.__getResponse=function(){
switch(this.__responseType){
case Infragistics.WebClient.ResponseType.Xml:
return this.__http.responseXML;
default:
return this.__http.responseText;}}
Infragistics.WebClient.prototype.__doRequest=function(target,action,values,async,callback,callbackParams,responseType){
if(!this.__http){
Infragistics.ExceptionHandling.handleException('No XmlHTTPRequest object.');
return;}
try{
if(!action)
action='GET';
if(!async)
async=false;
this.__http.abort();
this.__target=target;
if(responseType)
this.__responseType=responseType;
if(async){
this.__callback=callback;
this.__callbackParams=callbackParams;
this.__http.onreadystatechange=Function.createDelegate(this,this.__processResponse);}
else{
this.__callback=null;
this.__callbackParams=null;}
this.__timeoutTimer=window.setTimeout(Function.createDelegate(this,function(){this.__responseError();this.__http.abort();Infragistics.ExceptionHandling.handleException('Request timed out for '+target+'.');}),this.__timeout);
this.__http.open(action,target,async);
this.__http.send(values);
if(!async){
this.__clearTimer();
return new Infragistics.WebClient.Response(this.__getResponse(),this.__http.getAllResponseHeaders(),null);}}catch(e){
alert(e.message);
this.__responseError();
this.__http.abort();
Infragistics.ExceptionHandling.handleException('Error processing request.',e);}}
Infragistics.WebClient.prototype.dispose=function(){
this.clearTimer();
if(this.__http)
this.__http.abort();
this.__http=null;}
Infragistics.WebClient.__initialized=true;}
this.__http=Infragistics.WebClient.createXMLHttpRequest();
this.__responseType=responseType?responseType:Infragistics.WebClient.ResponseType.Text;}
Infragistics.WebClient.createXMLHttpRequest=function(){
try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){}
try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}
try{return new XMLHttpRequest();}catch(e){}
alert('This page cannot function properly in your browser.  Please let us know if you think it should.');
return null;}
Infragistics.WebClient.getText=function(target,callback,callbackParams){
return Infragistics.WebClient.__singleRequest(target,callback,callbackParams,Infragistics.WebClient.ResponseType.Text);}
Infragistics.WebClient.getXml=function(target,callback,callbackParams){
return Infragistics.WebClient.__singleRequest(target,callback,callbackParams,Infragistics.WebClient.ResponseType.Xml);}
Infragistics.WebClient.__singleRequest=function(target,callback,callbackParams,type){
var client=new Infragistics.WebClient(type,true);
if(callback)
client.beginRequest(target,callback,callbackParams);
else
return client.request(target);
return null;}
Infragistics.WebClient.ResponseType=function(){};
Infragistics.WebClient.ResponseType.Text='Text';
Infragistics.WebClient.ResponseType.Xml='Xml';
Infragistics.WebClient.Response=function(response,headers,callbackParams){
this.Response=response;
this.Headers=headers;
this.CallbackParams=callbackParams;}
Infragistics.Logging=function(){}
Infragistics.Logging__loggerClient=null;
Infragistics.Logging__getLoggerClient=function(){
if(!Infragistics.Logging.__loggerClient)
Infragistics.Logging.__loggerClient=new Infragistics.WebClient();
return Infragistics.Logging.__loggerClient;}
Infragistics.Logging.log=function(message){
try{
if(LOGGING&&LOGGING_URL){
var logger=Infragistics.Logging.__getLoggerClient();
if(logger)
logger.beginRequest(LOGGING_URL,null,null,'POST','sourceUrl='+window.location.href+'&message='+message);}}catch(e){}}
Infragistics.ExceptionHandling=function(){}
Infragistics.ExceptionHandling.handleException=function(message,innerEx){
try{
if(innerEx)
message+='\n\nInner Exception:\n'+Infragistics.ExceptionHandling.toString(innerEx)
if(DEBUG)
alert(message);
else
alert('There is a problem with this page.  Please let us know if it continues.');
Infragistics.Logging.log(message);}catch(e){}
finally{
return false;}}
Infragistics.ExceptionHandling.toString=function(ex){
return 'Name: '+ex.name+'\nNumber: '+innerEx.number+'\nMessage: '+innerEx.message;}
Sys.UI.Control.getLocation=function(element){
if(typeof document.getBoxObjectFor!='undefined')
return document.getBoxObjectFor(element);
else{
var offsetX=0;
var offsetY=0;
var parent;
for(parent=element;parent;parent=parent.offsetParent){
if(parent.offsetLeft){
offsetX+=parent.offsetLeft;}
if(parent.offsetTop){
offsetY+=parent.offsetTop;}}
return{x:offsetX,y:offsetY,width:element.offsetWidth,height:element.offsetHeight};}}
Sys.UI.Control.getBounds=function(element){
return Sys.UI.Control.getLocation(element);}
Sys.UI.Control.setLocation=function(element,position){
element.style.left=position.x+"px";
element.style.top=position.y+"px";}
Function.createDelegate=function(instance,method){
return function(){return method.apply(instance,arguments);}}
Sys.UI.Control.getWindowDimensions=function(){
var width=0,height=0,left=0,top=0,right=0,bottom=0;
if(typeof(window.innerWidth)=='number'){
width=window.innerWidth;
height=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){
width=document.documentElement.clientWidth;
height=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){
width=document.body.clientWidth;
height=document.body.clientHeight;}
if(typeof(window.pageYOffset)=='number'){
top=window.pageYOffset;
left=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){
top=document.body.scrollTop;
left=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){
top=document.documentElement.scrollTop;
left=document.documentElement.scrollLeft;}
right=left+width;
bottom=top+height;
return{left:left,top:top,right:right,bottom:bottom,width:width,height:height};}
var __sharedQuery=null;
Infragistics.QueryString=function(q){
this.__keys=null;
if(!q)
q=window.location.search;
if(q.length>1){
q=q.substring(1,q.length);
this.keyValuePairs=q.split("&");}
else
this.keyValuePairs=new Array(0);
if(typeof Infragistics.QueryString.__initialized=='undefined'){
Infragistics.QueryString.prototype.getKeyValuePairs=function(){return this.keyValuePairs;}
Infragistics.QueryString.prototype.getValue=function(key){
for(var j=this.keyValuePairs.length-1;j>-1;j--){
var pair=this.keyValuePairs[j].split("=");
if(pair[0]==key)
return pair[1];}
return false;}
Infragistics.QueryString.prototype.getKeys=function(){
if(!this.__keys){
this.__keys=new Array(this.getLength());
for(var j=this.keyValuePairs.length-1;j>-1;j--)
this.__keys[j]=this.keyValuePairs[j].split("=")[0];}
return this.__keys;}
Infragistics.QueryString.prototype.toString=function(){
return '?'+this.keyValuePairs.join('&');}
Infragistics.QueryString.prototype.replace=function(key,newValue,replaceInHistory){
var index=this.keyValuePairs.length;
var newDiff=true;
for(var j=index-1;j>-1;j--){
var pair=this.keyValuePairs[j].split("=");
if(pair[0]==key){
index=j;
newDiff=(newValue!=pair[1]);
break;}}
if(newDiff){
this.keyValuePairs[index]=key+"="+newValue;
if(replaceInHistory){
var newLocation=encodeURI(document.location.href.substring(0,document.location.href.indexOf('?'))+this.toString());
document.location.replace(newLocation);}}}
Infragistics.QueryString.prototype.getLength=function(){return this.keyValuePairs.length;}
Infragistics.QueryString.__initialized=true;}}
Infragistics.QueryString.getShared=function(){
if(!__sharedQuery)
__sharedQuery=new Infragistics.QueryString();
return __sharedQuery;}
DemoMenuClick=function(menuId,itemId){
var item=igmenu_getItemById(itemId);
if(item){
var tag=item.getTag();
if(tag==null)
tag='';
var demoInfo=ig_getToasterById('DemoInfoPanel');
if(demoInfo){
demoInfo.setInfo(item.getText(),tag);
demoInfo.collapseContent(0);}}}
AtlasCommon_js_Parsed=true;}


if(typeof IGExpando_js_parsed=='undefined'){
var tmrContract=0;
var tmr1=0;
var ex=null;
var browser=navigator.userAgent;
var __expandoInitialized=false;
function init(){
if(__expandoInitialized)
return;
var tmpDiv=document.createElement('div');
tmpDiv.setAttribute('id','silouhette');
tmpDiv.style.border='#999999 thin solid';
tmpDiv.style.visibility='hidden';
document.getElementsByTagName('body')[0].appendChild(tmpDiv);
var As=document.getElementsByTagName('a');
for(i=0;i!=As.length;i++){
var currA=As[i];
if(currA.getAttribute('rel')=='expando'){
switch(currA.getAttribute('expandAction')){
case 'click':
currA.onclick=function(){tryThis(this);};
break;
default:
currA.onmouseover=function(){tryThis(this);};
break;}
currA.onmouseout=function(){ex.hide()};}}
__expandoInitialized=true;}
var expando=function(obj){
init();
this.srcObj=obj;
var srcBounds=Sys.UI.Control.getBounds(this.srcObj);
this.srcTop=srcBounds.y;
this.srcLeft=srcBounds.x;
this.srcWidth=srcBounds.width;
this.srcHeight=srcBounds.height;
this.toObj=document.getElementById(obj.getAttribute('contentId'));
this.toObj.style.visibility='hidden';
this.toObj.style.top='0px';
this.toObj.style.left='0px';
this.toObj.style.display='block';
this.toWidth=parseInt(this.toObj.clientWidth);
this.toHeight=parseInt(this.toObj.clientHeight);
this.toObj.style.display='none';
this.toLeft=0;
this.toTop=0;
this.velocity=1;
this.frames=10;
this.offSetX=0;
this.offSetY=0;
this.currentFrame=0;
this.timer=0;
this.winDims=new bWindow();
this.winDims.init();
this._inAction=false;
this._aborted=false;
this.left=function(){
if((this.srcLeft-this.toWidth)>0){
this.toLeft=this.srcLeft-this.toWidth;}else{
this.toLeft=this.srcLeft+this.srcWidth;}}
this.right=function(){
if((this.srcLeft+this.srcWidth+this.toWidth)<this.winDims.width){
this.toLeft=this.srcLeft+this.srcWidth;}else{
this.hMiddle();}}
this.top=function(){
if((this.srcTop-this.winDims.windowTop-this.toHeight)>0){
this.toTop=this.srcTop-this.toHeight;}else{
this.toTop=this.srcTop+this.srcHeight;}}
this.bottom=function(){
if((this.srcTop+this.srcHeight+this.srcTop)>this.winDims.height)
this.top();
else{
this.toTop=this.srcTop+this.srcHeight;}}
this.vMiddle=function(){
this.toTop=this.srcTop-(this.toHeight-this.srcHeight)/2;}
this.hMiddle=function(){
this.toLeft=(this.winDims.width-this.toWidth)/2;
if(this.toLeft<0)
this.toLeft=0;}
this.setFinalPosition=function(top,left){
this.toTop=parseInt(top);
this.toLeft=parseInt(left);}
this._tmpFn='';
this.zoomer=document.getElementById('silouhette');
if(!this.zoomer){
init();
this.zoomer=document.getElementById('silouhette');}
this.__completionCallback=null;
this.start=function(cancelAutoHide,completionCallback){
this.__completionCallback=completionCallback;
clearTimeout(tmr1);
this.zoomer.style.position='absolute';
this.zoomer.style.top=this.srcTop+'px';
this.zoomer.style.left=this.srcLeft+'px';
this.zoomer.style.width=this.srcWidth+'px';
this.zoomer.style.height=this.srcHeight+'px';
if(!cancelAutoHide){
this.zoomer.onmouseover=function(){ex.cancelContract();};
this._tmpFn=this.srcObj.onmouseover;
this.srcObj.onmouseover='';
this.srcObj.onmouseout=function(){ex.hide();};
this.toObj.onmouseover=function(){ex.cancelContract();};
this.toObj.onmouseout=function(){ex.hide();};}
var thisObj=this;
tmr1=setTimeout(function(){thisObj.expand(thisObj,cancelAutoHide);},200);
this._inAction=true;}
this.cancelContract=function(){
clearTimeout(tmrContract);
this._aborted=false;}
this.cancel=function(){
clearTimeout(tmr1);
this.srcObj.onmouseover=this._tmpFn;
this.zoomer.style.visibility='hidden';}
this.hide=function(){
if(this._inAction){
this._aborted=true;}else{
this._abort();}}
this._abort=function(){
var thisObj=this;
tmrContract=setTimeout(function(){thisObj.contract(thisObj);},200);}
this.contract=function(oExpando){
this.toObj.style.visibility='hidden';
this.zoomer.style.visibility='visible';
this._inAction=true;
oExpando.zoomer.style.top=this.toTop-((this.toTop-this.srcTop)/oExpando.frames*(oExpando.frames-oExpando.currentFrame))+'px';
oExpando.zoomer.style.left=this.toLeft-((this.toLeft-this.srcLeft)/oExpando.frames*(oExpando.frames-oExpando.currentFrame))+'px';
oExpando.zoomer.style.width=this.toWidth-((this.toWidth-this.srcWidth)/oExpando.frames*(oExpando.frames-oExpando.currentFrame))+'px';
oExpando.zoomer.style.height=this.toHeight-((this.toHeight-this.srcHeight)/oExpando.frames*(oExpando.frames-oExpando.currentFrame))+'px';
var thisObj=this;
if(oExpando.currentFrame>2){
oExpando.currentFrame--;
tmr1=setTimeout(function(){thisObj.contract(thisObj);},this.velocity);}else{
oExpando.zoomer.style.visibility='hidden';
oExpando.toObj.style.display='none';
oExpando.toObj.style.left=this.srcLeft;
oExpando.toObj.style.top=this.srcTop;
this.srcObj.onmouseover=this._tmpFn;
this._inAction=false;}}
this.expand=function(oExpando,cancelAutoHide){
oExpando.toObj.style.display='block';
oExpando.zoomer.style.visibility='visible';
oExpando.zoomer.style.top=this.srcTop+((this.toTop-this.srcTop)/oExpando.frames*(oExpando.currentFrame))+'px';
oExpando.zoomer.style.left=this.srcLeft+((this.toLeft-this.srcLeft)/oExpando.frames*(oExpando.currentFrame))+'px';
oExpando.zoomer.style.width=this.srcWidth+((this.toWidth-this.srcWidth)/oExpando.frames*(oExpando.currentFrame))+'px';
oExpando.zoomer.style.height=this.srcHeight+((this.toHeight-this.srcHeight)/oExpando.frames*(oExpando.currentFrame))+'px';
var thisObj=this;
if(oExpando.currentFrame<oExpando.frames-1){
oExpando.currentFrame++;
tmr1=setTimeout(function(){thisObj.expand(thisObj,cancelAutoHide);},this.velocity);}else{
oExpando.zoomer.style.visibility='hidden';
oExpando.toObj.style.left=this.toLeft+'px';
var scrollYPos;
if(typeof window.pageYOffset!='undefined'){
scrollYPos=window.pageYOffset;}
else if(document.compatMode&&document.compatMode!='BackCompat'){
scrollYPos=document.documentElement.scrollTop;}
else{
scrollYPos=document.body.scrollTop;}
if(typeof scrollYPos!='undefined'){
if(scrollYPos>=70)
oExpando.toObj.style.top=scrollYPos+20+'px';
else
oExpando.toObj.style.top=this.toTop+'px';}
oExpando.toObj.style.visibility='visible';
if(this.__completionCallback)
this.__completionCallback();
oExpando.srcObj.onmouseover=function(){ex.cancel();};
if(!cancelAutoHide)
this.srcObj.onmouseout=function(){ex.hide();};
this._inAction=false;}}}
function tryThis(obj){
var type=obj.getAttribute('mode');
ex=new expando(obj);
switch(type){
case 'topRight':
ex.top();
ex.right();
break;
case 'topLeft':
ex.top();
ex.left();
break;
case 'bottomRight':
ex.bottom();
ex.right();
break;
case 'bottomLeft':
ex.bottom();
ex.left();
break;
case 'left':
ex.vMiddle();
ex.left();
break;
case 'right':
ex.vMiddle();
ex.right();
break;
case 'top':
ex.hMiddle();
ex.top();
break;
case 'bottom':
ex.hMiddle();
ex.bottom();
break;
case 'center':
ex.hMiddle();
ex.vMiddle();
break;}
ex.start();}
IGExpando_js_parsed=true;}




function igmenu_initMenu(menuId) {
   igmenu_itemArray=[];
   if(!igmenu_initialized) {
	  igmenu_initialize();
	  igmenu_initialized = true;
   }

   ig_oActiveMenu = null;
   var oMenu = igmenu_array[menuId];
	if(oMenu)
	{
		oMenu.cancelAnimations();
		for(var id in igmenu_submenuArray)
		{
			var o = igmenu_submenuArray[id];
			if(o && o.WebMenu && o.WebMenu.MenuName == menuId)
				igmenu_submenuArray[id] = null;
		}
		oMenu.base = oMenu.Events = null;
		ig_dispose(oMenu);
	}
   
   var menuElement = igmenu_getElementById(menuId+"_MainM");
   oMenu = igmenu_Create(menuElement,eval("igmenu_"+menuId+"_Menu"));
	
   igmenu_array[menuId] = oMenu;
   oMenu.fireEvent(oMenu.Events.InitializeMenu,"(\""+menuId+"\");");
   
   if(!ig_csom.IsIE  || ig_csom.IsMac)
		oMenu.HideDropDowns = false;
		
   if(!ig_csom.IsIE55Plus && oMenu.HideDropDowns==true && igmenu_dropDowns==null) {
		igmenu_dropDowns = document.all.tags("SELECT");
   }
   
   oMenu.Element.tabIndex = 0;
   oMenu.hasFrame = false;
   var frameElement = menuElement;
   if(frameElement.parentNode.getAttribute('menuframe') == "1") {
	  frameElement = frameElement.parentNode;
	  oMenu.hasFrame = true;
   }
   if(oMenu.isDrillDown()) {
       if(frameElement.offsetWidth == 0 && frameElement.offsetHeight == 0) {
            oMenu._uninitialized = true;
            oMenu._frameElement = frameElement;
       }
       else 
	   if(!oMenu.viewport) {
			oMenu.viewport = new ig_viewport();
			oMenu.viewport.createViewport(frameElement, ViewportOrientationEnum.Horizontal);
			oMenu.viewport.transferPositionToDiv(frameElement);
	   }
   }
   if(ig_csom.IsIE) {
      if(!oMenu.Element.isDisabled)
		igmenu_initHandlers(oMenu, oMenu.getItems());
   }
   else
		igmenu_initHandlers(oMenu, oMenu.getItems());
	if(!oMenu.Element._old)
	{
		ig_shared.addEventListener(oMenu.Element, "mouseover", igmenu_submenumouseover, true);
		ig_shared.addEventListener(oMenu.Element, "mouseout", igmenu_submenumouseout, true);
		ig_shared.addEventListener(oMenu.Element, "focus", igmenu_keyboard.onfocus, true);
	}
	oMenu.Element._old = true;
   oMenu.MenuName = menuId;		
      
   oMenu.MenuLoaded=true;
   return oMenu;
}

// private - constructor for the menu object
function igmenu_Create(menuElement, props) {
    if(!ig_WebControl.prototype.isPrototypeOf(ig_WebMenu.prototype))
    {
        ig_WebMenu.prototype = new ig_WebControl();
        ig_WebMenu.prototype.constructor = ig_WebMenu;
        ig_WebMenu.prototype.base=ig_WebControl.prototype;
		
		ig_WebMenu.prototype.init = function(menuElement, menuProps) 
		{
			this.MenuId = menuElement.id;
			this.MenuElement = menuElement;
			this.Id = menuElement.id;
			this.Element = menuElement;
			this.UniqueId = menuProps[0];
			this.MenuTarget=menuProps[1];
			this.WebMenuStyle=menuProps[2];
			this.HoverClass=menuProps[4];
			this.TopSelectedClass=menuProps[5];
			this.ExpandEffects = new igmenu_expandEffects(menuProps[8], menuProps[9], menuProps[10], menuProps[11], menuProps[12], menuProps[13], menuProps[14]);
			this.CheckedImage=menuProps[15];
			this.UncheckedImage=menuProps[16];
			this.DisabledClass=menuProps[17];
			this.DefaultItemClass=menuProps[18];
			this.ScrollImageTop=menuProps[19];
			this.ScrollImageTopDisabled=menuProps[20];
			this.ScrollImageBottom=menuProps[21];
			this.ScrollImageBottomDisabled=menuProps[22];
			this.LeftHandDisplay=menuProps[23];
			this.CurrentLeftHandDisplay=this.LeftHandDisplay
			this.HideDropDowns=menuProps[24];
			this.TargetUrl=menuProps[25];
			this.TargetFrame=menuProps[26];
	
			if(menuProps.length > 26) {
				this.MergeStyles = menuProps[27];
			}
			else {
				this.MergeStyles = false;
			}
			
			if(menuProps.length > 27) {
				this.HeaderClass = menuProps[28];
			}
			
			var uniqueId = this.getClientUniqueId();
			this.Events = new igmenu_events(eval("igmenu_"+uniqueId+"_Events"));
			this.MenuLoaded = false;
			this.NeedPostBack = false;
			this.CancelPostBack = false;
			this.TopHoverStarted = false;
			
		}
		ig_WebMenu.prototype.isHorizontal = function () {
			return (this.MenuTarget == 1);
		}
		ig_WebMenu.prototype.isVertical = function () {
			return (this.MenuTarget == 2);
		}
		ig_WebMenu.prototype.isPopup = function () {
			return (this.MenuTarget == 3);
		}
		ig_WebMenu.prototype.isWebStandard = function () {
			return (this.WebMenuStyle == 1);
		}
		ig_WebMenu.prototype.isRichClient = function () {
			return (this.WebMenuStyle == 2);
		}
		ig_WebMenu.prototype.isXPClient = function () {
			return (this.WebMenuStyle == 3);
		}
		ig_WebMenu.prototype.isDrillDown = function () {
			return (this.WebMenuStyle == 4);
		}
		
		ig_WebMenu.prototype.getItems = function ()	{
			var itemAr = new Array();
			var rows, cells, index = 0;
			if(this.isPopup()) {
			    if(ig_csom.IsIE)
				    rows = this.Element.firstChild.firstChild.rows;
				else
				    rows = this.Element.childNodes[1].firstChild.rows;
			}
			else
				rows = this.Element.rows;
			for(var r = 0; r < rows.length; r++) {	
				cells = rows[r].cells;
				for(var i = 0; i < cells.length; i++) 
					itemAr[index++] = igmenu_getItemById(cells[i].firstChild.id);
				}
			return itemAr;
		}

		// private
		ig_WebMenu.prototype.getClientUniqueId = function() {
			var u = this.UniqueId.replace(/:/gi, "");
			while(u.indexOf("$") != -1)
				u = u.replace("$",""); // CLR 2.0
	        
			u = u.replace(/_/gi, "");
			u = u.replace(/\-/gi,"");
			if(u.indexOf("{") != -1) {
    			u = "IG" + u;
				u = u.replace(/\{/gi, "");
				u = u.replace(/\}/gi, "");
			}
			return u;
		}
		
		// private - Fires an event to client-side script and then to the server if necessary
		ig_WebMenu.prototype.fireEvent = function (eventObj,eventString)
		{
			var result=false;
			if(eventObj[0]!="")
				result=eval(eventObj[0]+eventString);
			if(this.MenuLoaded && result!=true && eventObj[1]==1 && !this.CancelPostBack)
				this.NeedPostBack=true;
			this.CancelPostBack=false;
			return result;
		}

		ig_WebMenu.prototype.getFirstEnabledItem = function()
		{			
			var oItem = null;
			var oItems = this.getItems();
			for (var iCount=0; oItems && iCount < oItems.length; iCount++)
			{
				oItem = oItems[iCount];
				if (oItem.getEnabled()) 
					return oItem;
			}
			return null;		
		}
		
		ig_WebMenu.prototype.initEventHandlers = function(oSubMenu, oItem) {
			if(!oSubMenu._events) {
				if(!oItem && this.isPopup())
					return;
				else  {
					var oItems = oItem.getItems();
					igmenu_initHandlers(oItem.WebMenu, oItems);
					oSubMenu._events = true;
					if(oSubMenu.element._old)
						return;
					oSubMenu.element._old = true;
					ig_shared.addEventListener(oSubMenu.element, "mouseover", igmenu_submenumouseover, true);
					ig_shared.addEventListener(oSubMenu.element, "mouseout", igmenu_submenumouseout, true);
				}
			}
		}

		// private - clears all submenus from display
		ig_WebMenu.prototype.hideSubMenus = function() {
			this.CurrentLeftHandDisplay=this.LeftHandDisplay;
			this.igCurrentChild = null;

			if(this._oRootSubMenu)
				this._oRootSubMenu.dismiss();
			var oSubMenuMain = igmenu_getSubMenuById(this, this.Element.id);
			oHoveredItem = oSubMenuMain.getHoveredItem();
			if(oHoveredItem)
				oHoveredItem.unhover();
		}
		
		// private - cancels all animations in progress
		ig_WebMenu.prototype.cancelAnimations = function() {
			if(this._oRootSubMenu)
				this._oRootSubMenu.cancelAnimation();
		}

		// private - Hides the menu if it is displayed as a popup
		ig_WebMenu.prototype.dismiss = function () {
			ig_inMenu = false;
			igmenu_pageMouseDown();
		}

		// private - returns the tabIndex of the webMenu
		ig_WebMenu.prototype.getTabIndex = function(){
			return this.Element.tabIndex;
		}		
		
		// private - Update internal buffer for items that are checked on or off
		ig_WebMenu.prototype.updateItemCheck = function(itemId, bChecked){ 
			var formControl = igmenu_getElementById(this.UniqueId);
			if(formControl == null)
				return;
			var menuState = formControl.value;
			var newValue;
			var oldValue;
			if(bChecked){
				oldValue = "0";	newValue = "1";
			}
			else{
				oldValue = "1";	newValue = "0";
			}
			var oldString = itemId + ":Chck=" + oldValue + "<%;";
			var newString = itemId + ":Chck=" + newValue + "<%;";
			if(menuState.search(oldString) >= 0)
				menuState = menuState.replace(oldString, newString);
			else {
			oldString = itemId + ":Chck=" + newValue + "<%;";
			if(menuState.search(oldString) >= 0){
				menuState = menuState.replace(oldString, newString);
			}
			else
				menuState += newString;
			}
			formControl.value = menuState; 
		}
	
		
		ig_WebMenu.prototype.initSubMenuRoot = function (oSubMenu) {
			this.hideSubMenus();
			if(!oSubMenu)
				return;
			ig_oCurrentSubMenu = oSubMenu;
			ig_oActiveMenu = this;
			this._oRootSubMenu = oSubMenu;
			this._oActiveSubMenu = oSubMenu;
			if(!ig_csom.IsIE55Plus && this.HideDropDowns) {
				igmenu_hideDropDowns(true);
			}
		}
	}
    return new ig_WebMenu(menuElement, props);
}