﻿//Copyright LMSOFT 1999 - 2009
var z_index=0;var currentIdIn=-1;var gMaxVisibleItems=0;function LMObject(id,initvisible,delais,effect,delaisdisp,effectdisp,BranchLst,tooltip,param){var tagdiv=document.getElementById(id);tagdiv.drawok=0;tagdiv.drawingeffect=0;if(tooltip)tagdiv.title=tooltip;z_index++;this.id=id;this.object=null;this.LTO=new Array;this.NSMouseOver=null;this.NSMouseOut=null;this.InitObject=null;this.ResizeObject=null;this.OnAfterPageDisplay=null;this.ShowObject=null;this.HideObject=null;this.Play=null;this.Stop=null;this.RollIn=null;this.RollOut=null;this.IsMovable=true;this.visible=initvisible;this.x=tagdiv.offsetLeft;this.y=tagdiv.offsetTop;this.w=tagdiv.offsetWidth;this.h=tagdiv.offsetHeight;this.orix=this.x;this.oriy=this.y;this.oriw=this.w;this.orih=this.h;this.initvisible=initvisible;this.param=param;this.BranchLst=BranchLst;if(delais==null){this.delais=0;}else {this.delais=delais;}if(delaisdisp==null){this.delaisdisp=0;}else {this.delaisdisp=delaisdisp;}if(effect==null){this.Effect=LMEffectShow;}else {this.Effect=effect;}if(effectdisp==null){this.EffectDisp=LMEffectHide;}else {this.EffectDisp=effectdisp;}this.EffectDisp=LMEffectHide;this.TagObject=tagdiv;tagdiv.LMObjectsIdx=FindIdxInLMObjects(id);tagdiv.GetTop=TagGetTop;tagdiv.SetTop=TagSetTop;tagdiv.GetLeft=TagGetLeft;tagdiv.SetLeft=TagSetLeft;tagdiv.GetWidth=TagGetWidth;tagdiv.SetWidth=TagSetWidth;tagdiv.GetHeight=TagGetHeight;tagdiv.SetHeight=TagSetHeight;tagdiv.SetClip=TagSetClip;tagdiv.SetX=LMObjectMethodSetX;tagdiv.GetX=LMObjectMethodGetX;tagdiv.SetY=LMObjectMethodSetY;tagdiv.GetY=LMObjectMethodGetY;tagdiv.SetW=LMObjectMethodSetW;tagdiv.GetW=LMObjectMethodGetH;tagdiv.SetH=LMObjectMethodSetH;tagdiv.GetH=LMObjectMethodGetH;tagdiv.SetXYWH=LMObjectMethodSetXYWH;tagdiv.IsVisible=TagIsVisible;tagdiv.Show=TagShow;tagdiv.Hide=TagHide;tagdiv.ShowEffect=TagShowEffect;tagdiv.HideEffect=TagHideEffect;tagdiv.ToggleVisibleState=TagToggleVisibleState;tagdiv.IsDrawingEffect=TagIsDrawingEffect;tagdiv.RollIn=TagRollIn;tagdiv.RollOut=TagRollOut;if(initvisible==false)tagdiv.Hide();return this;}function FireEvent(id,event){var strvar="window."+id+event;var strcnd="if("+strvar+") "+strvar +"()";eval(strcnd);}function LMObjectClick(id,idxbr){var LMObject=FindClassObjectFromId(id);if(LMObject&&LMObject.BranchLst&&LMObject.BranchLst[idxbr]){var DoBranch=true;if(LMObject.BranchLst[idxbr].code){DoBranch=LMObject.BranchLst[idxbr].code(LMObject.BranchLst[idxbr],id,LMObject,LMObject);}if(DoBranch)LMObjectBranch(LMObject.BranchLst[idxbr]);}}function DoLink(link){LMObjectBranch(new LMBranchEx("0",link,null,0.0,null,null,0,1,1,1,1,1,0,0,0,"",null));}function GadgetShowLink(branch){if(branch==null)return;if(branch.where==null)return;if(branch.where=="")return;switch(branch.where){case "GADGET: 1":window.status=RES_GADGETHOME;break;case "GADGET: 2":window.status=RES_GADGETBACK;break;case "GADGET: 3":window.status=RES_GADGETQUIT;break;case "GADGET: 4":break;case "GADGET: 5":window.status=RES_GADGETQUIT;break;case "GADGET: 6":window.status=RES_GADGETFOWARD;break;case "GADGET: 7":window.status=RES_GADGETPRINT;break;case "GADGET: 8":break;case "GADGET: 9":break;case "GADGET: 10":window.status=RES_GADGETADDFAVORITE;break;case "GADGET: 11":window.status=RES_GADGETSENDTOFRIEND;break;}}function LMObjectBranch(branch){if(branch==null)return;if(branch.where==null)return;if(branch.where=="")return;switch(branch.where){case "GADGET: 1":location=pub_home;break;case "GADGET: 2":history.back();break;case "GADGET: 3":parent.window.close();break;case "GADGET: 4":break;case "GADGET: 5":var ok=confirm(MSG_QUIT);if(ok)parent.window.close();break;case "GADGET: 6":history.forward();break;case "GADGET: 7":window.print();break;case "GADGET: 8":break;case "GADGET: 9":break;case "GADGET: 10":if(is.ie)window.external.AddFavorite(location.href,document.title);else if(is.ns)alert(RES_ADDFAVORITES);break;case "GADGET: 11":window.location="mailto:?subject="+document.title+"&body="+location.href;break;default:if(branch.openinnewwindow){var param="";param+="status="+branch.status+",";param+="menubar="+branch.menubar+",";param+="toolbar="+branch.toolbar+",";param+="location="+branch.toolbar+",";param+="scrollbars="+branch.scrollbar+",";param+="resizable="+branch.resizeenable+",";if(branch.setdefaultwh){param+="width="+branch.width+",";param+="height="+branch.height+",";}window.open(branch.where,branch.windowname,param);}else {if(branch.where.substring(0,5).toLowerCase()=="http:"){parent.location=branch.where;}else if(branch.where.substring(0,6).toLowerCase()=="https:"){parent.location=branch.where;}else if(branch.where.substring(0,4).toLowerCase()=="ftp:"){parent.location=branch.where;}else location=branch.where;}break;}}function stopPropagation(e){if(e==null)e=window.event;e.cancelBubble=true;if(e.preventDefault)e.preventDefault();if(e.stopPropagation)e.stopPropagation();}function NSLMGlobalUp(event){if(LMGlobalUp(event)==false)return false;}function NSLMGlobalDn(event){if(LMGlobalDn(event)==false)return false;}function NSLMGlobalOver(e){if(e&&e.target&&e.target.id)LMGlobalOver(e.target.id);}function NSLMGlobalOut(){LMGlobalOver(-1);}function LMGlobalUp(e){if(e==null)e=window.event;if(currentIdIn==-1)return;var obj=FindClassObjectFromId(currentIdIn);if(!obj)return;var id=currentIdIn;FireEvent(id,"_OnMouseUp");FireEvent(id,"_OnClick");if(e){if(is.ie&&e.button!=1)return;if(is.ns&&e.which!=1)return;}if(obj.MouseUp)obj.MouseUp();}function LMGlobalDn(e){if(e==null)e=window.event;if(currentIdIn==-1)return;var obj=FindClassObjectFromId(currentIdIn);if(!obj)return;FireEvent(currentIdIn,"_OnMouseDown");if(e){if(is.ie&&e.button!=1)return;if(is.ns&&e.which!=1)return;}if(obj.MouseDn)obj.MouseDn();}var infct=false;function LMGlobalOver(id){if(infct)return;infct=true;if(currentIdIn==id){infct=false;return;}LMGlobalOut();if(id<=-1){infct=false;return;}currentIdIn=id;var obj=FindClassObjectFromId(currentIdIn);if(!obj){infct=false;return;}if(currentIdIn!=-1){FireEvent(currentIdIn,"_OnMouseEnter");}if(obj.MouseOver)obj.MouseOver();infct=false;}function LMGlobalOut(){if(currentIdIn<=-1)return;var id=currentIdIn;var obj=FindClassObjectFromId(id);if(!obj)return;if(currentIdIn!=-1){FireEvent(currentIdIn,"_OnMouseLeave");}currentIdIn=-1;if(obj.MouseOut)obj.MouseOut();}function LMObjectMethodSetX(x){obj=FindClassObjectFromTagDiv(this);if(!obj)return;this.SetXYWH(x,obj.oriy,obj.oriw,obj.orih);}function LMObjectMethodGetX(){obj=FindClassObjectFromTagDiv(this);if(!obj)return 0;return obj.orix;}function LMObjectMethodSetY(y){obj=FindClassObjectFromTagDiv(this);if(!obj)return;this.SetXYWH(obj.orix,y,obj.oriw,obj.orih);}function LMObjectMethodGetY(){obj=FindClassObjectFromTagDiv(this);if(!obj)return 0;return obj.oriy;}function LMObjectMethodSetW(w){obj=FindClassObjectFromTagDiv(this);if(!obj)return;this.SetXYWH(obj.orix,obj.oriy,w,obj.orih);}function LMObjectMethodGetW(){obj=FindClassObjectFromTagDiv(this);if(!obj)return 0;return obj.oriw;}function LMObjectMethodSetH(h){obj=FindClassObjectFromTagDiv(this);if(!obj)return;this.SetXYWH(obj.orix,obj.oriy,obj.oriw,h);}function LMObjectMethodGetH(){obj=FindClassObjectFromTagDiv(this);if(!obj)return 0;return obj.orih;}function LMObjectMethodSetXYWH(x,y,w,h){var LMObject=FindClassObjectFromId(this.id);LMObject.orix=x;LMObject.oriy=y;LMObject.oriw=w;LMObject.orih=h;wori=this.GetWidth();hori=this.GetHeight();newx=(x*GPropW)+GOffetX;LMObject.x=newx;LMObject.TagObject.SetLeft(newx);newy=(y*GPropH)+GOffetY;LMObject.y=newy;LMObject.TagObject.SetTop(newy);neww=w*GPropW;newh=h*GPropH;this.SetWidth(neww);this.SetHeight(newh);if(LMObject.ResizeObject)LMObject.ResizeObject(neww/wori,newh/hori);this.SetClip(0,this.GetWidth(),this.GetHeight(),0)}init=false;function AdjustHeight(){return;if(init==false){for(var i=0;i<LMObjects.length;i++){LMObjects[i].orih=1.1*LMObjects[i].orih;LMObjects[i].TagObject.SetHeight(LMObjects[i].orih);LMObjects[i].TagObject.SetClip(0,LMObjects[i].TagObject.GetWidth(),LMObjects[i].orih,0);}init=true;}}function LMObjectDelaiHide(LMObjects,idx){if(LMObjects[idx].TagObject.drawingeffect==1){setTimeout("LMObjectDelaiHide(LMObjects,"+idx+")",10);return;}LMGlobalOver(-1);LMObjects[idx].EffectDisp();}function LMObjectAnimateElem(LMObjects,currentidx){var v=0;if(currentidx>=gMaxVisibleItems)return;if(LMObjects[currentidx].InitObject)LMObjects[currentidx].InitObject();for(v=currentidx+1;v<gMaxVisibleItems;v++){if(LMObjects[currentidx].delais!=LMObjects[v].delais||LMObjects[v].Effect!=LMEffectShow)break;if(LMObjects[v].InitObject)LMObjects[v].InitObject();}if(LMObjects[currentidx].TagObject.drawok==0){setTimeout("LMObjectAnimateElem(LMObjects,"+currentidx+")",10);return;}if(LMObjects[currentidx].TagObject.drawingeffect==0){for(v=currentidx;v<gMaxVisibleItems;v++){if(LMObjects[currentidx].delais!=LMObjects[v].delais||LMObjects[v].TagObject.drawok==0||LMObjects[v].Effect!=LMEffectShow)break;}}else {for(v=currentidx;v<gMaxVisibleItems;v++){if(LMObjects[currentidx].delais!=LMObjects[v].delais)break;if(LMObjects[v].Effect!=LMEffectShow)break;if(LMObjects[v].TagObject.drawingeffect==0)break;if(LMObjects[currentidx].TagObject.drawingeffect!=LMObjects[v].TagObject.drawingeffect){setTimeout("LMObjectAnimateElem(LMObjects,"+currentidx+")",10);return;}}}if(v==currentidx)v++;var valend=v;drawingeffect=LMObjects[currentidx].TagObject.drawingeffect;if(v+1<gMaxVisibleItems){if(LMObjects[v+1].InitObject)LMObjects[v+1].InitObject(LMObjects[v+1]);}if(drawingeffect==0){for(var v=currentidx;v<valend;v++){LMObjects[v].Effect();}setTimeout("LMObjectAnimateElem(LMObjects,"+currentidx+")",10);}else if(drawingeffect==1){setTimeout("LMObjectAnimateElem(LMObjects,"+currentidx+")",10);return;}else if(drawingeffect==2){var delai=LMObjects[currentidx].delaisdisp-LMObjects[currentidx].delais;if(delai>0||(LMObjects[currentidx].delais>0&&delai==0)){setTimeout("LMObjectDelaiHide(LMObjects,"+currentidx+")",delai);}currentidx=valend;if(currentidx<gMaxVisibleItems){var offset=0;if(currentidx>0)offset=LMObjects[currentidx-1].delais;setTimeout("LMObjectAnimateElem(LMObjects,"+currentidx+")",(LMObjects[currentidx].delais-offset));}else {for(var i=0;i<LMObjects.length;i++){if(LMObjects[i].OnAfterPageDisplay)LMObjects[i].OnAfterPageDisplay();}AdjustHeight();}}else {}}function LMObjectAnimate(Stretch,Position,scalefx,scalefy){if(LMObjects.length<=0)return;PosPage(Stretch,Position,scalefx,scalefy);var i=0;var countvisible=0;var countnotvisible=0;var LMObjectsVisible=new Array();var LMObjectsNotVisible=new Array();for(i=0;i<LMObjects.length;i++){if(LMObjects[i].initvisible==true){LMObjectsVisible[countvisible]=LMObjects[i];LMObjectsVisible[countvisible].TagObject.LMObjectsIdx=countvisible;countvisible++;}else {LMObjectsNotVisible[countnotvisible]=LMObjects[i];LMObjectsNotVisible[countnotvisible].TagObject.LMObjectsIdx=countvisible;countnotvisible++;}}gMaxVisibleItems=countvisible;LMObjects=LMObjectsVisible;LMObjectSort(LMObjects,0,LMObjects.length-1);var i,j;var start=LMObjects.length;for(i=0,j=LMObjects.length;i<countnotvisible;i++,j++){LMObjects[j]=LMObjectsNotVisible[i];LMObjects[j].TagObject.LMObjectsIdx=j;}for(i=start;i<LMObjects.length;i++){if(LMObjects[i].InitObject)LMObjects[i].InitObject();LMObjects[i].TagObject.drawingeffect=2;LMObjects[i].delais=0;}setTimeout("LMObjectAnimateElem(LMObjects,0)",LMObject