var uniqueID=0;
var bw= new function (){
 this.ver=navigator.appVersion;
 this.agent=navigator.userAgent.toLowerCase();
 this.dom=document.getElementById?1:0;
 this.op5=(this.agent.indexOf("opera 5")>-1 || this.agent.indexOf("opera/5")>-1) && window.opera;
 this.op6=(this.agent.indexOf("opera 6")>-1 || this.agent.indexOf("opera/6")>-1) && window.opera;
 this.ie5=(this.agent.indexOf("msie 5")>-1 && !this.op5 && !this.op6);
 this.ie55=(this.ie5 && this.agent.indexOf("msie 5.5")>-1);
 this.ie6=(this.agent.indexOf("msie 6")>-1 && !this.op5 && !this.op6);
 this.ie4=(this.agent.indexOf("msie")>-1 && document.all &&!this.op5 &&!this.op6 &&!this.ie5&&!this.ie6);
 this.ie=(this.ie4 || this.ie5 || this.ie55 || this.ie6);
 this.mac=(this.agent.indexOf("mac")>-1);
 this.ns6=(this.agent.indexOf("gecko")>-1 || window.sidebar);
 this.ns4=(!this.dom && document.layers)?1:0;
 this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5 || this.op6);
 this.usedom= this.ns6;//Use dom creation
 this.reuse = this.ie||this.usedom; //Reuse layers
 this.px=this.dom&&!this.op5?"px":"";
 this.filter=(this.ie55||this.ie6) && !this.mac
 return this;
}
//
// need to call every time there is a window resize
function cm_page(){
 this.x=0;
 this.x2 =(!bw.ie)?window.innerWidth:document.body.offsetWidth-20;
 this.y=0;
 this.orgy=this.y2= (!bw.ie)?window.innerHeight:document.body.offsetHeight-6;
 this.x50=this.x2/2;
 this.y50=this.y2/2;
 return this;
}
function getUniqueID(){
 return ++uniqueID;	
}
/***check positions**/
//cater for percentage
function util_cp(num,w,minus){
 if(num){
  if(num.toString().indexOf("%")!=-1){
   var t = w?cmpage.x2:cmpage.y2;
   num=parseInt((t*parseFloat(num)/100));
   if(minus){
   num-=minus;
   }
  }
  else{
   num=eval(num);
  }
 }
 else{
  num=0;
  return num;
 }
}
/*Variable declaration*/
function util_msg(txt){
//alert(txt);
 window.status=txt
 return false
}
function util_debug2(content){
 var w=window.open("","debug");
 w.document.write("<form><textarea rows=20 cols=60 wrap=soft>"+content+"</text></form>");
 w.document.close();
}
//var w=window.open("","debug");

var uniquelineno=0;
function util_debug(content){

 w.document.write("<pre>"+content+"</pre>");
 
}
function utilObjectClass(name){
 if(name==null){
  name="utilObj"+getUniqueID();	
 }
 this.name=name;
 var tmp=location.href;
 this.childLyr=new Array();
 this.layerList=new Array();
 this.windowList=new Array();
 this.windowList["_self"]=self;
 this.windowList["_parent"]=parent;
 this.windowList["_top"]=top;
 this.buttonList=new Array();
 this.slideShowList=new Array();
 this.menuSystemList=new Array();
 this.menuList=new Array();
}
//utilObjectClass.prototype.linkIt=function(url,target,target_parameter,useNewWindow,focus){
utilObjectClass.prototype.linkIt=function(linkAttribute){
 if(linkAttribute.target==null){
  linkAttribute.target="_self";
 }
 if(linkAttribute.url.indexOf("javascript:")!=-1){
  eval(linkAttribute.url);
 }
 else if(linkAttribute.target=="_self"){
  location=linkAttribute.url;
 }
 else if(linkAttribute.target=="_top"){
  top.location=linkAttribute.url
 }
 else if(linkAttribute.target=="_parent"){
  parent.location=linkAttribute.url
 }
 else {
  if(linkAttribute.target=="_blank"){
   linkAttribute.target="_blank"+this.windowList.length;
   this.windowList[linkAttribute.target]=window.open(linkAttribute.url,"_blank",linkAttribute.target_parameter);
  }
  else if(this.windowList[linkAttribute.target]==null){
   if(linkAttribute.replaceWindow==true){
    var w=window.open("",linkAttribute.target);
    w.close();
   }
   this.windowList[linkAttribute.target]=window.open(linkAttribute.url,linkAttribute.target,linkAttribute.target_parameter);
  }
  else{
   if(linkAttribute.replaceWindow==true){
    this.windowList[linkAttribute.target].close();
   }
   this.windowList[linkAttribute.target]=window.open(linkAttribute.url,linkAttribute.target,linkAttribute.target_parameter);
  }
 }
 if(linkAttribute.focus==true){
  this.windowList[linkAttribute.target].focus();
 }
 return this.windowList[linkAttribute.target];
}
//utilObjectClass.prototype.defineLayer = function(visible,name,parent,content,bgColor,bgImage,x,y,w,h,z,clipTop,clipRight,clipBottom,clipLeft,onMouseOut,onMouseOver,onMouseDown,onMouseClick,extraParm){
utilObjectClass.prototype.defineLayer = function(attribute){
 if(attribute.name==null||attribute.name==""){
  attribute.name = this.name+"-"+this.childLyr.length;
 }
 var p = (attribute.parent!=null&&attribute.parent!=""&&this.layerList[attribute.parent])?attribute.parent:0;
 if (p){
  attribute.parentObj=this.layerList[attribute.parent];
 }
 else{
  attribute.parentObj=false;
 }
 if(this.layerList[attribute.name]!=null){
  alert('duplicate layer name:'+attribute.name);
  return null;
 }
 //var obj =  this.layerList[name] = new layerObjClass(visible,name,parentObj,content,bgColor,bgImage,x,y,w,h,z,clipTop,clipRight,clipBottom,clipLeft,onMouseOut,onMouseOver,onMouseDown,onMouseClick,extraParm);
 var obj =  this.layerList[attribute.name] = new layerObjClass(attribute);
 if (!p) {
  this.childLyr[this.childLyr.length] = obj;
 }
 return obj;
}

utilObjectClass.prototype.construct = function(){
// this.preConstruct();
 document.open();
 var a=this.createHTMLstr(); 
// util_debug2(a);
 document.write(a);
 document.close();

 this.evalReference();
 return this.createHTMLstr();
}


utilObjectClass.prototype.preConstruct = function(){
 //for (var i in this.menuList){
 // this.menuList[i].preConstruct();
 //} 
}
utilObjectClass.prototype.evalReference = function(){
 if(this.childLyr.length==0) return util_msg('No layers defined');
 for (var i=0;i<this.childLyr.length;i++){
  this.childLyr[i].evalReference("");
 }
}
utilObjectClass.prototype.createHTMLstr = function(){
 if(this.childLyr.length==0) return util_msg('No layers defined');
 var str="";
 for (var i=0;i<this.childLyr.length;i++){
  str+=this.childLyr[i].createHTMLstr();
 }
 return str;
}
utilObjectClass.prototype.makeButton = function(attribute){
 if(attribute.name==""||attribute.name==null){
  attribute.name = this.name+"_button"+this.buttonList.length;
 }
 var obj=new buttonObjClass(attribute);
 this.buttonList[this.buttonList.length] = obj
 return obj;
}
 
utilObjectClass.prototype.makeSlideShow = function(attribute){	
 if(attribute.name==""||attribute.name==null){
  attribute.name = this.name+"_slideShow"+this.slideShowList.length;
 }
 var obj=new slideShowObj(attribute);
 this.slideShowList[this.slideShowList.length] = obj
 return obj;
}

utilObjectClass.prototype.defineMenu = function(attribute){
 var obj = new menuSystemObjClass(attribute); 
 return obj;
}

utilObjectClass.prototype.defineMarquee = function(attribute){
 var obj = new marqueeObjClass(attribute); 
 return obj;
}

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/
//function layerObjClass(visible,name,parentObj,content,bgColor,bgImage,x,y,w,h,z,clipTop,clipRight,clipBottom,clipLeft,onMouseOut,onMouseOver,onMouseDown,onMouseClick,extraParm){
function layerObjClass(attribute){
 var l = 0;
 this.attribute=attribute;
 this.objType='Layer';
 this.childLyr=new Array();
 
 if(attribute.parentObj){
  //this.parentObj=parentObj;
  attribute.parentObj.childLyr[attribute.parentObj.childLyr.length]=this;
  l = attribute.parentObj.level+1;
 }
 attribute.childLyr=new Array();
 attribute.level = l;
 attribute.content = (attribute.content==null)?"":attribute.content;
 attribute.position = (attribute.position==null)?"relative":attribute.position;
 attribute.z = (attribute.z==null)?0:attribute.z;
 attribute.clipTop = (attribute.clipTop==null)?0:attribute.clipTop;
 attribute.clipRight = (attribute.clipRight==null)?attribute.w:attribute.clipRight;
 attribute.clipBottom = (attribute.clipBottom==null)?attribute.h:attribute.clipBottom;
 attribute.clipLeft = (attribute.clipLeft==null)?0:attribute.clipLeft;
 attribute.extraParm=(attribute.extraParm==null)?"":attribute.extraParm;
 attribute.beforeContentHTML=(attribute.beforeContentHTML==null)?"":attribute.beforeContentHTML;
 attribute.afterContentHTML=(attribute.afterContentHTML==null)?"":attribute.afterContentHTML;
 attribute.beforeChildHTML=(attribute.beforeChildHTML==null)?"":attribute.beforeChildHTML;
 attribute.afterChildHTML=(attribute.afterChildHTML==null)?"":attribute.afterChildHTML;
 attribute.beforeTagHTML=(attribute.beforeTagHTML==null)?"":attribute.beforeTagHTML;
 attribute.afterTagHTML=(attribute.afterTagHTML==null)?"":attribute.afterTagHTML;
}

layerObjClass.prototype.evalReference = function(parentStr){
 if(parentStr==null){
  parentStr="";
 }
 if(bw.ns4){
  eval("this.evnt="+parentStr+"document.layers['"+this.attribute.name+"']");
  
  eval("this.evnt.scrollWidth="+parentStr+"document.layers['"+this.attribute.name+"'].document.width");
  eval("this.evnt.scrollHeight="+parentStr+"document.layers['"+this.attribute.name+"'].document.height");
  parentStr+="document.layers['"+this.attribute.name+"'].";
  this.evnt.layerObj=this;
  
  
  
  this.css=this.evnt;
  //this.evnt.document.onmousedown=this.onMouseDownFunction
  //this.evnt.document.onmouseup=this.onMouseUpFunction
  //this.evnt.document.captureEvents(events.onMouseDown,events.onMouseUp);  
  
  if(this.attribute.NSadjust){
   eval("var x="+parentStr+"document.images."+this.attribute.name+"_transgif.x");
   eval("var y="+parentStr+"document.images."+this.attribute.name+"_transgif.y");
   ////////parentStr+="document.layers."+this.attribute.name;
   this.moveIt(x,y);
  }
 }
 else if(bw.ie6){
  this.evnt=document.getElementById(this.attribute.name);
  this.evnt.layerObj=this;
  this.css=this.evnt.style;
 }
 else if(bw.ie4||bw.ie5||bw.ie55){
  eval("this.evnt=document.all."+this.attribute.name);
  this.evnt.layerObj=this;
  this.css=this.evnt.style;
  //alert(this.css+":"+this.attribute.name+":"+this.css.pixelLeft+this.css.pixelTop);
  //alert(this.evnt.offsetTop)
  
 }
 else{
  util_msg('browser not supported1');
 }
 
 for (var i=0;i<this.childLyr.length;i++){
  //alert("parentStrcalling:"+parentStr);
  this.childLyr[i].evalReference(parentStr);
 }
}
layerObjClass.prototype.onMouseDownFunction = function(event){
 eval(this.attribute.onMouseDown);
}
layerObjClass.prototype.onMouseClickFunction = function(event){
 eval(this.attribute.onMouseClick);
}
function mouseSetup(layerobj,onMouseOutStr,onMouseOverStr,onMouseDownStr,onMouseClickStr){
 var temp=eval(layerobj)
 //temp.onmousemove=drag
 if(onMouseDownStr){
  temp.onmousedown=function(e){
   var retval = this.routeEvent(e);   if (retval == false) return false
   this.captureEvents(Event.MOUSEUP);
   eval(this.layerObj.attribute.onMouseDown);
   return false;
  }
 }
 if(onMouseOverStr){
  temp.captureEvents(Event.MOUSEOVER); 
  temp.onmouseover=function(e){
   var retval = this.routeEvent(e);   if (retval == false) return false
   this.captureEvents(Event.MOUSEDOWN | Event.MOUSEOUT);
   eval(this.layerObj.attribute.onMouseOver);
   return false;  
  }
 }
 if(onMouseOutStr){
   temp.onmouseout=function(e){
   var retval = this.routeEvent(e);   if (retval == false) return false
   this.releaseEvents(Event.MOUSEDOWN)
   this.releaseEvents(Event.MOUSEUP)
   this.releaseEvents(Event.MOUSEOUT)
   eval(this.layerObj.attribute.onMouseOut);
   return false;  	
  }
 }
 if(onMouseClickStr){
  //use mouseup to simulate click
  temp.onmouseup=function(e){
   var retval = this.routeEvent(e);   if (retval == false) return false
   eval(this.layerObj.attribute.onMouseClick);
   return false;  	
  }
 }
}

layerObjClass.prototype.createHTMLstr = function(){
 if(this.written){
  return "";
 }
 var str=this.attribute.beforeTagHTML;
 this.attribute.clipTop = (this.attribute.clipTop==null)?0:this.attribute.clipTop;
 this.attribute.clipRight = (this.attribute.clipRight==null)?this.attribute.w:this.attribute.clipRight;
 this.attribute.clipBottom = (this.attribute.clipBottom==null)?this.attribute.h:this.attribute.clipBottom;
 this.attribute.clipLeft = (this.attribute.clipLeft==null)?0:this.attribute.clipLeft;
 if(bw.ns4){
  str="<layer onload=mouseSetup(this,"+((this.attribute.onMouseOut==null)?"false":"true")+","+((this.attribute.onMouseOver==null)?"false":"true")+","+((this.attribute.onMouseDown==null)?"false":"true")+","+((this.attribute.onMouseClick==null)?"false":"true")+")  "+this.attribute.extraParm+" name="+this.attribute.name
  +((this.attribute.bgColor==null)?"":(" bgcolor="+this.attribute.bgColor))
  +((this.attribute.background==null)?"":(" background='"+this.attribute.background+"'"))
  +((this.attribute.visible)?"":" visibility=hide")
  +((this.attribute.y==null)?"":(" top="+this.attribute.y))
  +((this.attribute.x==null)?"":(" left="+this.attribute.x))
  +((this.attribute.w==null)?"":(" width="+this.attribute.w))
  +((this.attribute.h==null)?"":(" height="+this.attribute.h))
  +((this.attribute.clipRight==null&&this.attribute.clipBottom==null)?"":(" clip='"+this.attribute.clipLeft+","+this.attribute.clipTop+","+this.attribute.clipRight+","+this.attribute.clipBottom+"'"))
  +((this.attribute.z==null)?"":(" z-index="+this.attribute.z))
  //+((this.onMouseOver==null)?"":(" onmouseover=\""+this.onMouseOver+"\""))
  //+((this.onMouseOut==null)?"":(" onmouseout=\""+this.onMouseOut+"\""))
  +">"
  +this.attribute.beforeContentHTML
  +this.attribute.content;
 }
 else if(bw.ie){
  str="<span "+this.attribute.extraParm+" id="+this.attribute.name+" style=\""
  //+"position:absolute"
  +((this.attribute.x==null&&this.attribute.y==null&&this.attribute.position!='absolute')?"position:relative":"position:absolute")
  +((this.attribute.bgColor==null)?"":(";background-color:"+this.attribute.bgColor))
  +((this.attribute.background==null)?"":(";background-image:url('"+this.attribute.background+"')"))
  +((this.attribute.visible)?"":";visibility:hidden")
  +((this.attribute.overflow==null)?"":(";overflow:"+this.attribute.overflow))
  +((this.attribute.overflowX==null)?"":(";overflow-x:"+this.attribute.overflowX))
  +((this.attribute.overflowY==null)?"":(";overflow-y:"+this.attribute.overflowY))
  +((this.attribute.y==null)?"":(";top:"+this.attribute.y))
  +((this.attribute.x==null)?"":(";left:"+this.attribute.x))
  +((this.attribute.w==null)?"":(";width:"+this.attribute.w))
  +((this.attribute.h==null)?"":(";height:"+this.attribute.h))
  +((this.attribute.clipRight==null||this.attribute.clipBottom==null)?"":(";clip:rect("+this.attribute.clipTop+","+this.attribute.clipRight+","+this.attribute.clipBottom+","+this.attribute.clipLeft+")"))
  +((this.attribute.z==null)?"":(";z-index:"+this.attribute.z))
  //+";filter:alpha(opacity=50)"
  //+((this.attribute.showTransitionFilter==null)?"":(";filter:"+this.attribute.showTransitionFilter))
  //+";-moz-opacity:100"
  +"\""
  +((this.attribute.onMouseOver==null)?"":(" onmouseover=\""+this.attribute.onMouseOver+"\""))
  +((this.attribute.onMouseOut==null)?"":(" onmouseout=\""+this.attribute.onMouseOut+"\""))
  +((this.attribute.onMouseDown==null)?"":(" onmousedown=\""+this.attribute.onMouseDown+"\""))
  +((this.attribute.onMouseClick==null)?"":(" onclick=\""+this.attribute.onMouseClick+"\""))
  +">"
  +this.attribute.beforeContentHTML
  +this.attribute.content;
 }
 else{
  util_msg('browser not supported3')
 }
 for (var i=0;i<this.childLyr.length;i++){
  str+=this.attribute.beforeChildHTML+this.childLyr[i].createHTMLstr()+this.attribute.afterChildHTML;
 }
 if(bw.ns4){
  str+=this.attribute.afterContentHTML+"</layer>";
 }
 else if(bw.ie){
  str+=this.attribute.afterContentHTML+"</span>";
 }
 else{
  util_msg('browser not supported2');
 }
 this.written=true;
 str+=this.attribute.afterTagHTML;
 return str;
}

layerObjClass.prototype.moveIt = function(x,y){
 this.attribute.x=x;
 this.attribute.y=y;
 //alert(this.attribute.name);
 //alert(this.css);
 
 this.css.left=x+bw.px;
 this.css.top=y+bw.px;
}

layerObjClass.prototype.moveItBy = function(x,y){
 this.attribute.x+=x;
 this.attribute.y+=y;
 this.css.left=parseInt(this.css.left,10)+x+bw.px;
 this.css.top=parseInt(this.css.top,10)+y+bw.px;
}

layerObjClass.prototype.showIt2 = function(zIndex,filterPause,filterIncrement,endFilterActionStr){
 if(zIndex!=null){
  this.css.zIndex=zIndex;
 }
 if(bw.ie){ 
  if(filterPause==null){
   filterPause=50;
  }
  if(filterIncrement==null){
   filterIncrement=10;
  }
  if(filterIncrement==0){
   filterIncrement=1;
  }
  if(filterIncrement>0){
   this.curFade=0;
  }
  else{
   this.curFade=100;
  }
  this.filterPause=filterPause;
  this.filterIncrement=filterIncrement;
  this.endFilterActionStr=endFilterActionStr;
  this.filterItHandle=setInterval("utilObj.layerObjClassList['"+this.name+"'].filterIt()",this.filterPause); 
 }
 this.css.top=this.attribute.y+bw.px;
}
layerObjClass.prototype.showItNoTransition = function(zIndex){
 this.showIt(false,zIndex);
}
layerObjClass.prototype.showIt = function(transition,zIndex){
 if(zIndex!=null){
  this.css.zIndex=zIndex; 
 }
 if(this.attribute.showTransitionFilter){
  if(typeof(transition)=="undefined"||transition==null){
   transition=true;
  }
 }
 else{
  transition=false;
 }
 /*
 this.css.top=this.y+bw.px;
 */
 if(bw.ie){
  if(transition!=false){   
   if(this.evnt.filters[0]){
    this.evnt.filters[0].stop();
   }
   this.css.filter=this.attribute.showTransitionFilter;   
   this.evnt.filters[0].apply();
   this.css.visibility="inherit";
   this.evnt.filters[0].play();
  }
  else{
   this.css.visibility="inherit";
  }
 }
 else if(bw.ns4){
  this.css.visibility="inherit";
 }
/*
 this.css.visibility="visible";
 this.vis=1;
 if(bw.op5&&this.arr){
  this.arr.showIt();
 }
*/
}
layerObjClass.prototype.hideItNoTransition = function(transition){
 this.hideIt(false);
}
layerObjClass.prototype.hideIt = function(transition){
/*
 this.css.top=-9999+bw.px;
 this.css.zIndex=this.z;
*/
 
 if(this.attribute.hideTransitionFilter){
  if(typeof(transition)=="undefined"||transition==null){
   transition=true;
  }
 }
 else{
  transition=false;
 }
 if(bw.ie){
  if(transition!=false){   
   if(this.evnt.filters[0]){
    this.evnt.filters[0].stop();
   }
   this.css.filter=this.attribute.hideTransitionFilter;
   this.evnt.filters[0].apply();
   this.css.visibility="hidden";
   this.evnt.filters[0].play();
  }
  else{
   this.css.visibility="hidden";
  }
 }
 else if(bw.ns4){
   this.css.visibility="hide";
 }
}
layerObjClass.prototype.rotateItschildLyrStart= function (loop,pause,filterType,filterPause,filterIncrementValue,endRotateActionStr){
 if(pause==null){
  pause=1000;
 }
 if(this.childLyr.length<2){
  util_msg('at least must have two childLyr layers to rotate');
  return false;
 }
 curRotateChildIndex=this.childLyr.length-1;
 curLoopNo=-1;
 var curChildIndex=this.childLyr.length-1;
 var curLoopNo=-1;
 //this.rotatechildLyrPause=pause;
 //this.filterPause=filterPause;
 //this.filterIncrement=filterIncrement;
 this.rotateItschildLyrHandle=setTimeout("utilObj.layerList['"+this.name+"'].rotateItschildLyr("+loop+","+curLoopNo+","+curChildIndex+","+pause+","+filterType+","+filterPause+","+filterIncrementValue+",\""+endRotateActionStr+"\")",pause);
}

layerObjClass.prototype.rotateItschildLyr = function(loop,curLoopNo,curChildIndex,pause,filterType,filterPause,filterIncrementValue,endRotateActionStr){
/*
 var prevChildObj=this.childLyr[this.curRotateChildIndex];
 this.prevRotateChildIndex=this.curRotateChildIndex++;
 if(this.curRotateChildIndex>=this.childLyr.length){
  this.curRotateChildIndex=0;
 }
 var curChildObj=this.childLyr[this.curRotateChildIndex];
*/
 prevChildIndex=curChildIndex++;
 if(curChildIndex>=this.childLyr.length){
  curChildIndex=0;
 }
 if(curChildIndex==0){
  if(loop>0){
   if(++curLoopNo>=loop){
    return eval(endRotateActionStr);
   }
  }
 } 
 var curChildObj=this.childLyr[curChildIndex];
 var prevChildObj=this.childLyr[prevChildIndex];
 if(filterIncrementValue!=null){
  curChildObj.resetFilterIt();
  curChildObj.css.zIndex=9999;
  prevChildObj.css.zIndex=9998;
  curChildObj.filterItStart(filterPause,filterIncrement,endRotateActionStr);
 }
 else{
  curChildObj.css.zIndex=9999;
  prevChildObj.css.zIndex=prevChildObj.z;
  //this.rotateItschildLyrHandle=setTimeout("utilObj.layerList['"+this.name+"'].rotateItschildLyr()",this.rotatechildLyrPause);
  //alert("utilObj.layerList['"+this.name+"'].rotateItschildLyr("+loop+","+curLoopNo+","+curChildIndex+","+pause+","+filterType+","+filterPause+","+filterIncrementValue+",\""+endRotateActionStr+"\")",pause);
  this.rotateItschildLyrHandle=setTimeout("utilObj.layerList['"+this.name+"'].rotateItschildLyr("+loop+","+curLoopNo+","+curChildIndex+","+pause+","+filterType+","+filterPause+","+filterIncrementValue+",\""+endRotateActionStr+"\")",pause);

 }
}

layerObjClass.prototype.filterItStart = function(filterPause,filterIncrement){
 if(bw.ns4){
  return false;
 }
 if(filterPause==null){
  filterPause=50;
 }
 if(filterIncrement==null){
  filterIncrement=10;
 }
 if(filterIncrement==0){
  filterIncrement=1;
 }
 if(filterIncrement>0){
  this.curFade=0;
 }
 else{
  this.curFade=100;
 }
 this.filterPause=filterPause;
 this.filterIncrement=filterIncrement;
 this.filterItHandle=setInterval("utilObj.layerList['"+this.name+"'].filterIt()",this.filterPause);
}

layerObjClass.prototype.translationShow=function(f){
  if(bw.filter){
    if(!this.evnt.filters[0]){
     this.evnt.filters[0].Stop();
    }
    else{
     this.css.filter=f;
    }
    this.evnt.innerHTML="";
    this.showIt();
    this.evnt.filters[0].apply();
    this.evnt.filters[0].play();
    this.evnt.innerHTML=this.content;
  }
}

layerObjClass.prototype.translationHide=function(f){
  if(bw.filter){
    if(!this.evnt.filters[0]){
     this.evnt.filters[0].Stop();
    }
    else{
     this.css.filter=f;
    }
    this.evnt.innerHTML=this.content;
    this.showIt();
    this.evnt.filters[0].apply();
    this.evnt.filters[0].play();
    this.evnt.innerHTML="";
  }
}
layerObjClass.prototype.filterIt = function(){
 if(bw.ns4){
  return false;
 }
 if (this.curFade<100&&this.filterIncrement>0||this.curFade>0&&this.filterIncrement<0){
  this.curFade+=this.filterIncrement;
  if (this.evnt.filters){

   this.evnt.filters.alpha.opacity=this.curFade
   util_msg(this.curFade+":"+this.filterIncrement+":"+this.evnt.filters.alpha.opacity)
  }
  else if (this.evnt.style.MozOpacity){
   this.evnt.style.MozOpacity=this.curFade/100
  }
 }
 else{
  clearInterval(this.filterItHandle);
  if(this.parentObj&&this.parentObj.rotatechildLyrPause!=null){
   this.parentObj.childLyr[this.parentObj.prevRotateChildIndex].css.zIndex=this.parentObj.childLyr[this.parentObj.prevRotateChildIndex].z;
   this.parentObj.rotateItschildLyrHandle=setTimeout("utilObj.layerList['"+this.parentObj.name+"'].rotateItschildLyr()",this.parentObj.rotatechildLyrPause);
  }
 }
}
layerObjClass.prototype.resetFilterIt = function(){
 if(bw.ns4){
  return false;
 }
 this.curFade=0;
 if (this.evnt.filters){
  this.evnt.filters.alpha.opacity=this.curFade
 }
 else if (this.evnt.style.MozOpacity){
  this.evnt.style.MozOpacity=this.curFade/100
 }
}
layerObjClass.prototype.clipIt = function(t,r,b,l,setwidth){
 this.w=r;
 this.h=b;
 if(bw.ns4){
  this.css.clip.top=t;
  this.css.clip.right=r;
  this.css.clip.bottom=b;
  this.css.clip.left=l
 }
 else if(bw.ie){
 /*
  if(t<0){
   t=0;
  }
  if(r<0){
   r=0;
  }
  if(b<0){
   b=0;
  }
  if(b<0){
   b=0;
  }
  */
  this.css.clip="rect("+t+bw.px+","+r+bw.px+","+b+bw.px+","+l+bw.px+")";
  if(setwidth){
   if(bw.op5||bw.op6){
    this.css.pixelWidth=r;
    this.css.pixelHeight=b;
   }
   else{
    this.css.width=r+bw.px;
    this.css.height=b+bw.px;
   }
  }
 }
}
/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

function marqueeObjClass(attribute){

 this.attribute=attribute;
 this.objType='marquee';
 if(attribute.name==null||attribute.name==""){
  attribute.name = utilObj.name+"_marquee"+getUniqueID();
  alert("System generate name for marquee:"+attribute.name);
 }
 if(!attribute.contentAttribute){
  alert('No contentAttribute supplied');
 }
 //attribute.w=(attribute.w==null)?100:attribute.w;
 //attribute.h=(attribute.h==null)?20:attribute.h;
 attribute.visible=(attribute.visible==null)?true:attribute.visible;
 attribute.z=(attribute.z==null)?0:attribute.z;
 attribute.shiftDirection=(attribute.shiftDirection==null)?'left':attribute.shiftDirection;
 //attribute.showWhenStart_AnchorType=(attribute.showWhenStart_AnchorType==null)?null:attribute.showWhenStart_AnchorType;
 attribute.marqueeShowContentDelay=(attribute.marqueeShowContentDelay==null)?0:attribute.marqueeShowContentDelay;
 attribute.marqueeStartShiftingDelay=(attribute.marqueeStartShiftingDelay==null)?0:attribute.marqueeStartShiftingDelay;
 attribute.shiftAmount=(attribute.shiftAmount==null)?'left':attribute.shiftAmount;
 attribute.shiftDelay=(attribute.shiftDelay==null)?100:attribute.shiftDelay;
 attribute.showWhenStart_Displacement=(attribute.showWhenStart_Displacement==null)?0:attribute.showWhenStart_Displacement;
 attribute.showWhenStart_DisplacementFrom=(attribute.showWhenStart_DisplacementFrom==null)?null:attribute.showWhenStart_DisplacementFrom;
 attribute.showWhenStop_Displacement=(attribute.showWhenStop_Displacement==null)?0:attribute.showWhenStop_Displacement;
 attribute.showWhenStop_DisplacementFrom=(attribute.showWhenStop_DisplacementFrom==null)?null:attribute.showWhenStop_DisplacementFrom;
 attribute.loopNum=(attribute.loopNum==null)?null:attribute.loopNum;
 if(attribute.loopNum==null){
  this.startLoopCount=false;
 }
 attribute.linkAttribute=(attribute.linkAttribute==null)?{}:attribute.linkAttribute;
 attribute.linkAttribute.target=(attribute.linkAttribute.target==null)?"_self":attribute.linkAttribute.target;
 attribute.linkAttribute.target_parameter="";
 attribute.linkAttribute.url=(attribute.linkAttribute.url==null)?"javascript:void(null)":attribute.linkAttribute.url;
 this.loopCount=0;
 if(bw.ns4&&attribute.x==null&&attribute.y==null&&attribute.position!='absolute'){
  attribute.afterTagHTML="<img name="+attribute.name+"_transgif src=transparent.gif height="+attribute.h+" width="+attribute.w+">";
  attribute.NSadjust=true;
 }
 this.layerObj=utilObj.defineLayer(attribute);
 this.layerObj.marqueeObj=this;
       
 attribute.clipWindowAttribute=(attribute.clipWindowAttribute==null)?{}:attribute.clipWindowAttribute;
 attribute.clipWindowAttribute.name=attribute.name+"_clipWindow";
 attribute.clipWindowAttribute.visible=true;
 attribute.clipWindowAttribute.parent=attribute.name;
 
 //attribute.clipWindowAttribute.content="";
 if(!attribute.clipWindowAttribute.x){
  attribute.clipWindowAttribute.x=0;
 }
 if(!attribute.clipWindowAttribute.y){
  attribute.clipWindowAttribute.y=0;
 }
 if(!attribute.clipWindowAttribute.w){
  attribute.clipWindowAttribute.w=0;
 }
 if(!attribute.clipWindowAttribute.h){
  attribute.clipWindowAttribute.h=0;
 }
 attribute.clipWindowAttribute.overflow="hidden";
 attribute.clipWindowAttribute.z=attribute.z;
 this.clipWindowObj=utilObj.defineLayer(attribute.clipWindowAttribute);
 this.clipWindowObj.marqueeObj=this;
 
 attribute.contentAttribute.parent=attribute.clipWindowAttribute.name;
 attribute.contentAttribute.visible=true;
 
 attribute.contentAttribute.name=attribute.name+"_content";
 attribute.contentAttribute.x=0;
 attribute.contentAttribute.y=0;
 attribute.contentAttribute.visible=false;
 attribute.contentAttribute.beforeContentHTML='<nobr>';
 attribute.contentAttribute.afterContentHTML='</nobr>';
 this.contentObj=utilObj.defineLayer(attribute.contentAttribute);
 this.contentObj.marqueeObj=this;
 if(!attribute.noGlassLayer){
  if(attribute.noMouseEvent){
   if(bw.ie){
    glassObjContent="<img src=transparent2.gif style=\"cursor:normal\" "+((attribute.w!=null)?(" width="+attribute.w):"")+((attribute.h!=null)?(" height="+attribute.h):"")+">";
   }
   else {
    glassObjContent="<img src=transparent2.gif border=0"+((attribute.w!=null)?(" width="+attribute.w):"")+((attribute.h!=null)?(" height="+attribute.h):"")+">";
   }
  
   attribute.glassObjAttribute={
 	name:attribute.name+"_glass",
 	visible:true,
 	parent:attribute.name,
        content:glassObjContent,
        x:0,
        y:0,
        w:attribute.w,
        h:attribute.h,
        z:attribute.z
   }
  }
  else{
   if(bw.ie){
    glassObjContent="<img src=transparent2.gif style=\"cursor:hand\" "+((attribute.w!=null)?(" width="+attribute.w):"")+((attribute.h!=null)?(" height="+attribute.h):"")+">";
   }
   else {
    glassObjContent="<img src=transparent2.gif border=0"+((attribute.w!=null)?(" width="+attribute.w):"")+((attribute.h!=null)?(" height="+attribute.h):"")+">";
   }
   attribute.glassObjAttribute={
   	name:attribute.name+"_glass",
   	visible:true,
   	parent:attribute.name,
          content:glassObjContent,
          x:0,
          y:0,
          w:attribute.w,
          h:attribute.h,
          z:attribute.z,
          onMouseOut:"this.layerObj.marqueeObj.onMouseOut()",
          onMouseOver:"this.layerObj.marqueeObj.onMouseOver()",
          onMouseDown:"this.layerObj.marqueeObj.onMouseDown()",
          onMouseClick:"this.layerObj.marqueeObj.onMouseClick()"
   }
  }
  this.glassObj=utilObj.defineLayer(attribute.glassObjAttribute);
  this.glassObj.marqueeObj=this;
 }
}

marqueeObjClass.prototype.construct = function(){
 document.open();
 document.write(this.layerObj.createHTMLstr()+((bw.ns4&&this.attribute.x==null&&this.attribute.y==null)?"<img name="+this.name+"_transgif src=transparent.gif height="+this.attribute.h+" width="+this.attribute.w+">":""));
 document.close();
 this.layerObj.evalReference();
 if(bw.ns4){ //adjust for Netscape after window resized
  eval("var x=document.images."+this.attribute.name+"_transgif.x");
  eval("var y=document.images."+this.attribute.name+"_transgif.y");
  this.layerObj.moveIt(x,y);
 }
 //this.start();
}

marqueeObjClass.prototype.onMouseOut=function(){	
 if(bw.ie){
   window.event.cancelBubble=true;
 }
 this.resumeShifting();
}

marqueeObjClass.prototype.onMouseOver=function(){	
 if(bw.ie){
   window.event.cancelBubble=true;
 }
 this.stopShifting();
}

marqueeObjClass.prototype.onMouseDown=function(){	
 if(bw.ie){
   window.event.cancelBubble=true;
 }
}

marqueeObjClass.prototype.onMouseClick=function(){	
 if(bw.ie){
   window.event.cancelBubble=true;
 }
 utilObj.linkIt(this.attribute.linkAttribute);
}
marqueeObjClass.prototype.start=function(){
 //alert(this.attribute.name);
 setTimeout("utilObj.layerList['"+this.attribute.name+"'].marqueeObj.showContent()",this.attribute.marqueeShowContentDelay);
}
marqueeObjClass.prototype.showContent=function(){
 var posX,posY;
 if(this.attribute.shiftDirection=='left'){
  posY=0;
  if(this.attribute.showWhenStart_DisplacementFrom=='beginning'){ 
   posX=this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom=='ending'){ 
   posX=this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom=='middle'){ 
   posX=(this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth)/2+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom==null){
   posX=this.clipWindowObj.attribute.w+this.attribute.showWhenStart_Displacement;
  }
  if(posX<=this.contentObj.evnt.scrollWidth*-1){
   posX=this.clipWindowObj.attribute.w;  
  }
  
  if(this.attribute.showWhenStop_DisplacementFrom=='beginning'){ 
   this.showWhenStop_X=this.attribute.showWhenStop_Displacement;
   this.showWhenStop_Y=null;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='ending'){ 
   this.showWhenStop_X=this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth+this.attribute.showWhenStop_Displacement;
   this.showWhenStop_Y=null;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='middle'){ 
   this.showWhenStop_X=(this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth)/2+this.attribute.showWhenStop_Displacement;
   this.showWhenStop_Y=null;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='auto'){
   if(this.contentObj.evnt.scrollWidth>this.clipWindowObj.attribute.w){
    this.showWhenStop_X=this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth+this.attribute.showWhenStop_Displacement;
   }
   else{
    this.showWhenStop_X=this.attribute.showWhenStop_Displacement;
   }
   this.showWhenStop_Y=null;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom==null){
   this.showWhenStop_X=this.clipWindowObj.attribute.w+this.attribute.showWhenStart_Displacement;
   this.showWhenStop_Y=null;
  }
  //alert(this.showWhenStop_X);
 }
 else if(this.attribute.shiftDirection=='right'){
  posY=0;
  if(this.attribute.showWhenStart_DisplacementFrom=='beginning'){ 
   posX=this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth+this.attribute.showWhenStart_Displacement,0;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom=='ending'){ 
   posX=this.attribute.showWhenStart_Displacement,0;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom=='middle'){ 
   posX=(this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth)/2+this.attribute.showWhenStart_Displacement,0;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom==null){
   posX=-1*this.contentObj.evnt.scrollWidth,0;
  }
  if(posX>=this.clipWindowObj.attribute.w){
   posX=this.contentObj.evnt.scrollWidth*-1;  
  }

  if(this.attribute.showWhenStop_DisplacementFrom=='beginning'){ 
   this.showWhenStop_X=this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth+this.attribute.showWhenStart_Displacement;
   this.showWhenStop_Y=null;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='ending'){ 
   this.showWhenStop_X=this.attribute.showWhenStart_Displacement;
   this.showWhenStop_Y=null;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='middle'){ 
   this.showWhenStop_X=(this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth)/2+this.attribute.showWhenStart_Displacement;
   this.showWhenStop_Y=null;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='auto'){
   if(this.contentObj.evnt.scrollWidth>this.clipWindowObj.attribute.w){
    this.showWhenStop_X=this.attribute.showWhenStop_Displacement; 
   }
   else{
    this.showWhenStop_X=this.clipWindowObj.attribute.w-this.contentObj.evnt.scrollWidth+this.attribute.showWhenStop_Displacement;   
   }
   this.showWhenStop_Y=null;
  }  
  else if(this.attribute.showWhenStop_DisplacementFrom==null){
   this.showWhenStop_X=-1*this.contentObj.evnt.scrollWidth;
   this.showWhenStop_Y=null;
  }
 }
 else if(this.attribute.shiftDirection=='up'){
 posX=0;
  if(this.attribute.showWhenStart_DisplacementFrom=='beginning'){ 
   posY=this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom=='ending'){ 
   posY=this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom=='middle'){ 
   posY=(this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight)/2+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom==null){
   posY=this.clipWindowObj.attribute.h+this.attribute.showWhenStart_Displacement;
  }
  if(posY<=this.contentObj.evnt.scrollHeight*-1){
   posY=this.clipWindowObj.attribute.h;  
  }

  if(this.attribute.showWhenStop_DisplacementFrom=='beginning'){ 
   this.showWhenStop_X=null;
   this.showWhenStop_Y=this.attribute.showWhenStart_Displacement;   
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='ending'){ 
   this.showWhenStop_X=null;
   this.showWhenStop_Y=this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='middle'){ 
   this.showWhenStop_X=null;
   this.showWhenStop_Y=(this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight)/2+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='auto'){
   if(this.contentObj.evnt.scrollHeight>this.clipWindowObj.attribute.h){
    this.showWhenStop_Y=this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight+this.attribute.showWhenStop_Displacement;
   }
   else{
    this.showWhenStop_Y=this.attribute.showWhenStop_Displacement;
   }
   this.showWhenStop_X=null;
  }  
  else if(this.attribute.showWhenStop_DisplacementFrom==null){
   this.showWhenStop_X=null;
   this.showWhenStop_Y=this.clipWindowObj.attribute.h+this.attribute.showWhenStart_Displacement;
  }
 }
 else if(this.attribute.shiftDirection=='down'){
  posX=0;
  if(this.attribute.showWhenStart_DisplacementFrom=='beginning'){ 
   posY=this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom=='ending'){ 
   posY=this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom=='middle'){ 
   posY=(this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight)/2+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStart_DisplacementFrom==null){
   posY=-1*this.contentObj.evnt.scrollHeight;
  }
  if(posY>=this.clipWindowObj.attribute.h){
   posY=this.contentObj.evnt.scrollHeight*-1;  
  }

  if(this.attribute.showWhenStop_DisplacementFrom=='beginning'){ 
   this.showWhenStop_X=null;
   this.showWhenStop_Y=this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight+this.attribute.showWhenStart_Displacement;   
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='ending'){ 
   this.showWhenStop_X=null;
   this.showWhenStop_Y=this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='middle'){ 
   this.showWhenStop_X=null;
   this.showWhenStop_Y=(this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight)/2+this.attribute.showWhenStart_Displacement;
  }
  else if(this.attribute.showWhenStop_DisplacementFrom=='auto'){
   if(this.contentObj.evnt.scrollHeight>this.clipWindowObj.attribute.h){
    this.showWhenStop_Y=this.attribute.showWhenStop_Displacement; 
   }
   else{
    this.showWhenStop_Y=this.clipWindowObj.attribute.h-this.contentObj.evnt.scrollHeight+this.attribute.showWhenStop_Displacement;   
   }
   this.showWhenStop_X=null;
  }  
  else if(this.attribute.showWhenStop_DisplacementFrom==null){
   this.showWhenStop_X=null;
   this.showWhenStop_Y=-1*this.contentObj.evnt.scrollHeight;
  }
 }
 this.contentObj.moveIt(posX,posY);
 this.contentObj.showIt();
 
 setTimeout("utilObj.layerList['"+this.attribute.name+"'].marqueeObj.startShifting()",this.attribute.marqueeStartShiftingDelay);
}
marqueeObjClass.prototype.startShifting=function(){
 this.intervalHandle=setInterval("utilObj.layerList['"+this.attribute.name+"'].marqueeObj.shift()",this.attribute.shiftDelay);
}
marqueeObjClass.prototype.shift=function(){
 var currentX=parseInt(this.contentObj.css.left,10)
 var currentY=parseInt(this.contentObj.css.top,10)
 var nextX,nextY;
 if(this.attribute.shiftDirection=='left'){
  nextX=currentX+(this.attribute.shiftAmount*-1);  
  if(nextX<=this.contentObj.evnt.scrollWidth*-1){
   nextX=this.clipWindowObj.attribute.w;  
  }
  this.contentObj.moveIt(nextX,0);
  if(this.startLoopCount==null){
   if(nextX>=this.showWhenStop_X){
    this.startLoopCount=true;
   }
  }
  if(this.startLoopCount){
   if(nextX<=this.showWhenStop_X){
    this.startLoopCount=null;
    this.loopCount++;       
   }
   window.status=this.loopCount+":"+this.attribute.loopNum;
   if(this.loopCount>=this.attribute.loopNum){
    this.stopShifting(); 
   }
  }
 }
 else if(this.attribute.shiftDirection=='right'){
  nextX=currentX+(this.attribute.shiftAmount);  
  if(nextX>=this.clipWindowObj.attribute.w){
   nextX=this.contentObj.evnt.scrollWidth*-1;  
  }
  this.contentObj.moveIt(nextX,0);
  if(this.startLoopCount==null){
   if(nextX<=this.showWhenStop_X){
    this.startLoopCount=true;
   }
  }
  if(this.startLoopCount){
   if(nextX>=this.showWhenStop_X){
    this.startLoopCount=null
    this.loopCount++;       
   }
   if(this.loopCount>=this.attribute.loopNum){
    this.stopShifting(); 
   }
  }
 }
 else if(this.attribute.shiftDirection=='up'){
  nextY=currentY+(this.attribute.shiftAmount*-1);  
  if(nextY<=this.contentObj.evnt.scrollHeight*-1){
   nextY=this.clipWindowObj.attribute.h;  
  }
  this.contentObj.moveIt(0,nextY);
  if(this.startLoopCount==null){
   if(nextY>=this.showWhenStop_Y){
    this.startLoopCount=true;
   }
  }
  if(this.startLoopCount){
   if(nextY<=this.showWhenStop_Y){
    this.startLoopCount=null
    this.loopCount++;       
   }
   if(this.loopCount>=this.attribute.loopNum){
    this.stopShifting(); 
   }
  }
 }
 else if(this.attribute.shiftDirection=='down'){
  nextY=currentY+(this.attribute.shiftAmount);  
  if(nextY>=this.clipWindowObj.attribute.h){
   nextY=this.contentObj.evnt.scrollHeight*-1;  
  }
  this.contentObj.moveIt(0,nextY);
  if(this.startLoopCount==null){
   if(nextY<=this.showWhenStop_Y){
    this.startLoopCount=true;
   }
  }
  if(this.startLoopCount){
   if(nextY>=this.showWhenStop_Y){
    this.startLoopCount=null
    this.loopCount++;       
   }
   if(this.loopCount>=this.attribute.loopNum){
    this.stopShifting(); 
   }
  }
 }   
}

marqueeObjClass.prototype.stopShifting=function(){	
 clearInterval(this.intervalHandle);
}
marqueeObjClass.prototype.resumeShifting=function(){
 this.intervalHandle=setInterval("utilObj.layerList['"+this.attribute.name+"'].marqueeObj.shift()",this.attribute.shiftDelay);
}



/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

function menuSystemObjClass(attribute){
 this.attribute=attribute;
 this.objType='menuSystem';
 this.subMenuSystemObjList=new Array();
 if(attribute.name==null||attribute.name==""){
  attribute.name = utilObj.name+"_menuSystem"+getUniqueID();
  alert("System generate name for menuSystem:"+attribute.name);
 }
 utilObj.menuSystemList[attribute.name]= this;
 //set parentObj
 if(attribute.parent!=null){
  if(utilObj.menuSystemList[attribute.parent]){
   attribute.parentObj=utilObj.menuSystemList[attribute.parent];
   
   if(attribute.mouseOutTimeout==null){
    attribute.mouseOutTimeout=attribute.parentObj.attribute.mouseOutTimeout;
   }
   //alert(attribute.name+":"+attribute.parentObj.attribute.name+":"+attribute.parentObj.attribute.mouseOutTimeout+":"+attribute.mouseOutTimeout)
   //alert('has parent');
  }
  else{
   alert("parent menuSystem does not exist:" +attribute.parent+":"+attribute.name);
   //may want to define the parent menuSystem here.
   attribute.parentObj=false;
  }
 }
 else{
  attribute.parentObj=false;
 }
 if(attribute.buttonAttribute){
  if(attribute.parentObj){
   if(!attribute.parentObj.menuObj){
    alert("menuAttribute not define for menuSystem:"+attribute.parentObj.attribute.name);
   }
   var tmp1 = attribute.parentObj.menuObj.attribute;
   //var tmp1 = attribute.parentObj.attribute.menuAttribute;
   var tmp2 = attribute.buttonAttribute;
   if(tmp2.w==null) 
   tmp2.w=tmp1.buttonW;
   if(tmp2.h==null) 
   tmp2.h=tmp1.buttonH;
   if(tmp1.sidebyside){
    if(tmp2.x==null){ //relative positioning
     if(tmp1.w==0){
      tmp2.x=tmp1.paddingLeft;
     }
     else{
      tmp2.x=tmp1.w-tmp1.paddingRight+tmp1.hspace;
     }
    }
    if(tmp2.y==null){ //relative positioning
     tmp2.y=tmp1.paddingTop;
    }
    tmp1.w=(tmp1.w==0)?tmp1.paddingLeft+tmp2.w+tmp1.paddingRight:(tmp1.w+tmp2.w+tmp1.hspace)
    if(tmp1.h < (tmp2.h+tmp1.paddingTop+tmp1.paddingBottom)){
     tmp1.h = tmp2.h+tmp1.paddingTop+tmp1.paddingBottom;
    }
   }
   else{
    if(tmp2.y==null){
     if(tmp1.h==0){
      tmp2.y=tmp1.paddingTop;
     }
     else{
      tmp2.y=tmp1.h-tmp1.paddingBottom+tmp1.vspace;
     }
    }
    if(tmp2.x==null){
     tmp2.x=tmp1.paddingLeft;
    }
    tmp1.h=(tmp1.h==0)?tmp1.paddingTop+tmp2.h+tmp1.paddingBottom:(tmp1.h+tmp2.h+tmp1.vspace)	
    if(tmp1.w < (tmp2.w+tmp1.paddingLeft+tmp1.paddingRight)){
     tmp1.w = tmp2.w+tmp1.paddingLeft+tmp1.paddingRight;
    }
   }
   tmp1.clipRight=tmp1.w;
   tmp1.clipBottom=tmp1.h;
  }  
  attribute.buttonAttribute.name=attribute.name+"_button";	
  if(attribute.parentObj){
   var t1=attribute.parentObj.menuObj.attribute;
   attribute.buttonAttribute.parent=t1.name;
   //combine the parent menuobj attribute with the button attribute
   
   if(attribute.buttonAttribute.mClickObjAttribute){
    for(var i in t1.mClickObjAttribute){
     attribute.buttonAttribute.mClickObjAttribute[i]=t1.mClickObjAttribute[i];
    }
   }
   else{
    if(t1.mClickObjAttribute){
     //take attribute of buttonClick attribute from buttonDown attribute
     attribute.buttonAttribute.mClickObjAttribute={};
     if(attribute.buttonAttribute.mDownObjAttribute){
      for(var i in attribute.buttonAttribute.mDownObjAttribute){
       attribute.buttonAttribute.mClickObjAttribute[i]=attribute.buttonAttribute.mDownObjAttribute[i]
      }     	
     }
     else if(attribute.buttonAttribute.mOverObjAttribute){
      for(var i in attribute.buttonAttribute.mOverObjAttribute){
       attribute.buttonAttribute.mClickObjAttribute[i]=attribute.buttonAttribute.mOverObjAttribute[i]
      }     	
     }
     else{
      for(var i in attribute.buttonAttribute.mOutObjAttribute){
       attribute.buttonAttribute.mClickObjAttribute[i]=attribute.buttonAttribute.mOutObjAttribute[i]
      }
     }
     for(var i in t1.mClickObjAttribute){
      attribute.buttonAttribute.mClickObjAttribute[i]=t1.mClickObjAttribute[i];
     }
    }   
   }   
   if(attribute.buttonAttribute.mDownObjAttribute){
    for(var i in t1.mDownObjAttribute){    	
     attribute.buttonAttribute.mDownObjAttribute[i]=t1.mDownObjAttribute[i];
    }
   }
   else{
    if(t1.mDownObjAttribute){
     //take attribute of buttonDown attribute from buttonOver attribute
     attribute.buttonAttribute.mDownObjAttribute={};
     if(attribute.buttonAttribute.mOverObjAttribute){
      for(var i in attribute.buttonAttribute.mOverObjAttribute){
       attribute.buttonAttribute.mDownObjAttribute[i]=attribute.buttonAttribute.mOverObjAttribute[i]
      }     	
     }
     else{
      for(var i in attribute.buttonAttribute.mOutObjAttribute){
       attribute.buttonAttribute.mDownObjAttribute[i]=attribute.buttonAttribute.mOutObjAttribute[i]
      }
     }
     for(var i in t1.mDownObjAttribute){
      attribute.buttonAttribute.mDownObjAttribute[i]=t1.mDownObjAttribute[i];
     }
    }   
   }
   
   if(attribute.buttonAttribute.mOverObjAttribute){
    for(var i in t1.mOverObjAttribute){
     attribute.buttonAttribute.mOverObjAttribute[i]=t1.mOverObjAttribute[i];
    }
   }
   else{
    if(t1.mOverObjAttribute){
     //take attribute of buttonOver attribute from buttonOut attribute
     attribute.buttonAttribute.mOverObjAttribute={};
     for(var i in attribute.buttonAttribute.mOutObjAttribute){
      attribute.buttonAttribute.mOverObjAttribute[i]=attribute.buttonAttribute.mOutObjAttribute[i]
     }
     for(var i in t1.mOverObjAttribute){
      attribute.buttonAttribute.mOverObjAttribute[i]=t1.mOverObjAttribute[i];
     }
    }
   }
   
   if(attribute.buttonAttribute.mOutObjAttribute){
    for(var i in t1.mOutObjAttribute){
     attribute.buttonAttribute.mOutObjAttribute[i]=t1.mOutObjAttribute[i];
    }
   }
   
   
      
   //alert(attribute.buttonAttribute.mClickObjAttribute.content);
   //this.buttonObj= attribute.parentObj.menuItemList[attribute.buttonAttribute.name]=new buttonObjClass(attribute.buttonAttribute,attribute.parentObj.menuObj.attribute);
   //this.buttonObj=new buttonObjClass(attribute.buttonAttribute,attribute.parentObj.menuObj.attribute);
   this.buttonObj=new buttonObjClass(attribute.buttonAttribute);
   attribute.parentObj.subMenuSystemObjList[attribute.name]=this;
   //alert(this.buttonObj.layerObj.createHTMLstr())
  }
  else{
   this.buttonObj= new buttonObjClass(attribute.buttonAttribute);
  }
  this.buttonObj.menuSystemObj=this;
 }	
 //copy menuAttribute from parent menuSystem.
 /*
 if(attribute.parentObj){
  if(attribute.menuAttribute==null){
   attribute.menuAttribute={};	
  }
  for(var i in attribute.parentObj.attribute.menuAttribute){
   if(attribute.menuAttribute[i]==null){
    attribute.menuAttribute[i]=attribute.parentObj.attribute.menuAttribute[i]
   }
  }
 }
 */
 if(attribute.menuAttribute){
  attribute.menuAttribute.name=attribute.name+"_menu";	
  if(utilObj.menuList[attribute.name]!=null){
   alert('duplicate menu name:'+attribute.name);
   return null;
  }
  //if(attribute.menuAttribute.h==null){
   attribute.menuAttribute.h=0;
  //}
  //if(attribute.menuAttribute.w==null){
   attribute.menuAttribute.w=0;
  //}
  if(attribute.buttonAttribute){
   if(attribute.menuAttribute.anchor=='right'){
    attribute.menuAttribute.x=attribute.parentObj.menuObj.attribute.x+attribute.buttonAttribute.x+attribute.buttonAttribute.w+attribute.menuAttribute.dx;
    attribute.menuAttribute.y=attribute.parentObj.menuObj.attribute.y+attribute.buttonAttribute.y+attribute.menuAttribute.dy;
   }
   else if(attribute.menuAttribute.anchor=='left'){
   	
   }
   else if(attribute.menuAttribute.anchor=='top'){
  	
   } 
   else if(attribute.menuAttribute.anchor=='bottom'){
  	
   }
  }
  if(attribute.menuAttribute.x==null){
    //attribute.menuAttribute
  }
  if(attribute.menuAttribute.y==null){
    	
  }
  this.menuObj=new menuObjClass(attribute.menuAttribute);
  this.menuObj.menuSystemObj=this;
  utilObj.menuList[attribute.name]=this;
 }
 return this;
}
menuSystemObjClass.prototype.isOverCurrentOrSubMenuSystem=function(){
 if(this.buttonObj&&this.buttonObj.isOver||this.menuObj&&this.menuObj.isOver){
 //if(this.menuObj&&this.menuObj.isOver){
  return true;	
 }
 for(var i in this.subMenuSystemObjList){
  if(this.subMenuSystemObjList[i].isOverCurrentOrSubMenuSystem()){
   return true;	
  }	
 }
 return false;
}
menuSystemObjClass.prototype.onMouseOut=function(){
 //alert(this.timeout)
 if(this.timeout==null||!this.timeout){
  this.timeout=setTimeout("utilObj.menuSystemList['"+this.attribute.name+"'].mouseOutAction()",this.attribute.mouseOutTimeout);
  //alert(this.attribute.mouseOutTimeout+":"+this.attribute.name+":"+this.timeout);
 }
 //util_debug(this.timeout);
}
menuSystemObjClass.prototype.mouseOutAction=function(){
 this.timeout=false;
 //util_debug(this.attribute.name);

/*
 if(this.attribute.parentObj){
  if(this.attribute.parentObj.isOverCurrentMenuSystem()){
   this.attribute.parentObj.mouseOutAction();
   return;
  }
 }
 */
 // this is need to keep menu on when mouse roll over to submenu but not to any of the button (ie gaps, border)
 if(this.isOverCurrentOrSubMenuSystem()){
  return;
 }
 
 if(this.buttonObj){
   if(this.buttonObj.mOutObj)this.buttonObj.mOutObj.showIt();
   if(this.buttonObj.mOverObj)this.buttonObj.mOverObj.hideIt();
   if(this.buttonObj.mDownObj)this.buttonObj.mDownObj.hideIt();
   if(this.buttonObj.mClickObj)this.buttonObj.mClickObj.hideIt();
 }
 if(this.menuObj){
  if(!this.menuObj.attribute.visible){
   this.menuObj.layerObj.hideIt();
  }
 }
 
 if(this.attribute.parentObj){
  this.attribute.parentObj.mouseOutAction();	
 }
 
 
 var t=this.subMenuSystemObjList;
 for(var i in t){
  clearTimeout(t[i].timeout);
  t[i].timeout=false;
  t[i].mouseOutActionNoChecking();
 }
}

menuSystemObjClass.prototype.mouseOutActionNoChecking=function(){
 this.timeout=false;
 if(this.buttonObj){
  if(this.buttonObj.mOutObj)this.buttonObj.mOutObj.showIt(false);
  if(this.buttonObj.mOverObj)this.buttonObj.mOverObj.hideIt(false);
  if(this.buttonObj.mDownObj)this.buttonObj.mDownObj.hideIt(false);
  if(this.buttonObj.mClickObj)this.buttonObj.mClickObj.hideIt(false);
 }
 if(this.menuObj){
  if(!this.menuObj.attribute.visible){
   this.menuObj.layerObj.hideIt(false);
  }
 }
 var t=this.subMenuSystemObjList;
 for(var i in t){
  clearTimeout(t[i].timeout);
  t[i].timeout=false;
  t[i].mouseOutActionNoChecking();
 }
}

menuSystemObjClass.prototype.onMouseOver=function(){
 if(this.attribute.parentObj){
  //util_debug(this.attribute.name+":"+this.attribute.parentObj.attribute.name+":"+this.timeout);
  clearTimeout(this.attribute.parentObj.timeout);
  this.attribute.parentObj.timeout=false;
  var t=this.attribute.parentObj.subMenuSystemObjList;
  for(var i in t){
   if(t[i]!=this){
    clearTimeout(t[i].timeout);
    t[i].timeout=false;
    t[i].mouseOutAction();
   }
  }
  var t=this.subMenuSystemObjList;
  for(var i in t){
   clearTimeout(t[i].timeout);
   t[i].timeout=false;
   t[i].mouseOutActionNoChecking();
  }
 }
 this.mouseOverAction(); 
}
menuSystemObjClass.prototype.mouseOverAction=function(){
 if(this.buttonObj){
  if(this.buttonObj.mOutObj){
   if(!this.buttonObj.mOverObj){	
    this.buttonObj.mOutObj.showIt();
   }
   else{
    this.buttonObj.mOutObj.hideIt();
   }	
  }
  if(this.buttonObj.mOverObj)this.buttonObj.mOverObj.showIt();
  if(this.buttonObj.mDownObj)this.buttonObj.mDownObj.hideIt();
  if(this.buttonObj.mClickObj)this.buttonObj.mClickObj.hideIt();	
 }
 if(this.menuObj){
  var x,y;
  if(bw.ie){
   x=this.attribute.parentObj.menuObj.layerObj.evnt.offsetLeft+this.buttonObj.layerObj.evnt.offsetLeft+this.buttonObj.attribute.w+this.attribute.menuAttribute.dx;
   y=this.attribute.parentObj.menuObj.layerObj.evnt.offsetTop+this.buttonObj.layerObj.evnt.offsetTop+this.attribute.menuAttribute.dy;
  }
  else{
   x=this.attribute.parentObj.menuObj.layerObj.evnt.left+this.buttonObj.layerObj.evnt.left+this.buttonObj.attribute.w+this.attribute.menuAttribute.dx;
   y=this.attribute.parentObj.menuObj.layerObj.evnt.top+this.buttonObj.layerObj.evnt.top+this.attribute.menuAttribute.dy;  
  }
  this.menuObj.layerObj.moveIt(x,y);
  this.menuObj.layerObj.showIt();
 }	
}
menuSystemObjClass.prototype.contruct = function(){
 
}

function menuObjClass(attribute){
 this.attribute=attribute;
 this.objType='menu';
 //this.attribute=(attribute==null)?{}:attribute;
 //this.menuItemList=new Array();
 if(attribute.sidebyside==null)attribute.sidebyside=true;
 if(attribute.w==null)attribute.w=0;
 if(attribute.h==null)attribute.h=0;
 attribute.originW=attribute.w;
 attribute.originH=attribute.h;
 if(attribute.paddingTop==null)attribute.paddingTop=0;
 if(attribute.paddingBottom==null)attribute.paddingBottom=0;
 if(attribute.paddingLeft==null)attribute.paddingLeft=0;
 if(attribute.paddingRight==null)attribute.paddingRight=0;
 //if(attribute.padding==null)attribute.padding=0;
 //if(attribute.dx==null)attribute.dx=0;
 //if(attribute.dy==null)attribute.dy=0;
 if(attribute.vspace==null)attribute.vspace=0;
 if(attribute.hspace==null)attribute.hspace=0;
 if(attribute.beforeContentHTML==null)attribute.beforeContentHTML="";
 if(attribute.afterContentHTML==null)attribute.afterContentHTML="";
 if(attribute.beforeChildHTML==null)attribute.beforeChildHTML="";
 if(attribute.afterChildHTML==null)attribute.afterChildHTML="";
 attribute.onMouseOut="this.layerObj.menuObj.onMouseOut()";
 attribute.onMouseOver="this.layerObj.menuObj.onMouseOver()";
 this.layerObj=utilObj.defineLayer(this.attribute);
 this.layerObj.menuObj=this;
}
menuObjClass.prototype.onMouseOut=function(){
 if(bw.ie){
  window.event.cancelBubble=true;
 }
 this.isOver=false;
 //util_debug(this.attribute.name+"menuObj.onMouseOut");
 this.menuSystemObj.onMouseOut();
}

menuObjClass.prototype.onMouseOver=function(){
 if(bw.ie){
   window.event.cancelBubble=true;
 }
 this.isOver=true;
}

menuObjClass.prototype.createHTMLstr = function(){
 for(var i in this.subMenuSystemObjList){
  this.subMenuSystemObjList[i].buttonObj.createHTMLstr();	
 }
}
/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

function buttonObjClass(attribute){	
 this.attribute=attribute;
 this.objType='button';
 attribute.w=(attribute.w==null)?100:attribute.w;
 attribute.h=(attribute.h==null)?20:attribute.h;
 attribute.visible=(attribute.visible==null)?true:attribute.visible;
 attribute.z=(attribute.z==null)?0:attribute.z;
 attribute.linkAttribute=(attribute.linkAttribute==null)?{}:attribute.linkAttribute;
 attribute.linkAttribute.target=(attribute.linkAttribute.target==null)?"_self":attribute.linkAttribute.target;
 attribute.linkAttribute.target_parameter=attribute.linkAttribute.target_parameter;
 attribute.linkAttribute.url=(attribute.linkAttribute.url==null)?"javascript:void(null)":attribute.linkAttribute.url;
 if(bw.ie){
  glassObjContent="<img src=transparent2.gif style=\"cursor:hand\" "+((attribute.w!=null)?(" width="+attribute.w):"")+((attribute.h!=null)?(" height="+attribute.h):"")+">";
 }
 else {
  glassObjContent="<img src=transparent2.gif border=0"+((attribute.w!=null)?(" width="+attribute.w):"")+((attribute.h!=null)?(" height="+attribute.h):"")+">";
 }
 if(bw.ns4&&attribute.x==null&&attribute.y==null&&attribute.position!='absolute'){
  attribute.afterTagHTML="<img name="+attribute.name+"_transgif src=transparent.gif height="+attribute.h+" width="+attribute.w+">";
  attribute.NSadjust=true;
 }
 this.layerObj=utilObj.defineLayer(attribute);
 this.layerObj.buttonObj=this;
 if(attribute.mOutObjAttribute){
  attribute.mOutObjAttribute.x=(attribute.mOutObjAttribute.x==null)?0:attribute.mOutObjAttribute.x;
  attribute.mOutObjAttribute.y=(attribute.mOutObjAttribute.y==null)?0:attribute.mOutObjAttribute.y;
  attribute.mOutObjAttribute.name=attribute.name+"_mOut";
  attribute.mOutObjAttribute.visible=true;
  attribute.mOutObjAttribute.w=attribute.w;
  attribute.mOutObjAttribute.h=attribute.h;
  attribute.mOutObjAttribute.parent=attribute.name;
  this.mOutObj=utilObj.defineLayer(attribute.mOutObjAttribute);
  this.mOutObj.buttonObj=this;
 } 
 if(attribute.mOverObjAttribute){
  attribute.mOverObjAttribute.x=(attribute.mOverObjAttribute.x==null)?0:attribute.mOverObjAttribute.x;
  attribute.mOverObjAttribute.y=(attribute.mOverObjAttribute.y==null)?0:attribute.mOverObjAttribute.y;
  attribute.mOverObjAttribute.name=attribute.name+"_mOver";
  attribute.mOverObjAttribute.visible=false;
  attribute.mOverObjAttribute.w=attribute.w;
  attribute.mOverObjAttribute.h=attribute.h;
  attribute.mOverObjAttribute.parent=attribute.name;
  this.mOverObj=utilObj.defineLayer(attribute.mOverObjAttribute);
  this.mOverObj.buttonObj=this;
 }
 else{
  attribute.mOverObjAttribute={};
  attribute.mOverObjAttribute.x=(attribute.mOverObjAttribute.x==null)?0:attribute.mOverObjAttribute.x;
  attribute.mOverObjAttribute.y=(attribute.mOverObjAttribute.y==null)?0:attribute.mOverObjAttribute.y;
  attribute.mOverObjAttribute.name=attribute.name+"_mOver";
  attribute.mOverObjAttribute.visible=false;
  attribute.mOverObjAttribute.w=attribute.w;
  attribute.mOverObjAttribute.h=attribute.h;
  attribute.mOverObjAttribute.parent=attribute.name;
  attribute.mOverObjAttribute.content=(attribute.mOverObjAttribute.content==null)?((attribute.mOutObjAttribute.content==null)?"":attribute.mOutObjAttribute.content):"";
  this.mOverObj=utilObj.defineLayer(attribute.mOverObjAttribute);
  this.mOverObj.buttonObj=this;
 }
if(attribute.mDownObjAttribute){
  attribute.mDownObjAttribute.x=(attribute.mDownObjAttribute.x==null)?0:attribute.mDownObjAttribute.x;
  attribute.mDownObjAttribute.y=(attribute.mDownObjAttribute.y==null)?0:attribute.mDownObjAttribute.y;
  attribute.mDownObjAttribute.name=attribute.name+"_mDown";
  attribute.mDownObjAttribute.visible=false;
  attribute.mDownObjAttribute.w=attribute.w;
  attribute.mDownObjAttribute.h=attribute.h;
  attribute.mDownObjAttribute.parent=attribute.name;
  this.mDownObj=utilObj.defineLayer(attribute.mDownObjAttribute);
  this.mDownObj.buttonObj=this;
 }
 if(attribute.mClickObjAttribute){
  attribute.mClickObjAttribute.x=(attribute.mClickObjAttribute.x==null)?0:attribute.mClickObjAttribute.x;
  attribute.mClickObjAttribute.y=(attribute.mClickObjAttribute.y==null)?0:attribute.mClickObjAttribute.y;
  attribute.mClickObjAttribute.name=attribute.name+"_mClick";
  attribute.mClickObjAttribute.parent=attribute.name;
  attribute.mClickObjAttribute.visible=false;
  attribute.mClickObjAttribute.w=attribute.w;
  attribute.mClickObjAttribute.h=attribute.h; 
  this.mClickObj=utilObj.defineLayer(attribute.mClickObjAttribute);
  this.mClickObj.buttonObj=this;
 }
 attribute.glassObjAttribute={
 	name:attribute.name+"_glass",
 	visible:true,
 	parent:attribute.name,
        content:glassObjContent,
        x:0,
        y:0,
        w:attribute.w,
        h:attribute.h,
        z:999999999,
        onMouseOut:"this.layerObj.buttonObj.onMouseOut()",
        onMouseOver:"this.layerObj.buttonObj.onMouseOver()",
        onMouseDown:"this.layerObj.buttonObj.onMouseDown()",
        onMouseClick:"this.layerObj.buttonObj.onMouseClick()"
       }
        //onMouseDown:"var a=this.layerObj.buttonObj;a.mDownObj.showIt();a.mOverObj.hideIt();a.mOutObj.hideIt();a.mClickObj.hideIt();",
        //onMouseClick:"var a=this.layerObj.buttonObj;a.mClickObj.showIt();a.mOverObj.hideIt();a.mOutObj.hideIt();a.mDownObj.hideIt();utilObj.linkIt(a.attribute.linkAttribute)"}   
 this.glassObj=utilObj.defineLayer(attribute.glassObjAttribute);
 this.glassObj.buttonObj=this;
 //this.construct();
}
buttonObjClass.prototype.onMouseOut=function(){	
 if(bw.ie){
   window.event.cancelBubble=true;
 }
 this.isOver=false;
 //util_debug(this.attribute.name+"buttonObj.onMouseOut");
 this.menuSystemObj.onMouseOut();
}


buttonObjClass.prototype.onMouseOver=function(){
 if(bw.ie){
   window.event.cancelBubble=true;
 }
 this.isOver=true;
 this.menuSystemObj.onMouseOver();
}
buttonObjClass.prototype.onMouseDown=function(){
 if(bw.ie){
   window.event.cancelBubble=true;
 }
 if(this.mOutObj){
  if(!this.mOverObj&&!this.mDownObj){
   this.mOutObj.showIt();
  }
  else{
   this.mOutObj.hideIt();
  }
 }
 if(this.mOverObj){
  if(!this.mDownObj){
   this.mOverObj.showIt();
  }
  else{
   this.mOverObj.hideIt();
  }
 }
 if(this.mDownObj)this.mDownObj.showIt();
 if(this.mClickObj)this.mClickObj.hideIt();
}
buttonObjClass.prototype.onMouseClick=function(){
 if(bw.ie){
   window.event.cancelBubble=true;
 }
 if(this.mOutObj){
  if(!this.mOverObj&&!this.mDownObj&&!this.mClickObj){
   this.mOutObj.showIt();
  }
  else{
   this.mOutObj.hideIt();
  }
 }
 if(this.mOverObj){
  if(!this.mDownObj&&!this.mClickObj){
   this.mOverObj.showIt();
  }
  else{
   this.mOverObj.hideIt();
  }
 }
 if(this.mDownObj){
  if(!this.mClickObj){
   this.mDownObj.showIt();
  }
  else{
   this.mDownObj.hideIt();
  }
 }
 if(this.mClickObj)this.mClickObj.showIt();
 utilObj.linkIt(this.attribute.linkAttribute);
}
buttonObjClass.prototype.construct = function(){
 document.open();
 document.write(this.layerObj.createHTMLstr()+((bw.ns4&&this.attribute.x==null&&this.attribute.y==null)?"<img name="+this.name+"_transgif src=transparent.gif height="+this.attribute.h+" width="+this.attribute.w+">":""));
 document.close();
 this.layerObj.evalReference();
 if(bw.ns4){ //adjust for Netscape after window resized
  eval("var x=document.images."+this.attribute.name+"_transgif.x");
  eval("var y=document.images."+this.attribute.name+"_transgif.y");
  this.layerObj.moveIt(x,y);
 }
 
 
}

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

/******************************************************************************************************/

var utilObj=new utilObjectClass('abc');

