WW SWOT TOOL

Launch: SWOT Analysis Generator

<!DOCTYPE html>
<html>
<head>
<title>SWOT Analysis Generator</title>
 
<!--
    SWOT Analysis Generator v1.8 (2011-10-09)
    HTML, CSS, JavaScript and JQuery code in this document is Copyright (c) Shane Smith, 2011. All Rights Reserved.
    Provided to WikiWealth.com with a perpetual license to use the program.
    Website: http://www.shane-smith.com
-->
 
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://jquery-wikidot-api.wdfiles.com/local--code/code:jquery-cookie"></script>
<script type="text/javascript" src="https://jquery-wikidot-api.wdfiles.com/local--code/code:jquery-wikidot-api"></script>
 
<script type="text/javascript">
var SITE = "wikiwealth";
var DATA = "wqNk0FjiJmdJeSiXuWMuXiDtPX47zLDO";
var SUB_TITLE;
var MAIN_TITLE;
var MAIN_PARENT = "swot";
var SUB_PAGE;
var MAIN_PAGE;
var DEST;
var ctr = 0;
var done = 0;
var timerId;
 
function checkFormDone()
{
    document.getElementById("progressAmt").innerHTML = done+" of "+ctr;
 
    if (done >= ctr) {
        // Clear the interval timer
        clearInterval( timerId );
        // Show that loading has finished
        document.getElementById("progressAmt").innerHTML = "FINISHED!";
        // Redirect to new page
        DEST = "http://"+SITE+".wikidot.com/"+MAIN_PAGE;
        window.top.location.href = DEST;
    }
}
 
function formSent()
{
    if (document.wwSWOT.title.value == "" || document.wwSWOT.title.value == null)
    {
        alert("Please provide a title for the SWOT analysis. For example, a company name.");
        return false;
    }
    else if ( (/^['-_\(\)!. a-z0-9]+$/i.test(document.wwSWOT.title.value)) == false )
    {
        alert("Please avoid using punctuation or other special characters in the title for the SWOT analysis.");
        return false;
    }
    else
    {
        // Convert first word in title to upper-case
        var tempTitle = document.wwSWOT.title.value;
        tempTitle = tempTitle.charAt(0).toUpperCase() + tempTitle.slice(1);
        document.wwSWOT.title.value = tempTitle;
 
        //submit-button-section
        document.getElementById("submit-button-section").style.display = "none";
        //spin-loader
        document.getElementById("spin-loader").style.display = "block";
 
        // Get counter of all checkboxes
        var s = document.wwSWOT.strength;
        var w = document.wwSWOT.weakness;
        var o = document.wwSWOT.opportunity;
        var t = document.wwSWOT.threat;
        // Determine how many are checked
        ctr = 0;
        for (var i=0; i<s.length; i++) { if (s[i].checked==true) { ctr++; } }
        for (var i=0; i<w.length; i++) { if (w[i].checked==true) { ctr++; } }
        for (var i=0; i<o.length; i++) { if (o[i].checked==true) { ctr++; } }
        for (var i=0; i<t.length; i++) { if (t[i].checked==true) { ctr++; } }
        // Get array of custom entries (split by comma)
        var cStemp = trim(document.wwSWOT.strength_ta.value);
        var cWtemp = trim(document.wwSWOT.weakness_ta.value);
        var cOtemp = trim(document.wwSWOT.opportunity_ta.value);
        var cTtemp = trim(document.wwSWOT.threat_ta.value);
        var customStrength = cStemp.split(",");
        var customWeakness = cWtemp.split(",");
        var customOpportunity = cOtemp.split(",");
        var customThreat = cTtemp.split(",");
        // Increase the counter
        for (var i=0; i<customStrength.length; i++) { if (customStrength[i] != 'null' && customStrength[i] != "" && (/^[ a-z0-9]+$/i.test(customStrength[i])) ) { ctr++; } }
        for (var i=0; i<customWeakness.length; i++) { if (customWeakness[i] != 'null' && customWeakness[i] != "" && (/^[ a-z0-9]+$/i.test(customWeakness[i])) ) { ctr++; } }
        for (var i=0; i<customOpportunity.length; i++) { if (customOpportunity[i] != 'null' && customOpportunity[i] != "" && (/^[ a-z0-9]+$/i.test(customOpportunity[i])) ) { ctr++; } }
        for (var i=0; i<customThreat.length; i++) { if (customThreat[i] != 'null' && customThreat[i] != "" && (/^[ a-z0-9]+$/i.test(customThreat[i])) ) { ctr++; } }
        // Initialise the # that have been done to zero
        done = 0;
        try
        {
            api = $.wikidot('WikiWealth SWOT Analysis Tool', DATA);
 
            SUB_TITLE = document.wwSWOT.title.value;
            MAIN_TITLE = document.wwSWOT.title.value + " SWOT Analysis";
            MAIN_PAGE = "swot-analysis:" + document.wwSWOT.title.value;
 
            var content = getContentString();
 
            var tagArr = new Array();
            tagArr.push("_user-generated");
 
            api.pages.save_one({'site': SITE, 'page': MAIN_PAGE, 'title': MAIN_TITLE, 'tags': tagArr, 'save_mode': 'create', 'parent_fullname': MAIN_PARENT, 'revision_comment': 'Page created by SWOT Analysis Tool', 'notify_watchers': 'true'}, function(data)
                {
                    if (data)
                    {
                        var pageUnixName = data.fullname.split(":")[1];
                        SUB_PAGE = pageUnixName;
 
                        var oldTags = data.tags;
                        oldTags.push( pageUnixName );
 
                        // Then: Add Content
                        var content = getContentString();
                        api.pages.save_one({'site': SITE, 'page': "swot-analysis:"+SUB_PAGE, 'content': content, 'tags': oldTags, 'save_mode': 'update', 'revision_comment': 'SWOT Analysis Tool... Adding content.', 'notify_watchers': 'false'}, function(data)
                            {
                                if (data)
                                {
                                    // Set up timer
                                    timerId = setInterval ( "checkFormDone()", 500 );
                                }
                                else
                                {
                                    alert("The Five Forces generator could not complete the entire task. Please try again with a different name, and contact the administrator if the problem continues.");
 
                                    //submit-button-section
                                    document.getElementById("submit-button-section").style.display = "block";
                                    //spin-loader
                                    document.getElementById("spin-loader").style.display = "none";
                                }
                            }
                        );
 
                        try
                        {
                            // Strengths
                            var swotTitle = document.wwSWOT.title.value;
                            for (var i=0; i<document.wwSWOT.strength.length; i++)
                            {
                                if (document.wwSWOT.strength[i].checked == true)
                                {
                                    var currentStr = document.wwSWOT.strength[i].value;
                                    var pgname = "swot-strength:"+pageUnixName+":"+currentStr;
                                    var pgtags = new Array();
                                    pgtags.push( pageUnixName );
                                    var content = "";
                                    if (currentStr != 'null' && currentStr == "Brand Name") { content = "A strong brand name is a major strength of **"+swotTitle+"**. This gives **"+swotTitle+"** the ability to charge higher prices for their products because consumers place additional value in the brand…"; }
                                    else if (currentStr != 'null' && currentStr == "Customer Loyalty") { content = "When given a choice, customers are loyal to **"+swotTitle+"**. Instead of targeting all customers, **"+swotTitle+"** only needs to target new customers in order to grow their business…"; }
                                    else if (currentStr != 'null' && currentStr == "Technology") { content = "Superior technology allows **"+swotTitle+"** to better meet the needs of their customers in ways that competitors can’t imitate…"; }
                                    else if (currentStr != 'null' && currentStr == "Unique Products") { content = "Unique products help distinguish **"+swotTitle+"** from competitors. **"+swotTitle+"** can charge higher prices for their products, because consumers can’t get those products elsewhere…"; }
                                    else if (currentStr != 'null' && currentStr == "Cost Advantages") { content = "Lower costs lead to higher profits for **"+swotTitle+"**. A low cost leader can undercut rivals on price…"; }
                                    else if (currentStr != 'null' && currentStr == "Economies of Scale") { content = "Economies of scale is the cost advantages that **"+swotTitle+"** obtains due to size. The greater the volume, the greater the advantages…"; }
                                    else if (currentStr != 'null' && currentStr == "Size Advantages") { content = "Size advantages lower **"+swotTitle+"**’s risks. The larger **"+swotTitle+"** gets, the more resources they have to pursue new markets and defend themselves against rivals…"; }
                                    else if (currentStr != 'null' && currentStr == "Supply Chain") { content = "A strong supply chain helps **"+swotTitle+"** obtain the right resources from suppliers and delivery the right product to customers in a timely manner…"; }
                                    else if (currentStr != 'null' && currentStr == "Asset Leverage") { content = "Asset leverage allows **"+swotTitle+"** to use their best operational assets to expand their business and improve their market share…"; }
                                    else if (currentStr != 'null' && currentStr == "Financial Leverage") { content = "Financial leverage allows **"+swotTitle+"** to use their balance sheet to expand their business and increase their profits…"; }
                                    else if (currentStr != 'null' && currentStr == "Innovative Culture") { content = "An innovative culture helps **"+swotTitle+"** to produce unique products and services that meet their customer’s needs…"; }
                                    else if (currentStr != 'null' && currentStr == "Pricing Power") { content = "Customers typically rebel against price increases by switching to competing products, but if a company has pricing power, customers will continue using **"+swotTitle+"**’s products and services. **"+swotTitle+"** has the ability to charge customers higher prices…"; }
                                    else if (currentStr != 'null' && currentStr == "Real Estate") { content = "Having the right real estate is essential to **"+swotTitle+"**. Location matters, because it helps consumers to utilize **"+swotTitle+"**’s offerings…"; }
                                    else if (currentStr != 'null' && currentStr == "Strong Management") { content = "Strong management can help **"+swotTitle+"** reach its potential by utilizing strengths and eliminating weaknesses…"; }
                                    api.pages.save_one({'site': SITE, 'page': pgname, 'title': currentStr+" ("+SUB_TITLE+")", 'content': content, 'tags': pgtags, 'parent_fullname': MAIN_PAGE, 'revision_comment': 'Strength created by SWOT Analysis Tool'}, function(data)
                                        {
                                            if (data != null) { done++; }
                                            else { alert("Set failed: "+data.fullname); }
                                        }
                                    );
                                }
                            }
                            // customStrength
                            for (var i=0; i<customStrength.length; i++)
                            {
                                if (customStrength[i] != 'null' && customStrength[i] != "" && (/^[ a-z0-9]+$/i.test(customStrength[i])) )
                                {
                                    var pgname = "swot-strength:"+pageUnixName+":"+customStrength[i];
                                    var pgtags = new Array();
                                    pgtags[0] = pageUnixName;
                                    var content = "Please edit this page to add a description…";
                                    api.pages.save_one({'site': SITE, 'page': pgname, 'title': customStrength[i]+" ("+SUB_TITLE+")", 'content': content, 'tags': pgtags, 'parent_fullname': MAIN_PAGE, 'revision_comment': 'Strength created by SWOT Analysis Tool'}, function(data)
                                        {
                                            if (data != null) { done++; }
                                            else { alert("Set failed: "+data.fullname); }
                                        }
                                    );
                                }
                            }
                        }
                        catch (err)
                        {
                            var text = "An error occurred whilst attempting to\n";
                            text += "link the SWOT Strengths:\n\n";
                            text += err.message;
                            alert(text);
                        }
 
                        try
                        {
                            // Weaknesses
                            var swotTitle = document.wwSWOT.title.value;
                            for (var i=0; i<document.wwSWOT.weakness.length; i++)
                            {
                                if (document.wwSWOT.weakness[i].checked == true)
                                {
                                    var currentWeak = document.wwSWOT.weakness[i].value;
                                    var pgname = "swot-weakness:"+pageUnixName+":"+currentWeak;
                                    var pgtags = new Array();
                                    pgtags.push( pageUnixName );
                                    var content = "";
                                    if (currentWeak != 'null' && currentWeak == "Weak Brand") { content = "A weak brand means **"+swotTitle+"** can’t charge the same prices for goods and services as their competitors, because consumers don’t value the brand…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Cost Structure") { content = "A weak cost structure means **"+swotTitle+"**’s costs are high in comparison to their competitors…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Lack of Scale") { content = "A lack of scale means **"+swotTitle+"**’s cost per unit of output is very high. Increasing volume, while maintain quality, would help reduce those costs…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Customer Service") { content = "Weak customer service hurts **"+swotTitle+"**’s reputation and causes customers to flee to competitors, who are more respondent…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Weak Management") { content = "Weak management increases business risks and reduces profits for **"+swotTitle+"**, because they are responsible for the health of the business…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Bad Acquisitions") { content = "Bad acquisition can hurt **"+swotTitle+"** by increasing their costs and reducing the value of their combined businesses. Acquisitions can also distract from the core business and merge cultures that don’t complement each other…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Tarnished Reputation") { content = "A tarnished reputation can hurt **"+swotTitle+"**’s brand in the eyes of a consumer…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Weak Supply Chain") { content = "A weak supply chain can delay the arrival of products to **"+swotTitle+"**’s customers. Unnecessary delays can hurt **"+swotTitle+"** over the long run, because customers will cancel orders…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Weak R&D") { content = "Weak R&D can slow **"+swotTitle+"**’s growth as competitors out-innovate **"+swotTitle+"**…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Online Presence") { content = "The online market is essential for displaying information and selling products. A weak online presence can result in lost opportunities for **"+swotTitle+"**…"; }
                                    else if (currentWeak != 'null' && currentWeak == "High Staff Turnover") { content = "High staff turnover can hurt **"+swotTitle+"**’s ability to compete, because replacing valuable staff is expenses…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Outdated Technology") { content = "A lack of proprietary technology and patents can hurt **"+swotTitle+"**’s ability to compete against rivals…"; }
                                    else if (currentWeak != 'null' && currentWeak == "High Debt Burden") { content = "A high debt burden increases the risk that **"+swotTitle+"** goes bankrupt if they make a poor business decision. Increasing risks can increase **"+swotTitle+"**’s debt interest payments…"; }
                                    else if (currentWeak != 'null' && currentWeak == "Work Inefficiencies") { content = "An inefficient work environment means that **"+swotTitle+"**’s goods and services are not being utilized properly…"; }
                                    api.pages.save_one({'site': SITE, 'page': pgname, 'title': currentWeak+" ("+SUB_TITLE+")", 'content': content, 'tags': pgtags, 'parent_fullname': MAIN_PAGE, 'revision_comment': 'Weakness created by SWOT Analysis Tool'}, function(data)
                                        {
                                            if (data != null) { done++; }
                                            else { alert("Set failed: "+data.fullname); }
                                        }
                                    );
                                }
                            }
                            // customWeakness
                            for (var i=0; i<customWeakness.length; i++)
                            {
                                if (customWeakness[i] != 'null' && customWeakness[i] != "" && (/^[ a-z0-9]+$/i.test(customWeakness[i])) )
                                {
                                    var pgname = "swot-weakness:"+pageUnixName+":"+customWeakness[i];
                                    var pgtags = new Array();
                                    pgtags[0] = pageUnixName;
                                    var content = "Please edit this page to add a description…";
                                    api.pages.save_one({'site': SITE, 'page': pgname, 'title': customWeakness[i]+" ("+SUB_TITLE+")", 'content': content, 'tags': pgtags, 'parent_fullname': MAIN_PAGE, 'revision_comment': 'Weakness created by SWOT Analysis Tool'}, function(data)
                                        {
                                            if (data != null) { done++; }
                                            else { alert("Set failed: "+data.fullname); }
                                        }
                                    );
                                }
                            }
                        }
                        catch (err)
                        {
                            var text = "An error occurred whilst attempting to\n";
                            text += "link the SWOT Weaknesses:\n\n";
                            text += err.message;
                            alert(text);
                        }
 
                        try
                        {
                            // Opportunities
                            var swotTitle = document.wwSWOT.title.value;
                            for (var i=0; i<document.wwSWOT.opportunity.length; i++)
                            {
                                if (document.wwSWOT.opportunity[i].checked == true)
                                {
                                    var currentOpp = document.wwSWOT.opportunity[i].value;
                                    var pgname = "swot-opportunity:"+pageUnixName+":"+currentOpp;
                                    var pgtags = new Array();
                                    pgtags.push( pageUnixName );
                                    var content = "";
                                    if (currentOpp != 'null' && currentOpp == "International Expansion") { content = "International markets offer **"+swotTitle+"** new opportunities to expand the business and increase sales…"; }
                                    else if (currentOpp != 'null' && currentOpp == "New Markets") { content = "New markets allow **"+swotTitle+"** to expand their business and diversify their portfolio of products and services…"; }
                                    else if (currentOpp != 'null' && currentOpp == "New Products") { content = "New products can help **"+swotTitle+"** to expand their business and diversity their customer base…"; }
                                    else if (currentOpp != 'null' && currentOpp == "Emerging Markets") { content = "Emerging markets are fast growing regions of the world that enable **"+swotTitle+"** to quickly expand…"; }
                                    else if (currentOpp != 'null' && currentOpp == "Loosening Regulations") { content = "Looser regulations allow **"+swotTitle+"** to perform in a way that is most advantages for them and their customers…"; }
                                    else if (currentOpp != 'null' && currentOpp == "New Technology") { content = "New technology helps **"+swotTitle+"** to better meet their customer’s needs with new and improved products and services. Technology also builds competitive barriers against rivals…"; }
                                    else if (currentOpp != 'null' && currentOpp == "New Services") { content = "New services help **"+swotTitle+"** to better meet their customer’s needs. These services can expand **"+swotTitle+"**’s business and diversify their customer base…"; }
                                    else if (currentOpp != 'null' && currentOpp == "Innovation") { content = "Greater innovation can help **"+swotTitle+"** to produce unique products and services that meet customer’s needs…"; }
                                    else if (currentOpp != 'null' && currentOpp == "Online Market") { content = "The online market offers **"+swotTitle+"** the ability to greatly expand their business. **"+swotTitle+"** can market to a much wider audience for relatively little expense…"; }
                                    else if (currentOpp != 'null' && currentOpp == "Acquisition Synergies") { content = "Acquisitions can quickly expand a business without taking on the risks associated with business startups…"; }
                                    else if (currentOpp != 'null' && currentOpp == "Financial Leverage") { content = "Leveraging the balance sheet allows **"+swotTitle+"** to quickly expand into other markets and products, especially in fragmented industries…"; }
                                    else if (currentOpp != 'null' && currentOpp == "Fragmented Market") { content = "Fragmented markets provide many opportunities for **"+swotTitle+"** to expand and increase market share. Fragmented markets have many small competitive who lack the cost advantages of larger companies…"; }
                                    api.pages.save_one({'site': SITE, 'page': pgname, 'title': currentOpp+" ("+SUB_TITLE+")", 'content': content, 'tags': pgtags, 'parent_fullname': MAIN_PAGE, 'revision_comment': 'Opportunity created by SWOT Analysis Tool'}, function(data)
                                        {
                                            if (data != null) { done++; }
                                            else { alert("Set failed: "+data.fullname); }
                                        }
                                    );
                                }
                            }
                            // customOpportunity
                            for (var i=0; i<customOpportunity.length; i++)
                            {
                                if (customOpportunity[i] != 'null' && customOpportunity[i] != "" && (/^[ a-z0-9]+$/i.test(customOpportunity[i])) )
                                {
                                    var pgname = "swot-opportunity:"+pageUnixName+":"+customOpportunity[i];
                                    var pgtags = new Array();
                                    pgtags[0] = pageUnixName;
                                    var content = "Please edit this page to add a description…";
                                    api.pages.save_one({'site': SITE, 'page': pgname, 'title': customOpportunity[i]+" ("+SUB_TITLE+")", 'content': content, 'tags': pgtags, 'parent_fullname': MAIN_PAGE, 'revision_comment': 'Opportunity created by SWOT Analysis Tool'}, function(data)
                                        {
                                            if (data != null) { done++; }
                                            else { alert("Set failed: "+data.fullname); }
                                        }
                                    );
                                }
                            }
                        }
                        catch (err)
                        {
                            var text = "An error occurred whilst attempting to\n";
                            text += "link the SWOT Opportunities:\n\n";
                            text += err.message;
                            alert(text);
                        }
 
                        try
                        {
                            // Threats
                            var swotTitle = document.wwSWOT.title.value;
                            for (var i=0; i<document.wwSWOT.threat.length; i++)
                            {
                                if (document.wwSWOT.threat[i].checked == true)
                                {
                                    var currentThr = document.wwSWOT.threat[i].value;
                                    var pgname = "swot-threat:"+pageUnixName+":"+currentThr;
                                    var pgtags = new Array();
                                    pgtags.push( pageUnixName );
                                    var content = "";
                                    if (currentThr != 'null' && currentThr == "Substitute Products") { content = "The availability of substitute products hurts **"+swotTitle+"**’s ability to raise prices, because customers can easily switch to another product or service…"; }
                                    else if (currentThr != 'null' && currentThr == "Volatile Revenue") { content = "Volatile revenue makes planning difficult, which could delay key investments in **"+swotTitle+"**’s business…"; }
                                    else if (currentThr != 'null' && currentThr == "Volatile Costs") { content = "Volatile costs mean **"+swotTitle+"** has to plan for scenarios where costs skyrocket. Cautious planning leads to development delays that can negatively affect **"+swotTitle+"**…"; }
                                    else if (currentThr != 'null' && currentThr == "Political Risk") { content = "Politics can increase **"+swotTitle+"**’s risk factors, because governments can quickly change business rules that negatively affect **"+swotTitle+"**’s business…"; }
                                    else if (currentThr != 'null' && currentThr == "Change in Tastes") { content = "Consumers can change their tastes very quickly. **"+swotTitle+"** depends on knowing which goods and services consumers want…"; }
                                    else if (currentThr != 'null' && currentThr == "Govt Regulations") { content = "Changes to government rules and regulations can negatively affect **"+swotTitle+"**…"; }
                                    else if (currentThr != 'null' && currentThr == "Intense Competition") { content = "Intense completion can lower **"+swotTitle+"**’s profits, because competitors can entice consumers away with superior products..."; }
                                    else if (currentThr != 'null' && currentThr == "Mature Markets") { content = "Mature markets are competitive. In order for **"+swotTitle+"** to grow in a mature market, it has to increase market share, which is difficult and expensive…"; }
                                    else if (currentThr != 'null' && currentThr == "Intl Competition") { content = "International competitors are numerous and difficult to combat, because they can have many competitive advantages that give them an advantage over **"+swotTitle+"**…"; }
                                    else if (currentThr != 'null' && currentThr == "Volatile Currencies") { content = "Volatile currencies make **"+swotTitle+"**’s investments difficult, because costs and revenues change so rapidly…"; }
                                    else if (currentThr != 'null' && currentThr == "Bad Economy") { content = "A bad economy can hurt **"+swotTitle+"**’s business by decreasing the number of potential customers…"; }
                                    api.pages.save_one({'site': SITE, 'page': pgname, 'title': currentThr+" ("+SUB_TITLE+")", 'content': content, 'tags': pgtags, 'parent_fullname': MAIN_PAGE, 'revision_comment': 'Threat created by SWOT Analysis Tool'}, function(data)
                                        {
                                            if (data != null) { done++; }
                                            else { alert("Set failed: "+data.fullname); }
                                        }
                                    );
                                }
                            }
                            // customThreat
                            for (var i=0; i<customThreat.length; i++)
                            {
                                if (customThreat[i] != 'null' && customThreat[i] != "" && (/^[ a-z0-9]+$/i.test(customThreat[i])) )
                                {
                                    var pgname = "swot-threat:"+pageUnixName+":"+customThreat[i];
                                    var pgtags = new Array();
                                    pgtags[0] = pageUnixName;
                                    var content = "Please edit this page to add a description…";
                                    api.pages.save_one({'site': SITE, 'page': pgname, 'title': customThreat[i]+" ("+SUB_TITLE+")", 'content': content, 'tags': pgtags, 'parent_fullname': MAIN_PAGE, 'revision_comment': 'Threat created by SWOT Analysis Tool'}, function(data)
                                        {
                                            if (data != null) { done++; }
                                            else { alert("Set failed: "+data.fullname); }
                                        }
                                    );
                                }
                            }
                        }
                        catch (err)
                        {
                            var text = "An error occurred whilst attempting to\n";
                            text += "link the SWOT Threats:\n\n";
                            text += err.message;
                            alert(text);
                        }
 
                    }
                    else
                    {
                        alert("There was a problem when attempting to generate your SWOT analysis. This may be because a SWOT already exists for the company or product named \""+SUB_TITLE+"\".");
 
                        //submit-button-section
                        document.getElementById("submit-button-section").style.display = "block";
                        //spin-loader
                        document.getElementById("spin-loader").style.display = "none";
                    }
                }
            );
        }
        catch (err)
        {
            var text = "An error occurred whilst attempting to\n";
            text += "read the contents of the form:\n\n";
            text += err.message;
            alert(text);
            return false;
        }
    }
 
    // Return false to the form
    return false;
}
function redirect()
{
    window.top.location.href = DEST;
}
function trim(s)
{
    // remove multiple, leading or trailing spaces
    // Source: http://www.qodo.co.uk/blog/javascript-trim-leading-and-trailing-spaces
    s = s.replace(/(^\s*)|(\s*$)/gi,"");
    s = s.replace(/[ ]{2,}/gi," ");
    s = s.replace(/\n /,"\n");
    // remove spaces around commas (written by Shane Smith)
    s = s.replace(/ ,/,",");
    s = s.replace(/, /,",");
    return s;
}
function getContentString()
{
    var content = "";
    content += "[[table style=\"width: 100%; min-width: 850px\"]]\n"
        +"[[row]] [[cell style=\"width: 48%; vertical-align:top; border:1px solid #cedff2; background:#f5faff; padding: 5px 5px 5px 5px;\"]]\n"
        +"[!-- ---------------------------Strength------------------------------- --]\n"
        +"[[div style=\"border:1px solid #a3b0bf; background:#cedff2; padding: 0 0 0 2px;\"]]\n"
        +"++* "+SUB_TITLE+" Strengths\n"
        +"[[/div]]\n"
        +"[!-- ------------------------------Middle Part ------------------------------- --]\n"
        +"[[div style=\"margin: 10px 0px 10px 0px; max-height: 250px; overflow: auto;\"]]\n"
        +"[[module ListPages order=\"rating desc\" category=\"swot-strength\" separate=\"false\" tags=\""+SUB_PAGE+"\" perPage=\"100\"]]\n"
        +"[[div class=\"row\" style=\"padding: 2px 2px;\"]]\n"
        +"[[div style=\"text-align: justify;\"]]\n"
        +"[[div style=\"width: 70px; float: left; margin-top: 0px;\"]]\n"
        +"[[div class=\"button\" style=\"width: 60px; border: 1px solid #CCC; -moz-border-radius: 7px 7px 7px / 7px 7px; border-radius: 7px 7px 7px / 7px 7px; margin: 0px auto; text-align: center; padding: 0px; float: left;\"]]\n"
        +"**%%rating%%** votes\n"
        +"[[/div]] [[/div]] [[/div]]\n"
        +"\n"
        +"%%title_linked%%\n"
        +"[[/div]]\n"
        +"[[/module]]\n"
        +"[[/div]]\n"
        +"[[div style=\"float:left\"]]\n"
        +"[[module NewPage mode=\"save-and-refresh\" category=\"swot-strength:"+SUB_PAGE+"\" tags=\""+SUB_PAGE+"\" size=\"45\" parent=\"swot-analysis:"+SUB_PAGE+"\" button=\"Add\"]]\n"
        +"[[/div]]\n"
        +"[[/cell]]\n"
        +"[[cell style=\"width: 0.5%;\"]]\n"
        +"[[/cell]]\n"
        +"[[cell style=\"width: 48%; vertical-align:top; border:1px solid #ddcef2; background:#faf5ff; padding: 5px 5px 5px 5px;\"]]\n"
        +"[!-- ----------------------------Weakness----------------------------- --]\n"
        +"[[div style=\"border:1px solid #afa3bf; background:#ddcef2; padding: 0 0 0 2px;\"]]\n"
        +"++* "+SUB_TITLE+" Weaknesses\n"
        +"[[/div]]\n"
        +"[!-- ------------------------------Middle Part ------------------------------- --]\n"
        +"[[div style=\"margin: 10px 0px 10px 0px; max-height: 250px; overflow: auto;\"]]\n"
        +"[[module ListPages order=\"rating desc\" category=\"swot-weakness\" separate=\"false\" tags=\""+SUB_PAGE+"\" perPage=\"100\"]]\n"
        +"[[div class=\"row\" style=\"padding: 2px 2px;\"]]\n"
        +"[[div style=\"text-align: justify;\"]]\n"
        +"[[div style=\"width: 70px; float: left; margin-top: 0px;\"]]\n"
        +"[[div class=\"button\" style=\"width: 60px; border: 1px solid #CCC; -moz-border-radius: 7px 7px 7px / 7px 7px; border-radius: 7px 7px 7px / 7px 7px; margin: 0px auto; text-align: center; padding: 0px; float: left;\"]]\n"
        +"**%%rating%%** votes\n"
        +"[[/div]] [[/div]] [[/div]]\n"
        +"\n"
        +"%%title_linked%%\n"
        +"[[/div]]\n"
        +"[[/module]]\n"
        +"[[/div]]\n"
        +"[[div style=\"float:left\"]]\n"
        +"[[module NewPage mode=\"save-and-refresh\" category=\"swot-weakness:"+SUB_PAGE+"\" tags=\""+SUB_PAGE+"\" size=\"45\" parent=\"swot-analysis:"+SUB_PAGE+"\" button=\"Add\" ]]\n"
        +"[[/div]]\n"
        +"[[/cell]] [[/row]]\n"
        +"[[row]] [[cell style=\"height: 10px;\"]]\n"
        +"[[/cell]] [[/row]]\n"
        +"[[row]] [[cell style=\"width: 48%; vertical-align:top; border:1px solid #cef2e0; background:#f5fffa; padding: 5px 5px 5px 5px;\"]]\n"
        +"[!-- ----------------------------Opportunity---------------------------- --]\n"
        +"[[div style=\"border:1px solid #a3bfb1; background:#cef2e0; padding: 0 0 0 2px;\"]]\n"
        +"++* "+SUB_TITLE+" Opportunities\n"
        +"[[/div]]\n"
        +"[!-- ------------------------------Middle Part ------------------------------- --]\n"
        +"[[div style=\"margin: 10px 0px 10px 0px; max-height: 250px; overflow: auto;\"]]\n"
        +"[[module ListPages order=\"rating desc\" category=\"swot-opportunity\" separate=\"false\" tags=\""+SUB_PAGE+"\" perPage=\"100\"]]\n"
        +"[[div class=\"row\" style=\"padding: 2px 2px;\"]]\n"
        +"[[div style=\"text-align: justify;\"]]\n"
        +"[[div style=\"width: 70px; float: left; margin-top: 0px;\"]]\n"
        +"[[div class=\"button\" style=\"width: 60px; border: 1px solid #CCC; -moz-border-radius: 7px 7px 7px / 7px 7px; border-radius: 7px 7px 7px / 7px 7px; margin: 0px auto; text-align: center; padding: 0px; float: left;\"]]\n"
        +"**%%rating%%** votes\n"
        +"[[/div]] [[/div]] [[/div]]\n"
        +"\n"
        +"%%title_linked%%\n"
        +"[[/div]]\n"
        +"[[/module]]\n"
        +"[[/div]]\n"
        +"[[div style=\"float:left\"]]\n"
        +"[[module NewPage mode=\"save-and-refresh\" category=\"swot-opportunity:"+SUB_PAGE+"\" tags=\""+SUB_PAGE+"\" size=\"45\" parent=\"swot-analysis:"+SUB_PAGE+"\" button=\"Add\"]]\n"
        +"[[/div]]\n"
        +"[[/cell]]\n"
        +"[[cell style=\"width: 0.5%;\"]]\n"
        +"[[/cell]]\n"
        +"[[cell style=\"width: 48%; vertical-align:top; border:1px solid #FFBFBF; background:#FFDFDF; padding: 5px 5px 5px 5px;\"]]\n"
        +"[!-- ------------------------------Threats------------------------------- --]\n"
        +"[[div style=\"border:1px solid #FF8888; background:#FFBBBB; padding: 0 0 0 2px;\"]]\n"
        +"++* "+SUB_TITLE+" Threats\n"
        +"[[/div]]\n"
        +"[!-- ------------------------------Middle Part ------------------------------- --]\n"
        +"[[div style=\"margin: 10px 0px 10px 0px; max-height: 250px; overflow: auto;\"]]\n"
        +"[[module ListPages order=\"rating desc\" category=\"swot-threat\" separate=\"false\" tags=\""+SUB_PAGE+"\" perPage=\"100\"]]\n"
        +"[[div class=\"row\" style=\"padding: 2px 2px;\"]]\n"
        +"[[div style=\"text-align: justify;\"]]\n"
        +"[[div style=\"width: 70px; float: left; margin-top: 0px;\"]]\n"
        +"[[div class=\"button\" style=\"width: 60px; border: 1px solid #CCC; -moz-border-radius: 7px 7px 7px / 7px 7px; border-radius: 7px 7px 7px / 7px 7px; margin: 0px auto; text-align: center; padding: 0px; float: left;\"]]\n"
        +"**%%rating%%** votes\n"
        +"[[/div]] [[/div]] [[/div]] \n"
        +"\n"
        +"%%title_linked%%\n"
        +"[[/div]]\n"
        +"[[/module]]\n"
        +"[[/div]]\n"
        +"[[div style=\"float:left\"]]\n"
        +"[[module NewPage mode=\"save-and-refresh\" category=\"swot-threat:"+SUB_PAGE+"\" tags=\""+SUB_PAGE+"\" size=\"45\" parent=\"swot-analysis:"+SUB_PAGE+"\" button=\"Add\"]]\n"
        +"[[/div]]\n"
        +"[[/cell]] [[/row]] [[/table]]\n"
        +"[[module css]]\n"
        +".button p{margin:0px}\n"
        +".row p{margin:0px}\n"
        +"[[/module]]\n";
 
    return content;
}
</script>
 
<style type="text/css" id="internal-style">
th {
    width: 300px;
    text-align: center;
}
td textarea {
    width: 200px;
    height: 100px; /*250px;*/
}
.company-product-name {
    text-align: center;
    font-family: Verdana, Arial, Serif;
    font-size: 1em;
}
.company-product-name input {
    width: 200px;
    font-family: Verdana, Arial, Serif;
    font-size: 1em;
}
#submit-button-section {
    text-align: center;
    display: block;
}
.submit-button {
    font-family: Verdana, Arial, Serif;
    font-size: 1.5em;
    padding-left: 2px;
    padding-right: 2px;
}
#spin-loader {
    font-weight: bold;
    text-align: center;
    display: none;
}
.custom-ta {
    width:90%;
    max-width:90%;
    height:1.5em;
    max-height:1.5em;
}
</style>
 
</head>
<body>
 
<form name="wwSWOT" action="" method="get">
    <p>
        <table style="width:100%;">
        <tr>
            <td colspan="5" class="company-product-name">
                Name: <input type="text" name="title" style="text-align:right;" /><span style="color:#929292;"> SWOT Analysis</span><br />
                <!--You can add more Strengths, Weaknesses, Opportunities and Threats once you have submitted the form.-->
            </td>
        </tr>
        <tr>
            <th colspan="2" style="width:47%;"><h3>Strengths (helpful & internal)</h3></th>
            <th style="width:6%;"></th>
            <th colspan="2" style="width:47%;"><h3>Weaknesses (harmful & internal)</h3></th>
        </tr>
        <tr>
            <td>
                <!-- STRENGTHS -->
                <input type="checkbox" id="str1" name="strength" value="Brand Name" /> <label for="str1">Brand Name</label><br />
                <input type="checkbox" id="str2" name="strength" value="Customer Loyalty" />  <label for="str2">Customer Loyalty</label><br />
                <input type="checkbox" id="str3" name="strength" value="Technology" />  <label for="str3">Technology</label><br />
                <input type="checkbox" id="str4" name="strength" value="Unique Products" />  <label for="str4">Unique Products</label><br />
                <input type="checkbox" id="str5" name="strength" value="Cost Advantages" />  <label for="str5">Cost Advantages</label><br />
                <input type="checkbox" id="str6" name="strength" value="Economies of Scale" />  <label for="str6">Economies of Scale</label><br />
                <input type="checkbox" id="str7" name="strength" value="Size Advantages" />  <label for="str7">Size Advantages</label><br />
            </td>
            <td>
                <input type="checkbox" id="str8" name="strength" value="Supply Chain" />  <label for="str8">Supply Chain</label><br />
                <input type="checkbox" id="str9" name="strength" value="Asset Leverage" />  <label for="str9">Asset Leverage</label><br />
                <input type="checkbox" id="str10" name="strength" value="Financial Leverage" />  <label for="str10">Financial Leverage</label><br />
                <input type="checkbox" id="str11" name="strength" value="Innovative Culture" />  <label for="str11">Innovative Culture</label><br />
                <input type="checkbox" id="str12" name="strength" value="Pricing Power" />  <label for="str12">Pricing Power</label><br />
                <input type="checkbox" id="str13" name="strength" value="Real Estate" />  <label for="str13">Real Estate</label><br />
                <input type="checkbox" id="str14" name="strength" value="Strong Management" />  <label for="str14">Strong Management</label><br />
            </td>
            <td></td>
            <td>
                <!-- WEAKNESSES -->
                <input type="checkbox" id="weak1" name="weakness" value="Weak Brand" /> <label for="weak1">Weak Brand</label><br />
                <input type="checkbox" id="weak2" name="weakness" value="Cost Structure" /> <label for="weak2">Cost Structure</label><br />
                <input type="checkbox" id="weak3" name="weakness" value="Lack of Scale" /> <label for="weak3">Lack of Scale</label><br />
                <input type="checkbox" id="weak4" name="weakness" value="Customer Service" /> <label for="weak4">Customer Service</label><br />
                <input type="checkbox" id="weak5" name="weakness" value="Weak Management" /> <label for="weak5">Weak Management</label><br />
                <input type="checkbox" id="weak6" name="weakness" value="Bad Acquisitions" /> <label for="weak6">Bad Acquisitions</label><br />
                <input type="checkbox" id="weak7" name="weakness" value="Tarnished Reputation" /> <label for="weak7">Tarnished Reputation</label><br />
            </td>
            <td>
                <input type="checkbox" id="weak8" name="weakness" value="Weak Supply Chain" /> <label for="weak8">Weak Supply Chain</label><br />
                <input type="checkbox" id="weak9" name="weakness" value="Weak R&D" /> <label for="weak9">Weak R&D</label><br />
                <input type="checkbox" id="weak10" name="weakness" value="Online Presence" /> <label for="weak10">Online Presence</label><br />
                <input type="checkbox" id="weak11" name="weakness" value="High Staff Turnover" /> <label for="weak11">High Staff Turnover</label><br />
                <input type="checkbox" id="weak12" name="weakness" value="Outdated Technology" /> <label for="weak12">Outdated Technology</label><br />
                <input type="checkbox" id="weak13" name="weakness" value="High Debt Burden" /> <label for="weak13">High Debt Burden</label><br />
                <input type="checkbox" id="weak14" name="weakness" value="Work Inefficiencies" /> <label for="weak14">Work Inefficiencies</label><br />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <!-- STRENGTHS: EXTRA -->
                <p>Custom strengths (comma-separated, <a href="http://www.google.com/search?q=define%3Aalphanumeric" target="_blank">alphanumeric</a>):</p>
                <textarea name="strength_ta" rows="2" class="custom-ta"></textarea> <br />
            </td>
            <td></td>
            <td colspan="2">
                <!-- WEAKNESSES: EXTRA -->
                <p>Custom weaknesses (comma-separated, <a href="http://www.google.com/search?q=define%3Aalphanumeric" target="_blank">alphanumeric</a>):</p>
                <textarea name="weakness_ta" rows="2" class="custom-ta"></textarea> <br />
            </td>
        </tr>
 
        <tr>
            <th colspan="2"><h3>Opportunities (helpful & external)</h3></th>
            <th style="width:6%;"></th>
            <th colspan="2"><h3>Threats (harmful & external)</h3></th>
        </tr>
        <tr>
            <td>
                <!-- OPPORTUNITIES -->
                <input type="checkbox" id="opp1" name="opportunity" value="International Expansion" /> <label for="opp1">International Expansion</label><br />
                <input type="checkbox" id="opp2" name="opportunity" value="New Markets" /> <label for="opp2">New Markets</label><br />
                <input type="checkbox" id="opp3" name="opportunity" value="New Products" /> <label for="opp3">New Products</label><br />
                <input type="checkbox" id="opp4" name="opportunity" value="Emerging Markets" /> <label for="opp4">Emerging Markets</label><br />
                <input type="checkbox" id="opp5" name="opportunity" value="Loosening Regulations" /> <label for="opp5">Loosening Regulations</label><br />
                <input type="checkbox" id="opp6" name="opportunity" value="New Technology" /> <label for="opp6">New Technology</label><br />
            </td>
            <td>
                <input type="checkbox" id="opp7" name="opportunity" value="New Services" /> <label for="opp7">New Services</label><br />
                <input type="checkbox" id="opp8" name="opportunity" value="Innovation" /> <label for="opp8">Innovation</label><br />
                <input type="checkbox" id="opp9" name="opportunity" value="Online Market" /> <label for="opp9">Online Market</label><br />
                <input type="checkbox" id="opp10" name="opportunity" value="Aquisition Synergies" /> <label for="opp10">Aquisition Synergies</label><br />
                <input type="checkbox" id="opp11" name="opportunity" value="Financial Leverage" /> <label for="opp11">Financial Leverage</label><br />
                <input type="checkbox" id="opp12" name="opportunity" value="Fragmented Market" /> <label for="opp12">Fragmented Market</label><br />
            </td>
            <td></td>
            <td>
                <!-- THREATS -->
                <input type="checkbox" id="thr1" name="threat" value="Substitute Products" /> <label for="thr1">Substitute Products</label><br />
                <input type="checkbox" id="thr2" name="threat" value="Volatile Revenue" /> <label for="thr2">Volatile Revenue</label><br />
                <input type="checkbox" id="thr3" name="threat" value="Volatile Costs" /> <label for="thr3">Volatile Costs</label><br />
                <input type="checkbox" id="thr4" name="threat" value="Political Risk" /> <label for="thr4">Political Risk</label><br />
                <input type="checkbox" id="thr5" name="threat" value="Change in Tastes" /> <label for="thr5">Change in Tastes</label><br />
                <input type="checkbox" id="thr6" name="threat" value="Govt Regulations" /> <label for="thr6">Govt Regulations</label><br />
            </td>
            <td>
                <input type="checkbox" id="thr7" name="threat" value="Intense Competition" /> <label for="thr7">Intense Competition</label><br />
                <input type="checkbox" id="thr8" name="threat" value="Mature Markets" /> <label for="thr8">Mature Markets</label><br />
                <input type="checkbox" id="thr9" name="threat" value="Intl Competition" /> <label for="thr9">Intl Competition</label><br />
                <input type="checkbox" id="thr10" name="threat" value="Volatile Currencies" /> <label for="thr10">Volatile Currencies</label><br />
                <input type="checkbox" id="thr11" name="threat" value="Bad Economy" /> <label for="thr11">Bad Economy</label><br />
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <!-- OPPORTUNITIES: EXTRA -->
                <p>Custom opportunities (comma-separated, <a href="http://www.google.com/search?q=define%3Aalphanumeric" target="_blank">alphanumeric</a>):</p>
                <textarea name="opportunity_ta" rows="2" class="custom-ta"></textarea> <br />
            </td>
            <td></td>
            <td colspan="2">
                <!-- THREATS: EXTRA -->
                <p>Custom threats (comma-separated, <a href="http://www.google.com/search?q=define%3Aalphanumeric" target="_blank">alphanumeric</a>):</p>
                <textarea name="threat_ta" rows="2" class="custom-ta"></textarea> <br />
            </td>
        </tr>
        </table>
    </p>
    <p id="submit-button-section">
        <input type="submit" class="submit-button" value="Create SWOT Analysis" onClick="return formSent();" />
    </p>
    <p id="spin-loader">
        <img src="https://wwjs.wikidot.com/local--files/wwjs/ajax-loader2.gif"><br/>
        Loading... <span id="progressAmt"></span>
    </p>
</form>
 
</body>
</html>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License