﻿function HidePopup(PopUpDivID) {
    var div_Pop = document.getElementById(PopUpDivID);
    if (div_Pop.style.display == "block") {
        div_Pop.style.display = "none";
    } else {
        div_Pop.style.display = "block";
        div_Pop.focus();
    }
}

 
function PopUpBody() {
    var pWidth = 134;
    var pHeight = 130;
    var pTitle = "";
    var pContent = "";
    var XCord = 0;
    var YCord = 0;


    this.SetDivPosition = function SetDivPosition(x, y) {
        XCord = x;
        YCord = y;
    }
    this.SetDivHeader =   function SetDivHeader(title) {
        pTitle = title;
    }
    this.SetDivHeightWeight = function SetDivHeightWeight(x, y) {
        pWidth = x;
        pHeight = y;
    }
    this.SetDivSpacing = function SetDivSpacing(x, y) {
        pWidth = x + 40;
        pHeight = y + 30;
    }
    this.SetDivData = function SetDivData(content) {
        pContent = content;
    }
    this.ShowMyPopUp = function ShowMyPopUp(PopUpDivID) {
        return RenderPopUp(PopUpDivID);
    }
    var pImagePath = "../themes/default/images/CustomPopUp/";



    
    
    
    function RenderPopUp(PopUpDivID) 
    { 
        str = '<div style="width:' + pWidth + 'px; position:absolute;z-index:1023; top:' + YCord + '; left:' + XCord + ';">';
        str += '<div style="position:absolute; left:22px; top:13px; z-index:1;"><span style="color:#FFFFFF; font-family:Trebuchet MS;font-weight:bold">' + pTitle + '</span></div>';

        str += '<div id="CloseMe" onmousemove="document.getElementById(\'CloseMe\').style.backgroundColor = \'gray\';" onmouseout="document.getElementById(\'CloseMe\').style.backgroundColor = \'transparent\';" onclick="HidePopup(\'' + PopUpDivID + '\');"  style="position:absolute;cursor:hand;cursor:pointer;height:20px;width:20px; right:24px; top:12px; z-index:1;"><img  style="margin-top:5px;margin-left:5px;"  src="' + pImagePath + 'closePop.png" height="11" width="11"/></div>';
        str += '<div id="TopImageContainer">';
        str += '<div id="TopLeftImage" style="float:left; width:15px;"><img style=\'vertical-align:bottom;\' src="' + pImagePath + 'LeftTop.png" height="39" width="15" /></div>';
        str += '<div id="TopCenterImage" style="float:left; width:' + (pWidth - 40) + 'px;"><img  style=\'vertical-align:bottom\'  src="' + pImagePath + 'MidTop.png" height="39" width="' + (pWidth - 40) + '" /></div>';
        str += '<div id="TopRightImage" style="float:left; width:19px;"><img style=\'vertical-align:bottom\' src="' + pImagePath + 'RightTop.png" height="39" width="19" /></div>';
        str += '</div><div id="Middle_Div">';


        str += '<div id="LeftMiddleDiv" style="float:left; width:15px; height:' + (pHeight - 30) + 'px;"><img src="' + pImagePath + 'LeftMiddle.png" height="' + (pHeight - 30) + '" width="15" /></div>';
        str += '<div id="CenterMiddleDiv"  style="float:left; background-color:#cccccc; height:' + (pHeight - 30) + 'px; width:' + (pWidth - 40) + 'px;"><div style="padding-top:14px; padding-left:7px; padding-right:7px; z-index:1;">' + pContent + '</div></div>';
        str += '<div id="RightMiddleDiv" style="float:left; width:19px; height:' + (pHeight - 30) + 'px;"><img src="' + pImagePath + 'RightMiddle.png" height="' + (pHeight - 30) + '" width="19" /></div>';
        str += '</div><div id="BottomImages">';


        str += '<div style=" width:15px;float:left;"><img src="' + pImagePath + 'LeftBottom.png" height="32" width="15" /></div>';

        str += '<div style=" width:' + (pWidth - 40) + 'px;float:left;"><img src="' + pImagePath + 'MidBottom.png" height="32" width="' + (pWidth - 40) + '" /></div>';

        str += '<div style=" width:19px;float:left;"><img src="' + pImagePath + 'RightBottom.png"  width="19" height="32" /></div></div></div>';


        return str;  
    }
     
    
}

 
objPopMe = new PopUpBody();
function ShowPop(PopUpID, PopUpDivID) {
   
     

    document.getElementById(PopUpDivID).style.display = 'block';
  

    var PopUp_Content_Total='';

    
    switch (PopUpID) {
        
         
        case "RegdZipCode":

            objPopMe.SetDivPosition('805px', '330px');
            objPopMe.SetDivSpacing(290, 85);
            objPopMe.SetDivHeader("<font style='font-size:13px'>Postal Code</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "Providing your postal code allows JabberMonkey to display user activity on an interactive global map. For your privacy only.</p></div>";
            
            break;
        case "ExpressYourSelf":

            objPopMe.SetDivPosition('605px', '222px');
            objPopMe.SetDivSpacing(320, 125);
            objPopMe.SetDivHeader("<font style='font-size:13px'>Express yourself</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "Write a brief message on anything you wish to say; express how you feel, what you";
            PopUp_Content_Total += "are doing what you like etc. to your friends , family members , or professional";
            PopUp_Content_Total += "friends. These messages will be displayed in the feed of your friends, family members or professional profile pages.</p></div>";
            break;
        case "AllFriendList":
            objPopMe.SetDivPosition('615px', '232px');
            objPopMe.SetDivSpacing(390, 145);
            objPopMe.SetDivHeader("<font style='font-size:13px'>All Friend List</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "At JabberMonkey we understand that people behave differently with in different social groups.";
            PopUp_Content_Total+= " This is why we allow you to place your friends within three categories, Family, Friends and Professional.";
            PopUp_Content_Total+= " By placing your friends in categories you can limit who can view your albums, comments on albums, and Jab’s to your friends. Friends can only see albums, comments and jabs made available to the category they have been placed in.";
            PopUp_Content_Total += "</p></div>";
            break;
        case "AskQs":
            objPopMe.SetDivPosition('265px', '202px');
            objPopMe.SetDivSpacing(820, 535);
            objPopMe.SetDivHeader("<font style='font-size:13px'>Ask Questions</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "<ol>";
            PopUp_Content_Total += "<li>Type your question into the question text box. </li>";
            PopUp_Content_Total += "<ol type='a'><li>to upload media with your question follow the steps below. </ol>";
            PopUp_Content_Total += "<li>Type your answers into the provided fields. For more than two answer options click the +Add Answer button. </li>";
            PopUp_Content_Total += "<ol type='a'><li>wish to upload media with your answers follow the steps below. </ol>";
            PopUp_Content_Total += "<li> Select the type of media you want to accompany your question and answers, this can be pictures or video. </li>";
            PopUp_Content_Total += "<ol type='a'>";
            PopUp_Content_Total += "<li>Pictures";
            PopUp_Content_Total += "<ol type='i'>";
            PopUp_Content_Total += "<li> Search Web- enter in key words to locate pictures related to your  question.  When you have located a picture click on it to upload.</li>";
            PopUp_Content_Total += "<li>Upload media- click browse to search your hard drive and locate a picture that will accompany your question.  Double click the desired picture to select, click add to upload it.</li>";
            PopUp_Content_Total += "<li> Web URL- If you already know a picture you want to use from the web, locate it in another tab in your browser and copy and paste the URL into the text field then select add.</li>";
            PopUp_Content_Total += "</ol>";
            PopUp_Content_Total += "</li>";
            PopUp_Content_Total += "<li>Video";
            PopUp_Content_Total += "<ol type='i'>";
            PopUp_Content_Total += "<li> Search web- Enter keywords to locate a video related to your question.  Click on the image of a video to preview it; if you like it click attach, if not click return to the list.</ll>";
            PopUp_Content_Total += "<li>Upload video-click browse to search your hard drive and locate a video that will accompany your question.  Double click the desired video to select, then click add to upload it.</ll>";
            PopUp_Content_Total += "<li>Web Cam- Click the allow button to activate your web cam.  To begin recording your message click start recording, when you are finished click stop recording.  Your video will be uploaded on the left side of the page, to preview the video click preview below, if you don’t like the video click remove. </ll>";
            PopUp_Content_Total += "<li>Web URL- If you already know a video you want to use from the web, locate it in another tab in your  bowser and copy and paste the URL into the text field then select add.</ll>";
            PopUp_Content_Total += "</ol>";
            PopUp_Content_Total += "</li>";
            PopUp_Content_Total += "</ol>";
            PopUp_Content_Total += "<li>  You can also select commonly used answers from the provided list under Common Answers. </li>";
            PopUp_Content_Total += "<li> Select the appropriate category and sub category that your question best falls under. </li>";
            PopUp_Content_Total += "<li> Question duration allows you to select a start and end date for your question.  ";
            PopUp_Content_Total += "Example if you want a question to appear some time in the future you can select the desired";
            PopUp_Content_Total += " start date in the drop down boxes.  If you want voting on your question to end after a certain";
            PopUp_Content_Total += " period of time you can click the end date check box and select the question end date from the provided drop down boxes. </li>";
            PopUp_Content_Total += "</ol>";

            PopUp_Content_Total += "</p></div>";
            break;
       
    }
    //alert(objId);
    objPopMe.SetDivData(PopUp_Content_Total);

    document.getElementById(PopUpDivID).innerHTML = objPopMe.ShowMyPopUp(PopUpDivID);

    document.getElementById(PopUpDivID).style.display = "block";
    
}

function ShowPop2(PopUpID, PopUpDivID,object) {

    document.getElementById(PopUpDivID).style.display = 'block';
    var PopUp_Content_Total = '';

    var curLeft = parseInt(findPosX(object));
    var curTop = parseInt(findPosY(object));
    
    switch (PopUpID) {

        case "NSFW":
            objPopMe.SetDivPosition(curLeft-390+'px', curTop+'px');
            objPopMe.SetDivSpacing(390, 145);
            objPopMe.SetDivHeader("<font style='font-size:13px'>Not Safe For Work</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "By clicking this check box you are indicating that this question is sexually explicit";
            PopUp_Content_Total += "in nature or includes profanity. This content cannot be; illegal, inaccurate, hateful,";
            PopUp_Content_Total += "racist, offensive, vulgar, obscene, disgusting, indecent or objectionable, and must";
            PopUp_Content_Total += "conform to JabberMonkey’s <a target='_blank' href='../TermsOfService.aspx' class='txt_red'>";
            PopUp_Content_Total += "Terms of Use.</a> NSFW questions will not be visible by JabberMonkey members";
            PopUp_Content_Total += "under the age of 18.";
            PopUp_Content_Total += "</p></div>";

            break;
        case "FriendCategories":
            objPopMe.SetDivPosition(curLeft + 'px', curTop + 'px');
            objPopMe.SetDivSpacing(390, 145);
            objPopMe.SetDivHeader("<font style='font-size:13px'>Friend Categories</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "At JabberMonkey we understand that people behave differently with in different social groups.";
            PopUp_Content_Total += " This is why we allow you to place your friends within three categories, Family, Friends and Professional.";
            PopUp_Content_Total += " By placing your friends in categories you can limit who can view your albums, comments on albums, and Jab’s to your friends. Friends can only see albums, comments and jabs made available to the category they have been placed in.";
            PopUp_Content_Total += "</p></div>";
            break;
         
        case "InternalMessaging":
            objPopMe.SetDivPosition(curLeft + 'px', curTop + 'px');
            objPopMe.SetDivSpacing(290, 95);
            objPopMe.SetDivHeader("<font style='font-size:13px'>Internal Messaging</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "JM Mail is an internal messaging system that allows you to communicate with your friends inside jabbermonkey. ";
            PopUp_Content_Total += "</p></div>";
            break;
        case "PrivacySettings":
            objPopMe.SetDivPosition(curLeft  + 'px', curTop + 'px');
            objPopMe.SetDivSpacing(290, 85);
            objPopMe.SetDivHeader("<font style='font-size:13px'>My Privacy</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "Privacy settings allow you to limit who can see content on your profile. Profile";
            PopUp_Content_Total += "privacy settings can be set to public , friends only ,or friends of friends.</p></div>";

            break;
        case "MyAlbum":
            objPopMe.SetDivPosition(curLeft  + 'px', curTop + 'px');
            objPopMe.SetDivSpacing(380, 102);
            objPopMe.SetDivHeader("<font style='font-size:13px'>My Album</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "At JabberMonkey we understand that people behave differently with in different social";
            PopUp_Content_Total += "groups. This is why we allow you to place your friends within three categories Personal,";
            PopUp_Content_Total += "Family and Professional. By placing your friends in categories you can limit who can view your albums.</p></div>";
            
            break;

        case "Jab":
         objPopMe.SetDivPosition(curLeft  + 'px', curTop + 'px');
            objPopMe.SetDivSpacing(320, 92);
            objPopMe.SetDivHeader("<font style='font-size:13px'>Jab</font>");
            PopUp_Content_Total += "<div class='nml-text' style='text-align:left;'><p align='justify' style='font-family:Trebuchet MS;'>";
            PopUp_Content_Total += "You are able to write a brief message,anytime you are on a friends profile page in the “Jab” field.";
            PopUp_Content_Total += "Your “Jab” will then be displayed in the JM Feed of your friend,and any common friends.</p></div>";
            break;
                                                    

    }
    //alert(objId);
    objPopMe.SetDivData(PopUp_Content_Total);

    document.getElementById(PopUpDivID).innerHTML = objPopMe.ShowMyPopUp(PopUpDivID);

    document.getElementById(PopUpDivID).style.display = "block";

}
 



