
// ---------------------------------------------------------------
// (c) nosdev http://www.10pm.org/nostromo/
// Build on Thu Aug 12 12:55:51 RDT 2004
// ---------------------------------------------------------------
function nosBrowser() {
 var agt=navigator.userAgent.toLowerCase();
 this.major_ = parseInt(navigator.appVersion);
 this.minor_ = parseFloat(navigator.appVersion);
 this.isNS_ = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
 && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
 && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
 this.isIE_ = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)); 
 var ua=navigator.userAgent.toLowerCase()
 this.isWIN_ = (ua.indexOf("win")!=-1) ;
 this.isMAC_ = (ua.indexOf("mac")!=-1) ;
 this.IE=function () {
 return this.isIE_ ;
 } 
 this.NS= function () {
 return this.isNS_ ;
 } 
 this.WIN=function() {
 return this.isWIN_ ;
 } 
 this.MAC=function() {
 return this.isMAC_ ;
 } 
 }
 var cbCount_=0 ;
 function nosCallback(f,o,s) {
 this.id_=cbCount_++ ;
 nosRegisterObject(this.id_,this) ;
 this.object_=o ;
 this.func_=f;
 this.src_=s ;
 this.SetCallback=function(o,f,s) {
 this.object_=o ;
 this.func_=f;
 this.src_=s ;
 }
 this.GetLink=function() {
 return "javascript:nosHandleCallback("+this.id_+")" ;
 }
 this.GetSource=function() {
 return this.src_ ;
 }
 this.Trigger=function() {
 if (this.object_) {
 eval('this.object_.'+this.func_+"(this)") ;
 } else {
 eval(this.func_+"(this)") ;
 }
 }
 this.Render=function(d) {
 d.write("javascript:nosHandleCallback("+this.id_+")") ;
 }
 this.SetTimer=function(v) {
 setTimeout("nosHandleCallback("+this.id_+")",v) ;
 }
 }
 function nosHandleCallback(id) {
 cb=nosGetRegisteredObject(id) ;
 cb.Trigger() ;
 }
 function nosContainerArray() {
 this.content_=new Array() ;
 this.count_=0 ;
 this.Insert=function (v) {
 this.content_[this.count_++]=v ;
 } ;
 this.GetIterator=function () {
 return new nosContainerArrayIterator(this) ;
 }
 }
 function nosContainerArrayIterator(a) {
 this.array_=a ;
 this.current_=0 ;
 this.Begin=function () {
 this.current_=0 ;
 } ;
 this.IsDone=function () {
 return (this.current_>=this.array_.count_) ;
 }
 this.Next=function () {
 this.current_++ ;
 }
 this.GetCurrent= function() {
 return this.array_.content_[this.current_] ;
 }
 }
 gDebug=false ;
 function EnableDebug() {
 gDebug=new nosStringWriter() ;
 document.write("<DIV id='nosDebug' style='position:absolute;top:200px;left:20px;bqckground-color:#303030;'></div>") ;
 }
 function Debug(s) {
 if (gDebug) {
 gDebug.write(s+"<br>") ;
 debLayer=new nosLayer('nosDebug') ;
 debLayer.SetContent(gDebug.string_) ;
 debLayer.SetContent(s) ;
 }
 }
 function clearDebug() {
 debLayer=new nosLayer('nosDebug') ;
 debLayer.SetContent("") ;
 }
 function nosDocument() {
 b=new nosBrowser() ;
 if (b.IE()) {
 this.GetWidth=function() {
 return document.body.clientWidth ;
 }
 this.GetHeight=function() {
 return document.body.clientHeight ;
 }
 } ;
 if (b.NS()) {
 this.GetWidth=function() {
 return self.innerWidth;
 }
 this.GetHeight=function() {
 return self.innerHeight; ;
 }
 }
 }
 //
 function nosGridLayout() {
 this.container_=new nosContainerArray() ;
 this.colCount_=1 ;
 this.id_="" ;
 this.width_="100%" ;
 this.Insert=function(v) {
 this.container_.Insert(v) ;
 }
 this.GetIterator=function() {
 return this.container_.GetIterator() ;
 }
 this.SetClassID=function(id) {
 this.id_=id ;
 }
 this.SetWidth=function(w) {
 this.width_=w ;
 }
 this.Render=function(d) {
 d.write("<table cellspacing=0 cellpadding=0 class='TABLE-"+this.id_+"'>") ;
 var it=this.GetIterator() ;
 it.Begin() ;
 while(!it.IsDone()) {
 d.write("<tr class='TR-"+this.id_+"'>") ;
 for (j=0;j<this.colCount_;j++) {
 if (it.IsDone()) {
 colspan=this.rowCount_-j ;
 d.write("<td colspan="+colspan+" class='TD-"+this.id_+"'></td>") ;
 } else {
 d.write("<td class='TD-"+this.id_+"'>") ;
 it.GetCurrent().Render(d) ;
 d.write('</td>') ;
 it.Next() ;
 }
 }
 d.write('</tr>') ;
 } ;
 d.write("</table>") ;
 }
 this.SetColumnCount=function(c) {
 this.colCount_=c ;
 }
 } ;
 var imgCount_=0 ;
 function nosImage(id) {
 if (id) {
 this.id_=id ;
 } else {
 this.id_='NOSIMAGE'+imgCount_++ ;
 } ;
 this.image_ = new Image() ;
 this.lowsrc_= null ;
 this.SetURL=function(s) {
 this.image_.src=s ;
 if (this.renderer_) {
 this.renderer_.UpdateImage(this.id_,s) ;
 }
 } ;
 this.SetLowSrc=function(s) {
 this.lowsrc_=s ;
 }
 this.GetURL=function() {
 return this.image_.src ;
 }
 this.Render=function(d) {
 d.write("<IMG ") ;
 if (this.id_) {
 d.write("NAME='"+this.id_+"' ") ;
 }
 if (this.lowsrc_) {
 d.write("LOWSRC='"+this.lowsrc_+"' ") ;
 }
 d.write("SRC='"+this.image_.src+"' BORDER=0>") ;
 this.renderer_=d ;
 };
 }
 function nosIE4Layer(id) {
 this.layer_=document.all[id] ;
 this.Show=function() { this.layer_.style.visibility='visible' ;} ;
 this.Hide=function() { this.layer_.style.visibility='hidden' ;} ;
 this.SetContent=function(c) { this.layer_.innerHTML=c ;} ;
 this.SetPosition=function(x,y) { this.layer_.style.pixelLeft = x; this.layer_.style.pixelTop=y } ;
 this.SetClipRect=function(x,y,w,h) {
 a=y ; b=x+w ; c=y+h ; d=x ;
 clipString= "rect(" + a +"px " + b + "px " + c + "px " + d + "px )" ;
 this.layer_.style.clip = clipString ;
 } ;
 this.SetWidth=function(w) {
 this.layer_.style.pixelWidth=w ;
 }
 this.SetHeight=function(h) {
 this.layer_.style.pixelHeight=h ;
 }
 this.SetBackgroundColor=function(c) {
 this.layer_.style.backgroundColor=c ;
 } 
 this.UpdateImage=function(id,url) {
 eval("document.images['"+id+"'].src='"+url+"';") ;
 } ;
 }
 function nosDOMLayer(id) {
 this.layer_=document.getElementById(id) ;
 if (!this.layer_) {
 alert("Failed to get layer "+id) ;
 }
 this.Show=function() { this.layer_.style.visibility='visible' ;} ;
 this.Hide=function() { this.layer_.style.visibility='hidden' ;} ;
 this.SetContent=function(c) { this.layer_.innerHTML=c ;} ;
 this.SetPosition=function(x,y) { this.layer_.style.left=x+"px" ; this.layer_.style.top=y+"px" ; } ;
 this.SetClipRect=function(x,y,w,h) {
 a=y ; b=x+w ; c=y+h ; d=x ;
 clipString= "rect(" + a +"px " + b + "px " + c + "px " + d + "px )" ;
 this.layer_.style.clip = clipString ;
 } ;
 this.SetWidth=function(w) {
 this.layer_.style.width=w ;
 }
 this.SetHeight=function(h) {
 this.layer_.style.height=h ;
 }
 this.GetWidth=function() {
 return this.layer_.offsetWidth ;
 }
 this.GetHeight=function() {
 return this.layer_.offsetHeight ;
 }
 this.SetBackgroundColor=function(c) {
 this.layer_.style.backgroundColor=c ;
 } 
 this.UpdateImage=function(id,url) {
 eval("document.images['"+id+"'].src='"+url+"';") ;
 } ;
 }
 function nosNSFindLayer(d,id) {
 if (d.layers[id]) {
 return d.layers[id] ;
 } else {
 var i ;
 for (i=0;i<d.layers.length;i++) {
 var l=d.layers[i] ;
 l=nosNSFindLayer(l.document,id) ;
 if (l) {
 return l ;
 }
 }
 }
 }
 function nosNSLayer(id){
 this.layer_=nosNSFindLayer(document,id) ;
 if (!this.layer_) {
 alert("Failed to get layer "+id) ;
 }
 this.Show=function() { this.layer_.visibility='show' ;} ;
 this.Hide=function() { this.layer_.visibility='hide' ;} ;
 this.SetContent=function(c) { d=this.layer_.document ; d.write(c) ; d.close() ; } ;
 this.SetPosition=function(x,y) { this.layer_.left = x; this.layer_.top=y } ;
 this.SetClipRect=function(x,y,w,h) {
 this.layer_.clip.left = x;
 this.layer_.clip.right = x+w;
 this.layer_.clip.bottom = y+h;
 this.layer_.clip.top = y;
 }
 this.SetWidth=function(wi) {
 this.layer_.document.width=wi ;
 }
 this.SetHeight=function(he) {
 this.layer_.bottom=this.layer.top+he ;
 } 
 this.SetBackgroundColor=function(c) {
 this.layer_.bgColor=c ;
 }
 this.UpdateImage=function(id,url) {
 eval("this.layer_.document.images['"+id+"'].src='"+url+"';") ;
 } ;
 }
 function nosLayer(id) {
 this.string_="" ;
 if (document.layers) {
 this.l_=new nosNSLayer(id) ;
 } else
 if (document.getElementById) {
 this.l_=new nosDOMLayer(id) ;
 } else if (document.all) {
 this.l_=new nosIE4Layer(id) ;
 }
 this.Show=function() { this.l_.Show() ; } ;
 this.Hide=function() { this.l_.Hide() ; } ;
 this.SetVisibility=function(b) { if (b) { this.Show();} else {this.Hide();} ; } ;
 this.SetContent=function(c) { this.l_.SetContent(c) ; } ;
 this.SetPosition=function(x,y) { this.l_.SetPosition(x,y) ; } ;
 this.SetClipRect=function(x,y,w,h) { this.l_.SetClipRect(x,y,w,h) ; } ;
 this.SetWidth=function(w) { this.l_.SetWidth(w) ; } ;
 this.SetHeight=function(h) { this.l_.SetHeight(h) ; } ;
 this.GetWidth=function() { return this.l_.GetWidth() } ;
 this.GetHeight=function() { return this.l_.GetHeight() } ;
 this.SetBackgroundColor=function(c) { this.l_.SetBackgroundColor(c) ; } ;
 this.UpdateImage=function(id,url) { return this.l_.UpdateImage(id,url) ; } ;
 this.EnableMouseOver=function(cbOver,cbOut) {
 this.l_.layer_.onmouseover=cbOver ;
 this.l_.layer_.onmouseout=cbOut ;
 }
 this.GetX=function() {
 var curleft = 0;
 obj=this.l_.layer_ ;
 if (obj.offsetParent)
 {
 while (obj.offsetParent)
 {
 curleft += obj.offsetLeft
 obj = obj.offsetParent;
 }
 }
 else if (obj.x)
 curleft += obj.x;
 return curleft;
 }
 this.GetY=function() {
 var curtop = 0;
 obj=this.l_.layer_ ;
 if (obj.offsetParent)
 {
 while (obj.offsetParent)
 {
 curtop += obj.offsetTop
 obj = obj.offsetParent;
 }
 }
 else if (obj.y)
 curtop += obj.y;
 return curtop;
 }
 this.write=function(s) {
 this.string_=this.string_+s ;
 } ;
 this.Flush=function() {
 this.SetContent(this.string_) ;
 this.string_="" ;
 } ;
 }
 function nosLink(l) {
 this.id_=l ;
 this.SetClass=function(c) {
 this.class_=c ;
 }
 this.SetContent=function(c) {
 this.content_=c ;
 }
 this.SetCallback=function(f,o) {
 this.href_=new nosCallback(f,o,this) ;
 }
 this.OnMouseOver=function(f,o) {
 this.omover_=new nosCallback(f,o,this) ;
 }
 this.OnMouseOut=function(f,o) {
 this.omout_=new nosCallback(f,o,this) ;
 }
 this.OnMouseDown=function(f,o) {
 this.omd_=new nosCallback(f,o,this) ;
 }
 this.OnMouseUp=function(f,o) {
 this.omu_=new nosCallback(f,o,this) ;
 }
 this.Render=function(d) {
 d.write("<a id='"+this.id_+"'") ;
 if (this.class_) {
 d.write(" class='"+this.class_+"'") ;
 }
 if (this.href_) {
 d.write(" href='") ;
 this.href_.Render(d) ;
 d.write("'") ;
 }
 if (this.omover_) {
 d.write(" onmouseover='") ;
 this.omover_.Render(d) ;
 d.write("'") ;
 }
 if (this.omout_) {
 d.write(" onmouseout='") ;
 this.omout_.Render(d) ;
 d.write("'") ;
 }
 if (this.omd_) {
 d.write(" onmousedown='") ;
 this.omd_.Render(d) ;
 d.write("'") ;
 } 
 if (this.omu_) {
 d.write(" onmouseup='") ;
 this.omu_.Render(d) ;
 d.write("'") ;
 }
 d.write(" onfocus='blur()'");
 d.write(">");
 this.content_.Render(d) ;
 d.write("</a>") ;
 } 
 }
 //
 //
 //
 function CSSable() {
 this.cssid_="" ;
 this.cssclass_="" ;
 this.GetCSSID=function() {
 return this.cssid_ ;
 }
 this.GetCSSClass=function() {
 return this.cssclass_ ;
 }
 this.SetCSSID=function(id) {
 this.cssid_=id ;
 }
 this.SetCSSClass=function(c) {
 this.cssclass_=c ;
 }
 this.CSSPreRender=function(d) {
 if ((this.cssid_!="")||(this.cssclass_!="")) {
 d.write("<DIV ") ;
 if (this.cssid_!="") {
 d.write("id='"+this.cssid_+"' ") ;
 }
 if (this.cssclass_!="") {
 d.write("class='"+this.cssclass_+"' ") ;
 }
 d.write(">") ;
 }
 }
 this.CSSPostRender=function(d) {
 if ((this.cssid_!="")||(this.cssclass_!="")) {
 d.write("</div>") ;
 }
 }
 }
 //
 //
 //
 function nosMenu() {
 this.superClass=CSSable ;
 this.superClass() ;
 this.selected_=0 ;
 this.items_=new nosContainerArray() ;
 this.layout_=new nosHorizontalMenuLayout() ;
 this.Insert=function(mi) {
 this.items_.Insert(mi) ;
 mi.SetMenu(this) ;
 }
 this.Render= function(d) {
 this.CSSPreRender(d) ;
 it=this.items_.GetIterator() ;
 this.layout_.Render(d,it) ;
 this.CSSPostRender(d) ;
 }
 this.Select=function(mi) {
 if (this.selected_) {
 this.selected_.SetSelected(false) ;
 }
 this.selected_=mi ;
 if (this.selected_) {
 this.selected_.SetSelected(true) ;
 }
 }
 this.GetSelected=function() {
 return this.selected_ ;
 }
 this.SetLayout=function(l) {
 this.layout_=l ;
 }
 }
 //
 //
 //
 function MenuItem() {
 this.superClass=CSSable ;
 this.superClass() ;
 this.text_="" ;
 this.selected_=false ;
 this.id_="" ;
 this.image_="" ;
 this.needMouseOver_=false ;
 this.SetText=function(t) {
 this.text_=t ;
 }
 this.SetImage=function(regUrl,selUrl,hiUrl) {
 if (arguments.length>0) {
 this.regularImage_=new nosImage ;
 this.regularImage_.SetURL(regUrl) ;
 }
 if (arguments.length>1) {
 this.selectedImage_=new nosImage ;
 this.selectedImage_.SetURL(selUrl) ;
 }
 if (arguments.length>2) {
 this.needMouseOver_=true ;
 this.highlightImage_=new nosImage ;
 this.highlightImage_.SetURL(hiUrl) ;
 }
 }
 this.SetSelected=function(selected) {
 this.selected_=selected ;
 }
 this.Render=function(d) {
 this.CSSPreRender(d) ;
 var content ;
 if (!this.regularImage_) {
 content=new nosStringWriter(this.text_) ;
 } else {
 content=new nosImage() ;
 if (this.selected_&&this.selectedImage_) {
 content.SetURL(this.selectedImage_.GetURL()) ;
 } else {
 content.SetURL(this.regularImage_.GetURL()) ;
 }
 }
 this.content_=content ;
 if (!this.selected_) {
 lnx=new nosLink("1") ;
 lnx.SetContent(content) ;
 if (this.cssclass_!="") {
 cl=this.cssclass_ ;
 cl=cl+"-LINK"
 if (this.selected_) {
 cl=cl+"-SELECTED" ;
 }
 lnx.SetClass(cl) ;
 }
 lnx.SetCallback("HandleCallback",this) ;
 if (this.needMouseOver_) {
 lnx.OnMouseOver("MouseOver",this) ;
 lnx.OnMouseOut("MouseOut",this) ;
 }
 content=lnx ;
 }
 content.Render(d) ;
 this.CSSPostRender(d) ;
 }
 this.SetMenu=function(m) {
 this.menu_=m ;
 }
 this.HandleCallback=function() {
 this.menu_.OnSelect(this) ;
 }
 this.MouseOver=function() {
 this.content_.SetURL(this.highlightImage_.GetURL()) ;
 }
 this.MouseOut=function() {
 this.content_.SetURL(this.regularImage_.GetURL()) ;
 }
 }
 //
 //
 //
 function nosHorizontalMenuLayout() {
 this.Render=function (d,it) {
 d.write("<table cellspacing=0 cellpadding=0><tr>") ;
 for (it.Begin();!it.IsDone();it.Next()) {
 d.write("<td>") ;
 it.GetCurrent().Render(d) ;
 d.write("</td>") ;
 }
 d.write("</tr></table>") ;
 }
 this.GetXOffset=function() {
 return 0 ;
 }
 this.GetYOffset=function() {
 return 1 ;
 }
 }
 function nosVerticalMenuLayout() {
 this.Render=function (d,it) {
 d.write("<table cellspacing=0 cellpadding=0>") ;
 for (it.Begin();!it.IsDone();it.Next()) {
 d.write("<tr><td>") ;
 it.GetCurrent().Render(d) ;
 d.write("</td></tr>") ;
 }
 d.write("</table>") ;
 }
 this.GetXOffset=function() {
 return 1 ;
 }
 this.GetYOffset=function() {
 return 0 ;
 }
 }
 var nosObjectRegistry_=0 ;
 function nosGetRegistryInstance() {
 if (nosObjectRegistry_==0) {
 nosObjectRegistry_=new nosContainerArray() ;
 }
 return nosObjectRegistry_ ;
 }
 function nosRegistryElement(id,o) {
 this.object_=o ;
 this.id_=id ;
 }
 function nosRegisterObject(id,o) {
 reg=nosGetRegistryInstance() ;
 reg.Insert(new nosRegistryElement(id,o)) ;
 }
 function nosGetRegisteredObject(id) {
 reg=nosGetRegistryInstance() ;
 it=reg.GetIterator() ;
 for (it.Begin();!it.IsDone();it.Next()) {
 re=it.GetCurrent() ;
 if (re.id_==id) {
 return re.object_ ;
 }
 }
 }
 function nosRollover(offURL,onURL) {
 this.offImage_=new nosImage() ;
 this.offImage_.SetURL(offURL) ;
 this.onImage_=new nosImage() ;
 this.onImage_.SetURL(onURL) ;
 this.Render=function(d) {
 this.content_=new nosImage() ;
 this.content_.SetURL(this.offImage_.GetURL()) ;
 lnx=new nosLink("1") ;
 lnx.SetContent(this.content_) ;
 lnx.SetCallback("HandleCallback",this) ;
 lnx.OnMouseOver("MouseOver",this) ;
 lnx.OnMouseOut("MouseOut",this) ;
 lnx.Render(d) ;
 }
 this.MouseOver=function() {
 this.content_.SetURL(this.onImage_.GetURL()) ;
 }
 this.MouseOut=function() {
 this.content_.SetURL(this.offImage_.GetURL()) ;
 }
 this.HandleCallback=function() {
 }
 }function nosScreen() {
 this.GetWidth=function() {
 return screen.availWidth ;
 };
 this.GetHeight=function() {
 return screen.availHeight ;
 }
 }
 function nosSprite() {
 this.SetImage=function(im) {
 this.image_=im ;
 if (!this.layer_) {
 alert("nosLayer: setting image before assigning layer");
 }
 this.image_.Render(this.layer_) ;
 this.layer_.Flush() ;
 } 
 this.AssignLayer=function(id) {
 this.layer_=new nosLayer(id) ;
 } 
 this.SetPosition= function(x,y) {
 this.layer_.SetPosition(x,y) ;
 }
 this.Update= function() {
 }
 this.Show= function() {
 this.layer_.Show() ;
 }
 this.Hide= function() {
 this.layer_.Hide() ;
 }
 }
 function nosStringWriter(s) {
 if (s) {
 this.string_=s ;
 } else {
 this.string_="" ;
 }
 this.write= function (s) {
 this.string_=this.string_+s ;
 }
 this.GetString=function () {
 return this.string_ ;
 }
 this.Clear=function() {
 this.string_="" ;
 }
 this.Render=function(d) {
 d.write(this.string_) ;
 }
 } 