home *** CD-ROM | disk | FTP | other *** search
/ Chip 2003 May / Chip_2003-05_cd1.bin / bonus / www.paladix.cz / js / svetlo.js < prev   
Text File  |  2003-04-05  |  1KB  |  48 lines

  1. function msieversion()
  2. {
  3. var ua=window.navigator.userAgent;
  4. var msie=ua.indexOf("MSIE ");
  5. if(msie>0)
  6. return parseInt(ua.substring(msie+5,ua.indexOf(".", msie)));
  7. else
  8. return 0;
  9. }
  10. function go() 
  11. {
  12. if(msieversion()>=4){ 
  13. if(document.all.image.width>document.all.image.height){
  14. if(document.all.image.width>screen.width-45) 
  15. image.width = screen.width-45;
  16. }
  17. else{
  18. if (document.all.image.height>screen.height-45) 
  19. image.height = screen.height-45;
  20. }
  21. }
  22. }
  23. function OpenWindow(Num)
  24. {
  25. window.open("foto"+Num+".html","Moje_nejlepsi_svetlo","toolbar=0,scrollbars=0,fullscreen=1,resizable=0,titlebar=0");
  26. }
  27. function GetCookie(name)
  28. {
  29. var CookieName=name+"=";
  30. var nStart=document.cookie.indexOf(CookieName)
  31. if (nStart==-1)
  32. return null
  33. var nEnd=document.cookie.indexOf(";",nStart+CookieName.length)
  34. if (nEnd==-1)
  35. nEnd=document.cookie.length
  36. return unescape(document.cookie.substring(nStart+CookieName.length,nEnd))
  37. }
  38. function SetCookie(name, value)
  39. {
  40. var CookieName=name+"="+escape(value)+"; expires=Sat, 31 Dec 2005 23:59:59 UTC;";
  41.  
  42. document.cookie=CookieName
  43. }
  44. function Remember()
  45. {
  46. SetCookie("name",document.PosliForm.name.value);
  47. SetCookie("email",document.PosliForm.email.value);
  48. }