Squiddlebuddy

Untitled

Oct 25th, 2011
283
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. <!--
  2. function showonlyone(thechosenone) {
  3. var newboxes = document.getElementsByTagName("div");
  4. for(var x=0; x<newboxes.length; x++) {
  5. name = newboxes[x].getAttribute("name");
  6. if (name == 'newboxes') {
  7. if (newboxes[x].id == thechosenone) {
  8. newboxes[x].style.display = 'block';
  9. }
  10. else {
  11. newboxes[x].style.display = 'none';
  12. }
  13. }
  14. }
  15. document.cookie = 'displaycookie=' + thechosenone + '; expires=Thu, 31 Dec 2099 23:59:59 UTC; path=/';
  16. }
  17.  
  18. function getCookie(c_name) {
  19. var i,x,y,ARRcookies=document.cookie.split(";");
  20. for (i=0;i<ARRcookies.length;i++)
  21. {
  22. x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
  23. y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
  24. if (x==c_name)
  25. {
  26. return unescape(y);
  27. }
  28. }
  29. }
  30. function cookiecheck() {
  31. showonlyone(getCookie(displaycookie));
  32. }
  33. //-->
  34.  
Advertisement
Add Comment
Please, Sign In to add comment