function tweetNote(event)
{
 //Values you provide
var twitterclient = document.getElementById("twitterclient");	// replace with ID of popup

// Popup code
twitterclient = twitterclient.value;

var textAreaValue = document.getElementById("message");	// replace with ID of text area
textAreaValue = textAreaValue.value;

if (twitterclient == "undefined")
{
alert("Please specify an iPhone Twitter application to tweet your note with by clicking the \"i\" If you do not have a Twitter client for iPhone, you can download Twitterific for free on the App Store.")
}

if (twitterclient!="undefined")
{
var tryConfirm = window.confirm("Tweet this with "+twitterclient+"?")
if (twitterclient=="Tweetie")
{
url = "tweetie:///post?message="+document.getElementById("message").value;
location=url
}

if (twitterclient == "Twitterfon")
{
url = "twitterfon:///post?"+document.getElementById("message").value;
location=url
}

if (twitterclient == "Twitterific")
{
url = "twitterrific:///post?message="+document.getElementById("message").value;
location=url
}
}
}

function twitterChanged(event)
{
    if (database) {
        var element = document.getElementById('twitterclient');
        database.transaction(function (tx) {
            tx.executeSql("UPDATE " + DB_tableName + " SET key = 'twitter', value = ? WHERE id = 4", [element.value]);
        });
    }
    hideLocationBar(event);
}


function emailNote(event)
{
//Get all the font formatting values
var colorValue = document.getElementById("fontColor");	// replace with ID of popup
colorValue = colorValue.value;
var fontValue = document.getElementById("fontFamily");	// replace with ID of popup
fontValue = fontValue.value;
var sizeValue = document.getElementById("fontSize");	// replace with ID of popup
sizeValue = sizeValue.value;
var textAreaValue = document.getElementById("message");	// replace with ID of text area
textAreaValue = textAreaValue.value;

//Because HTML email doesn't like font families that have spaces in them, get rid of all the spaces in the fontValue
if(fontValue=="American Typewriter")
{
fontValue = "AmericanTypewriter";
}
else
if(fontValue=="American Typewriter Condensed")
{
fontValue = "AmericanTypewriterCondensed";
}
else
if(fontValue=="Arial Rounded MT Bold")
{
fontValue = "ArialRoundedMTBold";
}
else
if(fontValue=="Courier New")
{
fontValue = "CourierNew";
}
else
if(fontValue=="Marker Felt")
{
fontValue = "MarkerFelt";
}
else
if(fontValue=="Times New Roman")
{
fontValue = "TimesNewRoman";
}
else
if(fontValue=="Trebuchet MS")
{
fontValue = "TrebuchetMS";
}

backgroundValue = "White"

//compose the email
url = "mailto: ?SUBJECT=Check out the document I created with Noteshare!&BODY=<p style=background-color:"+backgroundValue+";color:"+colorValue+";font-family:"+fontValue+";font-size:"+sizeValue+";>"+textAreaValue+"</p>";
location = url;
}


