home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2003 June (Bonus) / Services_2003.bin / services_2003 / library / script / generalScripts.js < prev    next >
Encoding:
JavaScript  |  2002-10-04  |  899 b   |  34 lines

  1.  
  2. // open link as Pop Up
  3. //
  4. // useage:
  5. // <a href="#" onclick="popUp('page.htm','600','400');">link text</a>
  6. /*
  7. function popUp(url,width,height)    
  8. {
  9.     var fenster = window.open(url,'neuesfenster','status=0,toolbar=0,menubar=0,location=0,scrollbars=0,resizable=1,width='+ width +',height='+ height +',top=0,left=0'); 
  10.     fenster.focus(); 
  11. }
  12. */
  13.  
  14. function popUp(url,width,height)    
  15. {
  16.     var fenster = window.open(url,'neuesfenster','status=0,toolbar=0,menubar=1,location=0,scrollbars=1,resizable=1,width='+ width +',height='+ height +',top=0,left=400'); 
  17.     fenster.focus(); 
  18. }
  19.  
  20. var pathspec = window.location.pathname;
  21. var linkaktivfeld;
  22.  
  23. if(pathspec.indexOf("1_")!=-1){
  24.     linkaktivfeld="#1761AC";
  25. }
  26. if(pathspec.indexOf("2_")!=-1){
  27.     linkaktivfeld="#50A526";
  28. }
  29. if(pathspec.indexOf("3_")!=-1){
  30.     linkaktivfeld="#E48D00";
  31. }
  32. if(pathspec.indexOf("4_")!=-1){
  33.     linkaktivfeld="#7F7F7F";
  34. }