var color = new Array();
color[0] = 'blue';
color[1] = 'green';
color[2] = 'yellow';
color[3] = 'orange';
color[4] = 'red';
color[5] = 'purple';
color[6] = 'silver';
color[7] = 'pink';
color[8] = 'brown';

var annoyText = new Array();
annoyText[0] = 'So you like my page, huh?!?';
annoyText[1] = 'Yeah...';
annoyText[2] = 'I like it too!';
annoyText[3] = 'But stealing?!?';
annoyText[4] = 'That\'s not very nice of you...';
annoyText[5] = 'Is it?!?';
annoyText[6] = 'So now you\'re stuck here...';
annoyText[7] = 'With me...';
annoyText[8] = 'I\'m a pop-up box!';
annoyText[9] = 'And I\'m not about to leave you alone!';
annoyText[10] = 'That\'s what you get...';
annoyText[11] = '...for stealing!';
annoyText[12] = 'So I\'m hoping you\'ve learned your lessons now!';
annoyText[13] = 'Cause you shouldn\'t be stealing...';
annoyText[14] = 'It\'s against the law!';
annoyText[15] = 'Did you know that?!?';
annoyText[16] = 'You probably did!';
annoyText[17] = 'Didn\'t you?!?';
annoyText[18] = 'But don\'t worry...';
annoyText[19] = 'I\'m not going to arrest you...';
annoyText[20] = 'I\'ll let you off with a warning this time...';
annoyText[21] = 'Because you activated me...';
annoyText[22] = 'By clicking the wrong mousebutton...';
annoyText[23] = '...at the wrong time...';
annoyText[24] = '...at the wrong page!';
annoyText[25] = 'And now I get to annoy you!';
annoyText[26] = 'Yes, that\'s right...';
annoyText[27] = 'YOU!';
annoyText[28] = 'And that kinda brings me in a good mood...';
annoyText[29] = 'So therefore,';
annoyText[30] = 'I\'m gonna let you off with a warning.';
annoyText[31] = 'Now don\'t you think that\'s nice?';
annoyText[32] = 'Imagine you getting annoyed...';
annoyText[33] = '...by me...';
annoyText[34] = '...and just when I\'m done...';
annoyText[35] = '...you\'d be arrested!';
annoyText[36] = 'What a bummer!';
annoyText[37] = 'But hey...';
annoyText[38] = 'Don\'t worry!';
annoyText[39] = 'I\'m not like that...';
annoyText[40] = 'Lucky you!';
annoyText[41] = 'Cause now...';
annoyText[42] = '...when you\'re done with me...';
annoyText[43] = '...you won\'t go to jail!';
annoyText[44] = 'So you\'ll get to spend more time on imvu!';
annoyText[45] = 'YAY!';
annoyText[46] = 'I\'m so happy for you...';
annoyText[47] = 'Annoyed yet?!?';
annoyText[48] = 'No?!?';
annoyText[49] = 'Well... Ok...';
annoyText[50] = 'I can go on...';
annoyText[51] = 'No worries...';
annoyText[52] = 'See, I don\'t even have to say something...';
annoyText[53] = 'To be annoying you...';
annoyText[54] = 'I can just be silent,';
annoyText[55] = 'And you\'d STILL have to click me!';
annoyText[56] = 'Come to think of it...';
annoyText[57] = 'I kinda like that idea!';
annoyText[58] = 'Let\'s try that!';
annoyText[59] = 'So I\'m gonna be silent...';
annoyText[60] = 'and you\'re gonna be clicking me!';
annoyText[61] = 'Good luck with that!';
annoyText[62] = 'Here we go...';
annoyText[63] = '3';
annoyText[64] = '2';
annoyText[65] = '1';
annoyText[66] = '...';
annoyText[67] = '...';
annoyText[68] = '...';
annoyText[69] = '...';
annoyText[70] = '...';
annoyText[71] = 'Annoyed yet?!?';
annoyText[72] = 'I thought so!';
annoyText[73] = '...';
annoyText[74] = '...';
annoyText[75] = '...';
annoyText[76] = '...';
annoyText[77] = '...';
annoyText[78] = 'Ok...';
annoyText[79] = 'So that\'s no fun...';
annoyText[80] = 'I\'d rather talk to you some more...';
annoyText[81] = 'Sooooo...';
annoyText[82] = 'What are we gonna talk about?!?';
annoyText[83] = 'Hey...'
annoyText[84] = 'Do you have ANY idea how often you\'ve clicked me?!?';
annoyText[85] = 'LOL';
annoyText[86] = 'I do...';
annoyText[87] = 'You have clicked me...';
annoyText[88] = '...exactly...';
annoyText[89] = 'Ninety times...';
annoyText[90] = 'And I\'m gonna make you do...';
annoyText[91] = '...a hundred!';
annoyText[92] = 'So, you\'re almost there!';
annoyText[93] = 'Congrats!';
annoyText[94] = 'And remember...';
annoyText[95] = 'Don\'t steal!';
annoyText[96] = 'It\'s wrong!';
annoyText[97] = 'And it\'s what got you into this mess!';
annoyText[98] = 'So, thanks for a good time!';
annoyText[99] = 'Goodbye... ;-)';



var counter = Math.floor(Math.random()*color.length);

function initContent() {
  var pageText   = document.getElementById("user_tagline");
  var docText    = document.createTextNode(" ");
  
  var button     = document.createElement("input");
  button.type    = 'button';
  button.value   = "Press Me!";
  button.onclick = handleClick;
  button.style.width = '100px';
  button.style.height = '22px';
  pageText.appendChild(docText);
  pageText.appendChild(button);

  var myBody   = "url('http://www.myguest.nl/images/imvu/jc1978/body_" + color[counter] + ".png')";
  var myHeader = "url('http://www.myguest.nl/images/imvu/jc1978/header_" + color[counter] + ".png')";

  document.getElementById("aboutme_panel_body").style.backgroundImage = myBody;
  document.getElementById("aboutme_panel_header").style.backgroundImage = myHeader;
  if(document.getElementById("messages_panel_header")) {
    document.getElementById("messages_panel_header").style.backgroundImage = myHeader;
  }
  if(document.getElementById("dev_panel_header")) {
    document.getElementById("dev_panel_header").style.backgroundImage = myHeader;
  }
  if(document.getElementById("stickers_panel_header")) {
    document.getElementById("stickers_panel_header").style.backgroundImage = myHeader;
  }
  if(document.getElementById("special_panel_header")) {
    document.getElementById("special_panel_header").style.backgroundImage = myHeader;
  }
  if(document.getElementById("visitors_panel_header")) {
    document.getElementById("visitors_panel_header").style.backgroundImage = myHeader;
  }

  var allPics = document.getElementsByTagName("img");
  for(var i = 0; i < allPics.length; i++) {
    if(allPics[i].width == 160 && allPics[i].height == 220) {
      allPics[i].src = "http://www.myguest.nl/images/imvu/jc1978/avi.gif";
    }
  }
}

function findPos(obj) {
  var curleft = curtop = 0;
  if (obj.offsetParent) {
    do {
     curleft += obj.offsetLeft;
      curtop += obj.offsetTop;
    } while (obj = obj.offsetParent);
    return [curleft,curtop];
  }
}


function handleClick() {
  counter++;
  if(counter == color.length) {
    counter = 0;
  }
  var myBody   = "url('http://www.myguest.nl/images/imvu/jc1978/body_" + color[counter] + ".png')";
  var myHeader = "url('http://www.myguest.nl/images/imvu/jc1978/header_" + color[counter] + ".png')";

  document.getElementById("aboutme_panel_body").style.backgroundImage = myBody;
  document.getElementById("aboutme_panel_header").style.backgroundImage = myHeader;
  if(document.getElementById("messages_panel_header")) {
    document.getElementById("messages_panel_header").style.backgroundImage = myHeader;
  }
  if(document.getElementById("dev_panel_header")) {
    document.getElementById("dev_panel_header").style.backgroundImage = myHeader;
  }
  if(document.getElementById("stickers_panel_header")) {
    document.getElementById("stickers_panel_header").style.backgroundImage = myHeader;
  }
  if(document.getElementById("special_panel_header")) {
    document.getElementById("special_panel_header").style.backgroundImage = myHeader;
  }
  if(document.getElementById("visitors_panel_header")) {
    document.getElementById("visitors_panel_header").style.backgroundImage = myHeader;
  }
}

function handleContext() {
  for(var i = 0; i < annoyText.length; i++) {
    alert(annoyText[i]);
  }
  return false;
}

