/* Req_url="/common/index.php?id="; Req_url1="/index.php?id="; Url_properties="/common/properties.php?id="; */ Req_url="common/index.php?id="; Req_url1="index.php?id="; Url_properties="common/properties.php?id="; Req_param="id"; Url_openChannel=Req_url+"-1"; Url_openCatalog=Req_url+"-2"; Url_searchChannel=Req_url+"-3"; Url_myClippings=Req_url+"-4"; Url_findChannel=Req_url+"-5"; Url_importCatalog=Req_url+"-6"; Url_exportCatalog=Req_url+"-7"; Url_selectCatalog=Req_url+"-8"; Url_company=Req_url+"-9"; Url_contact=Req_url+"-10"; Url_terms=Req_url+"-11"; Url_privacy=Req_url+"-12"; Url_copyright=Req_url+"-13"; Url_myTags=Req_url+"-14"; Url_findTags=Req_url+"-15"; Url_emailDesktop=Req_url+"-16"; Url_shareDesktop=Req_url+"-17"; Url_publishDesktop=Req_url+"-18"; Url_findDesktop=Req_url+"-19"; Url_COM="http://www.tradingshortcut.com"; Url_NL="http://www.tradingshortcut.com"; Url_UK="http://www.tradingshortcut.com"; Url_BE="http://www.tradingshortcut.com"; Url_IT="http://www.tradingshortcut.com"; Url_DE="http://www.tradingshortcut.com"; Url_ES="http://www.tradingshortcut.com"; Img_menu="img/menu.gif"; Img_min="img/min.gif"; Img_del="img/del.gif"; Img_size="img/size.gif"; Img_tab="img/tab.gif"; Img_check="img/check.gif"; WS_SessionWorkspace="workspace"; WS_SessionCatalogs="catalogs"; WS_SessionDesktop="desk"; WS_SessionWorkset="workset"; WS_maxDesktops=15; WS_tabPosX=0; WS_tabPosY=50; WS_tabPosDelta=111; WS_menu=2;// number top menu M_menuItemH=16; M_menuSepH=5; M_menuDeltaX=0; M_menuDeltaY=20; Col_lo="#b5d1e8"; Col_hi="#141654";// background color of title window Col_tabTextLo="#141654";// text color of Tab Col_tabTextHi="#b22c2b";// text color of Tab Col_titleTextLo="#141654";// text color of DHTML Menu Col_titleTextHi="#ffffff";// text color of DHTML Menu Col_tabBgLo="#729cd6"; Col_tabBgHi="#FFFFFF";// background color of active tab Col_array=new Array("#FBFC9B","#F9FA58","#EFC7C7","#E5A1A1","#D3FEB7","#B6FD87","#BCC6F8","#90A0F4","#FCE793","#FAD74B","#E4D39E","#D2B55D","#D9F2F1","#C0EAE7","#E8CBE8","#D8A8D8"); W_minsizeX=160; W_minsizeY=100; W_stdsizeX=300; W_stdsizeY=200; W_minposY=70; W_minposX=0; W_gridX=10; W_gridY=10; W_imgX=5; W_imgY=5; W_imgW=17; W_imgH=16; W_marginL=5; W_marginR=10; W_marginT=20; W_marginB=5; W_marginC=10; W_menuOffsetX=3; W_menuOffsetY=17; Slide_speed=1; Slide_step=10; Slide_curve=3; Evt_none=0; Evt_tab=1; Evt_delete=2; Evt_minimize=3; Evt_menu=4; Evt_drag=5; Evt_rename=6; Evt_resize=7; Evt_desktop=8; Evt_move=9; ID_undefined="undefined"; ID_logo="Logo"; ID_start="Start"; ID_intro="Intro"; ID_content="Content"; ID_title="Title"; ID_header="Header"; ID_screen="Screen"; ID_border="Border"; ID_shim="Shim"; ID_size="Size"; ID_layer="Layer"; ID_resizeborder="Resizeborder"; ID_input="Inputfield"; ID_WS_Desk="WS_Desk"; ID_items="Items"; ID_actions="Actions"; ID_check="Check"; ID_x="x"; ID_y="y"; ID_name="name"; ID_class="class"; ID_top="top"; ID_left="left"; ID_width="width"; ID_height="height"; ID_px="px"; ID_visible="visible"; ID_hidden="hidden"; ID_block="block"; ID_none="none"; ID_display="display"; ID_item="item"; ID_itemselect="itemselect"; ID_BeforeEnd="BeforeEnd"; ID_msie="msie"; ID_opera="opera"; ID_safari="safari"; ID_konq="konqueror"; ID_gecko="gecko"; ID_mac="mac"; TAG_body="BODY"; TAG_div="DIV"; TAG_a="A"; TAG_logo="logo"; TAG_desc="description"; TAG_title="title"; TAG_date="date"; Cursor_move="move"; Cursor_default="default"; Menu_pos_arrange=0; Menu_pos_logo=8; Menu_pos_date=9; Menu_pos_desc=10; M_win_x=0; M_win_y=0; // list menu on window M_win_Actions=new Array("newWindow(Url_openCatalog)", "reloadWindow()", "", "loadWindow(Url_openChannel)", "loadWindow(Url_openCatalog)", "loadWindow(Url_searchChannel)", "", "loadWindow(Url_myClippings)", "loadWindow(Url_myTags)", "", "properties()" ); M_win_Check=new Array(0,0,0,0,0,0,0,0,0,0,0); M0_x=300; M0_y=0; M0_Actions=new Array("newWindow(Url_openCatalog)", "reloadAllWindows()", "", "loadWindow(Url_openChannel)", "loadWindow(Url_openCatalog)", "loadWindow(Url_searchChannel)", "", "loadWindow(Url_myClippings)", "loadWindow(Url_myTags)", "", "loadWindow(Url_findChannel)", "loadWindow(Url_findTags)", "loadWindow(Url_findDesktop)" ); M0_Check=new Array(0,0,0,0,0,0,0,0,0,0,0,0,0); M1_x=500; M1_y=0; M1_Actions=new Array( "newDesktop(Msg_newSection)", "renameDesktop()", "deleteDesktop()", "", "browser(Url_emailDesktop,0.4,0.3)", "browser(Url_shareDesktop,0.4,0.3)", "browser(Url_publishDesktop,0.4,0.3)", "", "setStyle(0)", "setStyle(1)", "setStyle(2)" ); M1_Check=new Array(0,0,0,0,0,0,0,0,1,1,1); M2_x=700; M2_y=0; M2_Actions=new Array("browser(Url_company)", "browser(Url_contact)", "", "browser(Url_terms)", "browser(Url_privacy)", "browser(Url_copyright)" ); M2_Check=new Array(0,0,0,0,0,0,0); agent=navigator.userAgent.toLowerCase(); appVer=navigator.appVersion.toLowerCase(); is_konq=(agent.indexOf(ID_konq)!=-1); is_safari=((agent.indexOf(ID_safari)!=-1)&&(agent.indexOf(ID_mac)!=-1)); is_opera=(agent.indexOf(ID_opera)!=-1); is_ie=((appVer.indexOf(ID_msie)!=-1)&&(!is_opera)&&(!is_safari)&&(!is_konq)); is_gecko=((!is_safari)&&(!is_konq)&&(navigator.product)&&(navigator.product.toLowerCase()==ID_gecko)); function site(url){ //alert("Function site: " + url); document.location=url } function browser(url,factorx,factory){ //alert("Function browser: \n" + url +"\n"+ factorx +"\n"+ factory); if(ws.c==null&&(url==Url_emailDesktop||url==Url_publishDesktop))showMessage(Msg_noCurrentDesktop); else{ if(!factorx)factorx=0.8; if(!factory)factory=0.8; var bd=open(url,"popup","left=" + screen.availWidth/10 + ",top="+screen.availHeight/10 + ",width=" + factorx*screen.availWidth + ",height=" + factory*screen.availHeight + ",location=0,titlebar=0,menubar=0,status=0,toolbar=0,scrollbars=1,resizable=1"); bd.focus(); } } function saveCookie(name,value,days){ //alert("Function saveCookie: \n" + name +"\n"+ value +"\n"+ days); if(days){ var date=new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires="; expires="+date.toGMTString(); }else expires=""; document.cookie=name+"="+value+expires+"; path=/" } function readCookie(name){ //alert("Function readCookie: \n" + name); var nameEQ=name+"="; var v=document.cookie.split(';'); for(var i=0;iarg2.x)return 1; if(arg1.yarg2.y)return 1; return 0 } function distance(x1,y1,x2,y2){ //alert("Function distance: \n" + x1 + "\n" + y1 + "\n" + x2 + "\n" + y2); return Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)); } function arraySearch(arg1,arg2){ //alert("Function arraySearch: \n" + arg1 + "\n" + arg2); for(var i=0;i127)&&(c<2048)){ g+=String.fromCharCode((c>>6)|192); g+=String.fromCharCode((c&63)|128); }else{ g+=String.fromCharCode((c>>12)|224); g+=String.fromCharCode(((c>>6)&63)|128); g+=String.fromCharCode((c&63)|128); } } return g; } function decode_utf8(utftext){ //alert("Function decode_utf8: \n" + utftext); var raw=""; var i=0; var c=c1=c2=0; while(i191)&&(c<224)){ c2=utftext.charCodeAt(i+1); raw+=String.fromCharCode(((c&31)<<6)|(c2&63)); i+=2 }else{ c2=utftext.charCodeAt(i+1); c3=utftext.charCodeAt(i+2); raw+=String.fromCharCode(((c&15)<<12)|((c2&63)<<6)|(c3&63)); i+=3 } } return raw; } if(typeof HTMLElement!=ID_undefined&&!HTMLElement.prototype.insertAdjacentElement){ HTMLElement.prototype.insertAdjacentHTML=function(where,str){ var r=this.ownerDocument.createRange(); r.setStartBefore(this); this.appendChild(r.createContextualFragment(str)); } } function Layer(id){ //alert("Function Layer: \n" + id); this.obj=id+ID_layer; eval(this.obj+"=this"); this.elm=(document.getElementById&&document.getElementById(id))?document.getElementById(id):document.all[id]; this.css=this.elm.style; this.x=parseInt(this.css.left?this.css.left:(this.css.pixelLeft?this.css.pixelLeft:(this.elm.offsetLeft?this.elm.offsetLeft:(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(this.elm,'').getPropertyValue(ID_left):0)))); this.y=parseInt(this.css.top?this.css.top:(this.css.pixelTop?this.css.pixelTop:(this.elm.offsetTop?this.elm.offsetTop:(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(this.elm,'').getPropertyValue(ID_top):0)))); this.w=parseInt(this.css.width?this.css.width:(this.css.pixelWidth?this.css.pixelWidth:(this.elm.offsetWidth?this.elm.offsetWidth:(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(this.elm,'').getPropertyValue(ID_width):0)))); this.h=parseInt(this.css.height?this.css.height:(this.css.pixelHeight?this.css.pixelHeight:(this.elm.offsetHeight?this.elm.offsetHeight:(document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(this.elm,'').getPropertyValue(ID_height):0)))); } Layer.prototype.visible=LayerVisible; function LayerVisible(){ //alert("Function LayerVisible: \n"); return(this.css.visibility==ID_visible); } Layer.prototype.show=LayerShow; function LayerShow(){ //alert("Function LayerShow: \n"); this.css.visibility=ID_visible } Layer.prototype.hide=LayerHide; function LayerHide(){ //alert("Function LayerHide: \n"); this.css.visibility=ID_hidden } Layer.prototype.display=LayerDisplay; function LayerDisplay(display){ //alert("Function LayerDisplay: \n" + display); if(display)this.css[ID_display]=ID_block; else this.css[ID_display]=ID_none } Layer.prototype.setColor=LayerSetColor; function LayerSetColor(color,bgcolor){ //alert("Function LayerSetColor: \n" + color + "\n" + bgcolor); if(color!=null)this.css.color=color; if(bgcolor!=null)this.css.backgroundColor=bgcolor } Layer.prototype.resize=LayerResize; function LayerResize(w,h,clip){ //alert("Function LayerResize: \n" + w + "\n" + h + "\n" + clip); this.w=w;this.h=h; if(this.css.width!=null){ this.css.width=w+ID_px; this.css.height=h+ID_px }else{ this.css.pixelWidth=w; this.css.pixelHeight=h } if(clip)this.clipTo(0,w,h,0); } Layer.prototype.moveTo=LayerMoveTo; function LayerMoveTo(x,y){ //alert("Function LayerMoveTo: \n" + x + "\n" + y); this.x=x; this.y=y; if(this.css.left!=null){ this.css.left=x+ID_px; this.css.top=y+ID_px }else{ this.css.pixelLeft=x; this.css.pixelTop=y } } Layer.prototype.slideTo=LayerSlideTo; function LayerSlideTo(x1,y1,x2,y2,pct,step){ //alert("Function LayerSlideTo: \n" + x1 + "\n" + y1 + "\n" + x2 + "\n" + y2 + "\n" + pct + "\n" + step); pct-=step; if(pct<0){ this.moveTo(x2,y2); return } B1=pct*pct*pct;B2=3*pct*pct*(1-pct); B3=3*pct*(1-pct)*(1-pct); B4=(1-pct)*(1-pct)*(1-pct); var bf=x1*B1+(x1+(x2-x1)/Slide_curve)*B2+(x2-(x2-x1)/Slide_curve)*B3+x2*B4; var bg=y1*B1+y1*B2+y2*B3+y2*B4; this.moveTo(Math.round(bf),Math.round(bg)); setTimeout(this.obj+".slideTo("+x1+","+y1+","+x2+","+y2+","+pct+","+step+")",Slide_speed); } Layer.prototype.clipTo=LayerClipTo; function LayerClipTo(t,r,b,l){ //alert("Function LayerClipTo: \n" + t + "\n" + r + "\n" + b + "\n" + l); this.css.clip="rect("+t+ID_px+" "+r+ID_px+" "+b+ID_px+" "+l+ID_px+")"; this.w=r; this.h=b } Layer.prototype.zindex=LayerZindex; function LayerZindex(z){ if(z!=null)this.css.zIndex=z; return this.css.zIndex } Layer.prototype.inside=LayerInside; function LayerInside(x,y){ return(x>=this.x&&x<=this.x+this.w&&y>=this.y&&y<=this.y+this.h); } Layer.prototype.write=LayerWrite; function LayerWrite(html){ this.elm.innerHTML=html } M_menus=new Array(); M_count=0; function M(name){ //alert("Function M:\nname="+name); M_menus[M_count]=this; this.obj="M_menus["+M_count+"]"; this.name=name; this.title=eval(name+ID_title); this.items=eval(name+ID_items); if(this.items!=''){ this.actions=eval(name+ID_actions); this.check=eval(name+ID_check); this.x=eval(name+ID_x); this.y=eval(name+ID_y); var o=1; var h=''; if(this.title!=null)h+=''; docWrite(h); this.lyr=new Layer(name); if(is_ie)this.shimlyr=new Layer(name+ID_shim); this.contentlyr=new Layer(name+ID_content); this.itemslyr=new Array(); this.checklyr=new Array(); this.checked=new Array(); if(this.title!=null){ this.titlelyr=new Layer(name+ID_title); this.titlelyr.moveTo(this.x,this.y); this.x+=M_menuDeltaX; this.y+=M_menuDeltaY } for(var i=0;i'); //alert(ID_resizeborder); W_borderlyr=new Layer(ID_resizeborder); } // FUNCTION :: create window function W(x,y,width,height,reqid,url,zindex,min){ //alert("Function W: \n" + x + "\n" + y + "\n" + width + "\n" + height + "\n" + reqid + "\n" + url + "\n" + zindex + "\n" + min); W_win[W_count]=this; this.obj="W_win["+W_count+"]"; this.name="Win"+(W_count++); this.x=0; this.y=0; this.w=0; this.h=0; this.reqid=reqid; this.url=null; this.minimized=0; this.col=null; this.next=null; var h='
'+(is_ie?'':'')+'
' +'' +''+''+''+''+'
 
' +'
'+'
'+''+'
'+'
'; docWrite(h); this.lyr=new Layer(this.name); this.lyr.zindex(zindex); this.move(x,y); if(is_ie)this.shimlyr=new Layer(this.name+ID_shim); this.titlelyr=new Layer(this.name+ID_title); this.headerlyr=new Layer(this.name+ID_header); this.screenlyr=new Layer(this.name+ID_screen); this.contentlyr=new Layer(this.name+ID_content); this.sizelyr=new Layer(this.name+ID_size); this.iframe=(this.contentlyr.elm.contentWindow)?this.contentlyr.elm.contentWindow:document.frames[this.name+ID_content]; this.resize(width,height,2); if(min)this.toggle(); if(url!=null)this.load(url); this.show(); } W.prototype.destroy=WinDestroy; function WinDestroy(){ this.desktop=null; this.col=null; this.next=null; this.hide(); } W.prototype.show=WinShow; function WinShow(){ //alert("function WinShow") if(!this.minimized)this.contentlyr.show(); this.lyr.show(); } W.prototype.hide=WinHide; function WinHide(){ this.contentlyr.hide(); this.lyr.hide(); } W.prototype.load=WinLoad; function WinLoad(url){ this.iframe.location=url; this.setTitle(Msg_loading); } W.prototype.onload=WinOnload; function WinOnload(){ //alert("Function WinOnload"); try{ this.iframe.document.onmousedown=mousedown; this.iframe.document.onmousemove=mousemove; this.iframe.document.onmouseup=mouseup; this.setTitle(this.iframe.document.title); this.url=this.iframe.document.URL; if(this.url.indexOf(Req_url)>=0) this.reqid=this.url.substring(this.url.indexOf("=")+1); }catch(e){ if(this.url)this.setTitle(Msg_external); } } W.prototype.setTitle=WinSetTitle; function WinSetTitle(title){ //alert("Function WinSetTitle"); this.title=(title==null)?'':title; this.titlelyr.write(""+this.title+""); } W.prototype.toggle=WinToggle; function WinToggle(){ //alert("Function WinToggle"); if(this.minimized){ this.lyr.clipTo(0,this.w,this.h,0); this.contentlyr.show(); this.minimized=0 }else{ this.lyr.clipTo(0,this.w,W_marginT,0); this.contentlyr.hide(); this.minimized=1 } } W.prototype.move=WinMove; function WinMove(x,y){ this.x=Math.max(x,W_minposX); this.y=Math.max(y,W_minposY); this.lyr.moveTo(this.x,this.y); } W.prototype.slide=WinSlide; function WinSlide(x2,y2){ //alert("Function: " + x2+"\n"+y2+"\n"+W_minposX+"\n"+W_minposY); if(this.x==x2&&this.y==y2){ this.move(x2,y2); return } x2=Math.max(x2,W_minposX); y2=Math.max(y2,W_minposY); step=1/(Math.sqrt((x2-this.x)*(x2-this.x)+(y2-this.y)*(y2-this.y))/Slide_step); this.lyr.slideTo(this.x,this.y,x2,y2,1,step); this.x=x2;this.y=y2 } W.prototype.resize=WinResize; function WinResize(w,h,s){ if(this.minimized)this.lyr.clipTo(0,this.w,this.h,0); w=Math.max(w,W_minsizeX); h=Math.max(h,W_minsizeY); if(s==0){ W_borderlyr.moveTo(this.x,this.y); W_borderlyr.zindex(this.lyr.zindex()+1); W_borderlyr.resize(w,h,1); W_borderlyr.show(); }else if(s==1){ W_borderlyr.resize(w,h,1); }else if(s==2){ var p=w-this.lyr.w; var u=h-this.lyr.h; W_borderlyr.hide(); this.lyr.resize(w,h,1); if(is_ie)this.shimlyr.resize(w,h,1); this.screenlyr.resize(this.screenlyr.w+p,this.screenlyr.h+u,1); this.contentlyr.resize(this.contentlyr.w+p,this.contentlyr.h+u,1); this.headerlyr.resize(this.headerlyr.w+p,this.headerlyr.h,1); this.titlelyr.resize(this.titlelyr.w+p,this.titlelyr.h,1); this.sizelyr.moveTo(this.sizelyr.x+p,this.sizelyr.y+u); this.w=w; this.h=h } if(this.minimized)this.lyr.clipTo(0,this.w,W_marginT,0); } W.prototype.hilite=WinHilite; function WinHilite(){ this.headerlyr.setColor(Col_titleTextHi,Col_hi); this.titlelyr.setColor(Col_titleTextHi,Col_hi); } W.prototype.lolite=WinLolite; function WinLolite(pos){ var color=Col_array[2*(pos%(Col_array.length/2))+1]; this.headerlyr.setColor(Col_titleTextLo,color); this.titlelyr.setColor(Col_titleTextLo,color); } D_desk=new Array(); D_count=0; function D(title,deskData,pos){ //alert("Function D:\ntitle="+title+"\ndeskData="+deskData+"\npos="+pos) D_desk[D_count]=this; this.obj="D_desk["+D_count+"]"; this.name="Desk"+(D_count++); this.x=0; this.y=0; this.pos=pos; this.title=title; this.deskData=deskData; this.win=new Array(); this.count=0; this.c=null; this.aaCols=new Array(); this.aaColpos=new Array(); this.aaColwidth=new Array(); this.aaColcount=0; docWrite('
' + '' + '
' + '
' +'
'); this.lyr=new Layer(this.name); this.titlelyr=new Layer(this.name+ID_title); this.w=this.lyr.w; this.h=this.lyr.h; this.hilite(0,1); this.setTitle(title); } D.prototype.destroy=DesktopDestroy; function DesktopDestroy(){ this.lyr.hide(); this.hide(); for(var i=0;i'+title+''); } } D.prototype.move=DesktopMove; function DesktopMove(x,y){ this.x=x;this.y=y; this.lyr.moveTo(x,y); } D.prototype.addWindow=DesktopAddWindow; function DesktopAddWindow(win){ this.win[this.count++]=win; this.setCurrentWindow(win); } D.prototype.removeWindow=DesktopRemoveWindow; function DesktopRemoveWindow(win){ for(var i=0;i=this.aaColpos[i]+this.aaColwidth[i] && this.c.x>this.aaColpos[i] ) i++; if(i==this.aaColcount){ this.aaCols[i]=this.c; this.aaColwidth[i]=this.c.w+W_marginC; this.aaColpos[i]=(i==0)?W_minposX:this.aaColpos[i-1]+this.aaColwidth[i-1]; this.aaColcount++; this.c.next=null }else{ var j=this.aaCols[i],k=null; while(j!=null&&this.c.y>j.y){ k=j; j=j.next } if(k==null){ this.aaCols[i]=this.c; this.c.next=j }else{ k.next=this.c; this.c.next=j } } this.c.col=i } D.prototype.arrangeResize=DesktopArrangeResize; function DesktopArrangeResize(){ this.aaColwidth[this.c.col]=this.c.w+W_marginC; this.arrangeShow(); } D.prototype.arrangeDelete=DesktopArrangeDelete; function DesktopArrangeDelete(){ var i=this.c.col; if(i==null)return; var j=this.aaCols[i],k=null; while(j!=this.c){ k=j; j=j.next } if(k==null)this.aaCols[i]=j.next; else k.next=j.next; this.c.col=null; this.c.next=null } D.prototype.arrangeShow=DesktopArrangeShow; function DesktopArrangeShow(){ //alert("Fucntion DesktopArrangeShow\n" + this.aaColcount); var del=0; for(var i=0;i
Biz Resource
"); Desk4.onmouseover = ( function(event){ oldbg = this.style.background; document.getElementById(this.id+'Title').style.color = Col_tabTextHi; this.style.background = Col_tabBgHi; } ); Desk4.onmouseout = ( function(event){ document.getElementById(this.id+'Title').style.color = Col_tabTextLo; this.style.background = oldbg; } ); Desk4.onclick = ( function(event){ window.location.href='biz/bizresource.php'} ); docWrite("
Register
"); Desk5.onmouseover = ( function(event){ oldbg = this.style.background; document.getElementById(this.id+'Title').style.color = Col_tabTextHi; this.style.background = Col_tabBgHi; } ); Desk5.onmouseout = ( function(event){ document.getElementById(this.id+'Title').style.color = Col_tabTextLo; this.style.background = oldbg; } ); Desk5.onclick = ( function(event){ window.location.href='biz/register.php'} ); } WS.prototype.destroy=WorkspaceDestroy; function WorkspaceDestroy(){ this.saveWorkspace(); this.saveDesks(); } WS.prototype.saveWorkspace=WorkspaceSaveWorkspace; function WorkspaceSaveWorkspace(){ var c=this.count+','+(this.zindex)+','+this.auto+','+arraySearch(this.desk,this.c)+','+this.menus[1].checked[Menu_pos_logo]+','+this.menus[1].checked[Menu_pos_date]+','+this.menus[1].checked[Menu_pos_desc]; for(var j=0;j=this.count)pos=this.count-1; this.desk.splice(arraySearch(this.desk,desk),1); this.desk.splice(pos,0,desk); this.arrange(); } WS.prototype.changeDesktop=WorkspaceChangeDesktop; function WorkspaceChangeDesktop(desk,title){ //alert("Function WorkspaceChangeDesktop - Change title for desktop: " + desk + " - " + title); desk.setTitle(title); } WS.prototype.setCurrentDesktop=WorkspaceSetCurrentDesktop; function WorkspaceSetCurrentDesktop(desk){ //alert("Function WorkspaceSetCurrentDesktop: "); if(this.c!=null)this.c.hide(); if((this.c=desk)!=null){ this.introlyr.hide(); if(this.c.deskData!=null){ if(this.auto) setTimeout(this.c.obj+".show();"+this.c.obj+".arrange();"+this.obj+".levelZindex()",0); else setTimeout(this.c.obj+".show()",0); }else{ this.c.show(); if(this.auto)this.c.arrange(); } this.saveWorkspace(); }else{ this.introlyr.show(); return } } WS.prototype.levelZindex=WorkspaceLevelZindex; function WorkspaceLevelZindex(){ //alert("Function WorkspaceLevelZindex: "); var maxZindex=this.zindex; for(var i=0;i0) ws.setCurrentDesktop(ws.desk[0]); var curDesktop = 0; queryvar = getQueryVariable('cd'); if(parseInt(queryvar) >0 && parseInt(queryvar) 0) ws.setCurrentDesktop(ws.desk[curDesktop]); document.onmousedown=mousedown; document.onmousemove=mousemove; document.onmouseup=mouseup } function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i' + '
' + '' + '
' + ''; docWrite(h); inputlyr=new Layer(ID_input); inputObj=document.forms[0].input } function showInput(title,x,y){ inputObj.value=title; inputlyr.moveTo(x,y); inputlyr.zindex(ws.zindex++); inputlyr.show(); inputObj.select(); } function processInput(){ inputObj.blur(); title=inputObj.value; if(ws.c!=null)ws.changeDesktop(ws.c,title); inputlyr.hide(); return false } function newWindow(url){ //alert("Function newWindow: \n" + url) if(ws.c==null){ showMessage(Msg_noCurrentDesktop); return } w=(ws.c.c==null)?W_stdsizeX:ws.c.c.w; h=(ws.c.c==null)?W_stdsizeY:ws.c.c.h;ws.c.addWindow(new W(posX,posY,w,h,0,url,ws.zindex++,0)); evtType=Evt_drag; evtOffsetX=ws.c.c.w/3;evtOffsetY=10 } function toggleWindow(){ if(ws.c!=null&&(win=ws.c.c)!=null){ win.toggle(); if(ws.auto)ws.c.arrangeShow(); } } function closeWindow(){ if(ws.c!=null&&(win=ws.c.c)!=null){ if(ws.auto){ ws.c.arrangeDelete(); ws.c.arrangeShow() } ws.c.removeWindow(win); win.destroy(); } } function loadWindow(url){ if(ws.c==null)showMessage(Msg_noCurrentDesktop); else if((win=ws.c.c)==null)showMessage(Msg_noCurrentWindow); else{ if(url==null)url=Req_url+win.reqid; win.load(url); } } function loadWindow1(url){ if(ws.c==null)showMessage(Msg_noCurrentDesktop); else if((win=ws.c.c)==null)showMessage(Msg_noCurrentWindow); else{ if(url==null)url=Req_url1+win.reqid; win.load(url); } } function reloadWindow(win){ if(ws.c!=null){ if(win==null)win=ws.c.c; if(win!=null)try{if(win.iframe.document.URL!=null)win.load(win.iframe.document.URL);}catch(e){} } } function reloadAllWindows(){ if(ws.c!=null){ for(var i=0;i0)ws.setCurrentDesktop(ws.desk[0]); else ws.setCurrentDesktop(null); } function renameDesktop(){ if(evtType==Evt_menu)evtObj.hide(); if(ws.c==null){ showMessage(Msg_noCurrentDesktop); return } showInput(ws.c.title,ws.c.x+ws.c.titlelyr.x,ws.c.y+ws.c.titlelyr.y); } function resetWorkspace(){ if(!confirm(Msg_defaultSettings))return; deleteCookie(WS_SessionWorkspace); ws=null; document.location.reload(); } function showMessage(msg){ if(evtType==Evt_menu)evtObj.hide(); if(msg==Msg_noCurrentDesktop&&ws.introlyr.visible())msg=Msg_clickStart; alert(msg); } function setStyle(style){ //alert("Function setStyle:\n" + style) if(style==0){ setStyleByTag(TAG_div,TAG_logo,ID_display,evtObj.checked[Menu_pos_logo]?ID_block:ID_none); }else if(style==1){ setStyleByTag(TAG_div,TAG_desc,ID_display,evtObj.checked[Menu_pos_date]?ID_block:ID_none); setStyleByTag(TAG_a,TAG_title,ID_class,evtObj.checked[Menu_pos_date]?ID_itemselect:ID_item); }else if(style==2){ setStyleByTag(TAG_div,TAG_date,ID_display,evtObj.checked[Menu_pos_desc]?ID_block:ID_none); } ws.saveWorkspace(); } function setStyleByTag(tag,name,prop,value){ for(var j=0;jbc){ bb=ws.c.win[i];bc=ws.c.win[i].lyr.zindex(); } } if(ws.c.setCurrentWindow(bb)){ ws.c.c.lyr.zindex(ws.zindex++); if(ws.c.c.y+W_imgY<=posY&&posY<=ws.c.c.y+W_imgH){ if(ws.c.c.x+W_imgX<=posX&&posX<=ws.c.c.x+W_imgW){ bgcolor=Col_array[2*(ws.c.pos%(Col_array.length/2))]; W_menu.show(ws.c.c.x+W_menuOffsetX,ws.c.c.y+W_menuOffsetY,ws.zindex++,bgcolor); evtObj=W_menu;evtObj.selectItem(posX,posY);evtType=Evt_menu }else if(ws.c.c.x+ws.c.c.w-W_imgW<=posX&&posX<=ws.c.c.x+ws.c.c.w-W_imgX)evtType=Evt_delete; else if(ws.c.c.x+ws.c.c.w-2*W_imgW<=posX&&posX<=ws.c.c.x+ws.c.c.w-W_imgX-W_imgW)evtType=Evt_minimize; else evtType=Evt_drag }else if(posX>=ws.c.c.x+ws.c.c.w-7&&posY>=ws.c.c.y+ws.c.c.h-7){ evtType=Evt_resize;ws.c.c.resize(ws.c.c.w,ws.c.c.h,0); }else if(posYevtObj.x+WS_tabPosDelta)ws.moveDesktop(evtObj,pos+1); return false }else if(evtType==Evt_tab){ if(evtObj.lyr.inside(posX,posY))return false; evtObj.hilite(0,1); evtType=Evt_none; return false } for(var i=0;i0)ws.setCurrentDesktop(ws.desk[0]); } evtType=Evt_none; return true }