// JavaScript Document
 function postVideo() {
  
      var addLink;
      
      addLink = "<div style='width: 441px;'>";
      
        addLink += "<form action='./' method='post'>";
      
        addLink += '<div class="addNewPost">';
        addLink += 'Add New Post';
        addLink += '</div>';
        
        addLink += '<div class="addPostContainer" >';
        
            addLink += "<div>";
            addLink += "Title<br/><input type='text' name='postTitleInfo' id='postTitle' size='53' /></div>";
            addLink += "<div>";
            addLink += "Link<br/><span style='font-weight: normal;'>http://</span>";
            addLink += "<input type='text' name='postLink' id='postLink' size='46' /></div>";
            addLink += "<div>";
            addLink += "Video URL <span class='videoSharingWebsites'>";
            addLink += "(YouTube, Vimeo, Google Video, LiveLeak,<br/> or MySpace Video)</span> ";
            addLink += "<br/><input type='text' name='postVideoLink' id='postImageLink' size='53'/></div>";
            addLink += "<div>";
            addLink += "Description<br/><textarea name='postDesc' id='postDesc' cols='40' rows='5' /></textarea></div>";
            
            addLink += '<div class="postBuzzButton" >';
            addLink += '<span><input type="submit" tabindex="100"  value="Post Buzz" id="wp-submit" name="wp-submit"/></span>';
            addLink += '<span class="spnCancel" onClick="callPostButtons()">Cancel</span>';            
            addLink += '</div>';
            
        addLink += '</div>';
        
        addLink += "</form>";
        
      addLink += "<div>";
      
      document.getElementById('postItems').innerHTML = addLink;
  
  }
  


  function postImage() {
  
      var addLink;
      
      addLink = "<div style='width: 441px;'>";
      
        addLink += "<form action='./' method='post'>";
      
        addLink += '<div  class="addNewPost">';
        addLink += 'Add New Post';
        addLink += '</div>';
        
        addLink += '<div  class="addPostContainer" >';
        
            addLink += "<div style='margin-top: 5px; '>";
            addLink += "Title<br/><input type='text' name='postTitleInfo' id='postTitle' size='53' /></div>";
            addLink += "<div style='margin-top: 5px; '>";
            addLink += "Link<br/><span style='font-weight: normal;'>http://</span>";
            addLink += "<input type='text' name='postLink' id='postLink' size='46' /></div>";
            addLink += "<div style='margin-top: 5px; '>";
            addLink += "Image Link<br/><input type='text' name='postImageLink' id='postImageLink' size='53'/></div>";
            addLink += "<div class='postUserDesc' >";
            addLink += "Description<br/><textarea name='postDesc' id='postDesc' cols='40' rows='5' /></textarea></div>";
            
            addLink += '<div class="postBuzzButton" >';
            addLink += '<span><input type="submit" tabindex="100"  value="Post Buzz" id="wp-submit" name="wp-submit"/></span>';
    addLink += '<span class="spnCancel" onClick="callPostButtons()">Cancel</span>';            
            addLink += '</div>';
            
        addLink += '</div>';
        
        addLink += "</form>";
        
      addLink += "<div>";
      
      document.getElementById('postItems').innerHTML = addLink;
  
  }
  
  
   function postLink() {
  
      var addLink;
      
      addLink = "<div style='width: 441px;'>";
      
        addLink += "<form action='./' method='post'>";
      
        addLink += '<div  class="addNewPost">';
        addLink += 'Add New Post';
        addLink += '</div>';
        
        addLink += '<div  class="addPostContainer">';
        
            addLink += "<div>";
            addLink += "Title<br/><input type='text' name='postTitleInfo' id='postTitle' size='53' /></div>";
            addLink += "<div>";
            addLink += "Link<br/><span style='font-weight: normal;'>http://</span><input type='text' name='postLink' id='postLink' size='46' /></div>";
            addLink += "<div>";
        addLink += "Thumbnail Link<br/><input type='text' name='postThumbNail' id='postThumbNail' size='53'/></div>";
            addLink += "<div>";
            addLink += "Description<br/><textarea name='postDesc' id='postDesc' cols='40' rows='5' /></textarea></div>";
            
            addLink += '<div class="postBuzzButton" >';
            addLink += '<span><input type="submit" tabindex="100"  value="Post Buzz" id="wp-submit" name="wp-submit"/></span>';
    addLink += '<span class="spnCancel" onClick="callPostButtons()">Cancel</span>';            
            addLink += '</div>';
            
        addLink += '</div>';
        
        addLink += "</form>";
        
      addLink += "<div>";
  
      document.getElementById('postItems').innerHTML = addLink;
  
  }
  
  
  
  function callPostButtons(){
  
         var buildProfile = "";
       
         buildProfile += '<div class="postItem">';
         buildProfile += '<div  class="postItemTitle">';
         buildProfile += 'Post Your Buzz</div>';
         buildProfile += 'BuzzHollywood is for sharing the best of the viral web. <br/>';
         buildProfile += 'If you have spot any Buzz then post that links or images or videos.<br/>';
         buildProfile += 'The most viewed posts will be featured on the front of BuzzFeed.';
         buildProfile += '</div>';
  
         buildProfile += "<div class='postButtons'>";
         buildProfile += ' <label onClick="postLink()" >Post a Link</label>';
         buildProfile += "</div>";
         buildProfile += "<div class='postButtons'>";
         buildProfile += '<label onClick="postImage()" >Post a Image</label>';
         buildProfile += "</div>";
         buildProfile += "<div class='postButtons'>";
         buildProfile += '<label onClick="postVideo()"  >Post a Video</label>';
         buildProfile += "</div>";
         
         buildProfile += '<div style="clear: both; height: 20px;"></div><form enctype="multipart/form-data" method="post" action="/profile/"><div style="margin-top: 10px; margin-bottom: 30px;">'; 
         buildProfile += '<div><h2 class="chooseColorTitle">Choose a color scheme</h2></div>';	  
         buildProfile += '<div style="margin-top: 10px; width: 300px;" id="chooseColor"><div style="margin-right: 20px; float: left;">';
         buildProfile += '<input type="submit" style="border: 0px none ; background-color: rgb(241, 89, 34); color: rgb(241, 89, 34); width: 18px;" value="1" name="submitColor"/>';
         buildProfile += '</div>';
         buildProfile += '<div style="margin-right: 20px; float: left;">';
         buildProfile += '<input type="submit" style="border: 0px none ; background-color: rgb(236, 0, 140); color: rgb(236, 0, 140); width: 18px;" value="2" name="submitColor"/>';
         buildProfile += '</div>';
         buildProfile += '<div style="margin-right: 20px; float: left;">';
         buildProfile += '<input type="submit" style="border: 0px none ; background-color: rgb(126, 195, 74); color: rgb(126, 195, 74); width: 18px;" value="3" name="submitColor"/>';
         buildProfile += '</div>';
         buildProfile += '<div style="margin-right: 20px; float: left;">';
         buildProfile += '<input type="submit" style="border: 0px none ; background-color: rgb(108, 207, 246); color: rgb(108, 207, 246); width: 18px;" value="4" name="submitColor"/>';
         buildProfile += '</div>';
         buildProfile += '<div style="margin-right: 20px; float: left;">';
         buildProfile += '<input type="submit" style="border: 0px none ; background-color: rgb(179, 122, 181); color: rgb(179, 122, 181); width: 18px;" value="5" name="submitColor"/>';
         buildProfile += '</div>';
         buildProfile += '<div style="margin-right: 20px; float: left;">';
         buildProfile += '<input type="submit" style="border: 0px none ; background-color: rgb(237, 28, 36); color: rgb(237, 28, 36); width: 18px;" value="6" name="submitColor"/>';
         buildProfile += '</div>';
         buildProfile += '<div style="margin-right: 20px; float: left;">';
         buildProfile += '<input type="submit" style="border: 0px none ; background-color: rgb(255, 233, 79); color: rgb(255, 233, 79); width: 18px;" value="7" name="submitColor"/>';
         buildProfile += '</div>';
         
         
         var avatarImgSrc = "";
         var avatarImgSrc = document.getElementById('userPic').innerHTML;
         var avatarImgSplit = "";
         avatarImgSplit = avatarImgSrc.split('"');
      
                                     
         buildProfile += '</div><div style="clear: both; margin-top: 50px;"><div><h2 class="chooseColorTitle">Choose an avatar</h2></div><div><div style="float: left; width: 150px; margin-right: 10px; height: 75px;"><div><img src="'+avatarImgSplit[3]+'"  width="64" height="64" /></div></div><div style="margin-top: 3px;"><div><input type="file" value="" id="avatar_file" name="avatar_file"/></div><div><input type="hidden" value="hidden" name="avatar_file_hidden"/></div><div><span class="field-hint"><strong>Hints:</strong><br/> Image height and width must be between 128px to 300px<br/>';
         buildProfile += 'Square images make better avatars.<br/>Small image files are best for avatars, e.g. approx. 10K or smaller</span></div></div></div><div style="clear: both; margin-top: 55px; margin-bottom: 15px;"><input type="submit" class="submitButton" value="Save Changes" name="submit"/></div></div></div></form>';
  
         document.getElementById('postItems').innerHTML = buildProfile;
  } 
  
