/* 
 * tweetThis javascript
 * Steven Milstein
 * 2009-05-04
 */

//Global variables
gTwetailer = "d twetailer ";
gPersonaConsumer = "consumer";
gPersonaRetailer = "retailer";
gPersona = gPersonaConsumer;
gActionDemand = "demand"; 
gActionSupply = "supply";
gActionList = "list";
gAction = gActionDemand;
gMsg = "";
gDate = new Date();
gDD = "";
gMM = "";
gYYYY = "";
gISO = "";
gtxtMsgHint = "Twitter has a 140-character limitation on its messages. However, you can reduce the message length by omitting one, or, more optional attributes and sending them on a subsequent message.";

function showHint(element)
{
	hintElement = "txtHint_" + element;
//	document.getElementById("txtHint").value = document.getElementById(hintElement).value;
//	resize("txtHint");
	document.getElementById("txtHint").innerHTML = document.getElementById(hintElement).value;
	document.getElementById("txtHint").style.visibility="visible";
}

function hideHint()
{
	document.getElementById("txtHint").style.visibility="hidden";
}

/*
*  setMsg...()
*/

function setMsgSalesAssociateSupply()
{
	setError(false);
	gMsg = gTwetailer + "!supply ";
	appendAttribute("tag", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeSalesAssociateSupply();
}
/*

  Not in use - start
   
function setMsgStoreUpdate()
{
	setError(false);
	gMsg = gTwetailer + "!register type:store ";
	appendAttribute("store", true);
	appendAttribute("name", false);
	appendAttribute("tel", false);
	appendAttribute("email", false);
	appendAttribute("address", false);
	appendAttribute("range", false);
	appendAttribute("locale", false);
	appendAttribute("responsible", false);
	appendAttribute("retailer", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeStoreUpdate();
}

function setMsgStoreRegister()
{
	setError(false);
	gMsg = gTwetailer + "!register type:store ";
	appendAttribute("name", true);
	appendAttribute("tel", true);
	appendAttribute("email", false);
	appendAttribute("address", true);
	appendAttribute("range", false);
	appendAttribute("locale", false);
	appendAttribute("responsible", true);
	appendAttribute("retailer", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeStoreRegister();
}

function setMsgSalesAssociateUpdate()
{
	setError(false);
//	gMsg = gTwetailer + "!register type:agent ";
	gMsg = gTwetailer + "!register ";
	appendAttribute("salesassociate", true);
	appendAttribute("name", false);
	appendAttribute("email", false);
	appendAttribute("range", false);
	appendAttribute("locale", false);
	appendAttribute("store", false);
	appendAttribute("backup", false);
//	appendAttribute("delay", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeSalesAssociateUpdate();
}

function setMsgSalesAssociateRegister()
{
	setError(false);
//	gMsg = gTwetailer + "!register type:agent ";
	gMsg = gTwetailer + "!register ";
	appendAttribute("name", true);
	appendAttribute("email", true);
	appendAttribute("range", false);
	appendAttribute("locale", false);
	appendAttribute("store", true);
	appendAttribute("backup", false);
//	appendAttribute("delay", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeSalesAssociateRegister();
}

function setMsgDemandListPublic()
{
	setError(false);
	gMsg = gTwetailer + "!list ";
	appendAttribute("range", true);
	appendAttribute("locale", true);
	appendAttribute("expires", true);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeDemandListPublic();
}

	Not in use - end 

*/

function setMsgTagList()
{
	setError(false);
	gMsg = gTwetailer + "!list ";
	appendAttribute("tag", true);
	appendAttribute("range", false);
	appendAttribute("locale", false);
	appendAttribute("expires", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeTagList();
}

function setMsgStoreList()
{
	setError(false);
	gMsg = gTwetailer + "!list ";
	appendAttribute("store", true);
	appendAttribute("range", false);
	appendAttribute("locale", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeStoreList();
}
function setMsgConsumersDemandFlag()
{
	setError(false);
	gMsg = gTwetailer + "!flag ";
	appendAttribute("ref", true);
	appendAttribute("note", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeConsumersDemandFlag();
}

function setMsgConsumersDemandClose()
{
	setError(false);
	gMsg = gTwetailer + "!close ";
	appendAttribute("ref", true);
	appendAttribute("note", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeConsumersDemandClose();
}

function setMsgProposalList()
{
	setError(false);
	gMsg = gTwetailer;
	appendAttribute("proposal", true);
	appendAttribute("ref", false);
	appendAttribute("tag", false);
	appendAttribute("range", false);
	appendAttribute("locale", false);
	appendAttribute("expires", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeProposalList();
}

function setMsgConsumersProposalDecline()
{
	setError(false);
	gMsg = gTwetailer + "!decline ";
	appendAttribute("proposal", true);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeConsumersProposalDecline();
}

function setMsgConsumersProposalConfirm()
{
	setError(false);
	gMsg = gTwetailer + "!confirm ";
	appendAttribute("proposal", true);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeConsumersProposalConfirm();
}

function setMsgConsumersDemandCancel()
{
	setError(false);
	gMsg = gTwetailer + "!cancel ";
	appendAttribute("ref", true);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeConsumersDemandCancel();
}

function setMsgConsumersDemandUpdate()
{
	setError(false);
	gMsg = gTwetailer;
	appendAttribute("ref", true);
	var list = document.getElementById("tag-action");
	gMsg += list.value;	
	appendAttribute("tag", false);
	appendAttribute("range", false);
	appendAttribute("locale", false);
	appendAttribute("expires", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeConsumersDemandUpdate();
}

function setMsgConsumersDemandList()
{
	setError(false);
	gMsg = gTwetailer + "!list ";
	appendAttribute("ref", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeConsumersDemandList();
}

function setMsgConsumersDemandCreate()
{
	setError(false);
	gMsg = gTwetailer;
	appendAttribute("tag", true);
	appendAttribute("range", true);
	appendAttribute("locale", true);
	appendAttribute("expires", false);
	document.getElementById("txtMsg").innerHTML = gMsg;
	resizeConsumersDemandCreate();
}

function setMsgConsumer()
{
	/*
	gMsg = gTwetailer;
	document.getElementById("txtMsg").value = gMsg;
	resize("txtMsg");
	*/
}

function setMsgHome()
{
	// gMsg = escape("d twetailer wii mario 2010 olympics locale:91210 us range:25 mi expires:20101223 #demo");
	// setError(false);
	gMsg = gTwetailer;
	appendAttribute("tag", true);
	appendAttribute("range", true);
	appendAttribute("locale", true);
	appendAttribute("expires", false);
	appendHash("demo");
	document.getElementById("txtMsg").innerHTML = gMsg;
}

/*
*  resize...()
*/

function resizeSalesAssociateSupply()
{
	resize("tag");
	validateMsgLength();
}

/* 
	Not in use - start

function resizeStoreUpdate()
{
	resize("store");
	resize("name");
	resize("tel");
	resize("email");
	resize("address");
	resize("locale");
	resize("range");
	resize("responsible");
	resize("retailer");
	validateMsgLength();
}

function resizeStoreRegister()
{
	resize("name");
	resize("tel");
	resize("email");
	resize("address");
	resize("locale");
	resize("range");
	resize("responsible");
	resize("retailer");
	validateMsgLength();
}

function resizeSalesAssociateUpdate()
{
	resize("salesassociate");
	resize("name");
	resize("email");
	resize("range");
	resize("locale");
	resize("store");
	resize("backup");
	validateMsgLength();
}

function resizeSalesAssociateRegister()
{
	resize("name");
	resize("email");
	resize("range");
	resize("locale");
	resize("store");
	resize("backup");
	validateMsgLength();
}

function resizeDemandListPublic()
{
	resize("range");
	resize("locale");
	resize("expires");
	validateMsgLength();
}

	not in use - end

*/

function resizeTagList()
{
	resize("tag");
	resize("range");
	resize("locale");
	resize("expires");
	validateMsgLength();
}

function resizeStoreList()
{
	resize("store");
	resize("range");
	resize("locale");
	validateMsgLength();
}

function resizeConsumersDemandFlag()
{
	resize("ref");
	resize("note");
	validateMsgLength();
}

function resizeConsumersDemandClose()
{
	resize("ref");
	resize("note");
	validateMsgLength();
}

function resizeProposalList()
{
	resize("proposal");
	resize("ref");
	resize("tag");
	resize("range");
	resize("locale");
	resize("expires");
	validateMsgLength();
}

function resizeConsumersProposalDecline()
{
	resize("proposal");
	validateMsgLength();
}

function resizeConsumersProposalConfirm()
{
	resize("proposal");
	validateMsgLength();
}

function resizeConsumersDemandCancel()
{
	resize("ref");
	validateMsgLength();
}

function resizeConsumersDemandUpdate()
{
	resize("ref");
	resize("tag");
	resize("range");
	resize("locale");
	resize("expires");
	validateMsgLength();
}

function resizeConsumersDemandList()
{
	resize("ref");
	validateMsgLength();
}

function resizeConsumersDemandCreate()
{
	resize("tag");
	resize("range");
	resize("locale");
	resize("expires");
	validateMsgLength();
}

function validateMsgLength()
{
	length = gMsg.length;
	len = 141 - length; 
	document.getElementById("msgLength").innerHTML = len;

	if (len < 0)
	{
		setError(true);
	}
}
function resize(elem)
{
	val = document.getElementById(elem).value;
	document.getElementById(elem).size = val.length;
	document.getElementById(elem).value = val;
}

function setDateDefault()
{
	gDate.setMonth(gDate.getMonth()+1);
}

function setDateISO()
{
	gYYYY = gDate.getFullYear();
	gMM = gDate.getMonth() + 1;
	gDD = gDate.getDate();
	
	if (gDate.getMonth() < 9)
	{
		gMM =  "0" + gMM;
	}
	
	if (gDate.getDate() < 10)
	{
		gDD = "0" + gDD;
	}
	
	gISO = gYYYY + "-" + gMM + "-" + gDD; 
}


function initAction(index)
{
	document.getElementById("action_demand").selectedIndex = index;
}

function initExpires()
{
	setDateDefault();
	setDateISO();
	document.getElementById("expires").value = gISO;
}

/*
*  initHint...()
*/

function initHint(elem, hint)
{
	txtHint = "txtHint_" + elem;
	document.getElementById(txtHint).value = hint;
	//document.getElementById(txtHint).innerHTML = hint;
	//resize(txtHint);
	hideHint(elem);	
}

function initHintsSalesAssociateSupply()
{
	initHint("tag", "<h3><a href=\"#\">Tags</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate, I want to describe the good, or, service I supply with common keywords, or, exact quoted phrases, so I can be notified when a Consumer within range of my locale is interested in making a purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> To <strong>create/replace</strong>, send \"tags:[space-separated-tags-describing-good-or-service]. To <strong>add</strong>, send \"<strong>+</strong>tags:[my-tags-to-add]\". To <strong>remove</strong>, send \"<strong>-</strong>tags:[my-tags-to-remove]\".<h6>Example</h6><p>To <strong>create/replace</strong>, send \"tags:wii\". To <strong>add</strong>, send \"<strong>+</strong>tags:xbox console\". To <strong>remove</strong>, send \"<strong>-</strong>tags:wii\" </p><h4>Rules</h4><p>The action keyword \"tags:\" is optional for Demands. Example: Send \"wii console\" is equivalent to \"tags:wii console\".</p> <h4>Also Known As</h4> <p>tag, keywords, keys, tag, keyword, key</p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

/*
	Not in use - start
	
function initHintsStoreUpdate()
{
	initHint("store", "<h3>Store Identification Number</h3> <p>The Store Identification number is generated by the System upon self-registration. </p> ");
	initHint("name", "<h3>Store Name</h3> <p>The store's full name as known in business directories. </p> ");
	initHint("tel", "<h3>Business Telephone Number</h3> <p>The store's business telephone number as indicated in business directories. </p> ");
	initHint("email", "<h3>Email Address</h3> <p>The store's generic email address like info@mystore.com. </p> ");
	initHint("address", "<h3>Address</h3> <p>The store's business address as indicated in business directories.</p> ");
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate who supplies service, I want to set the postal, or zip code, so Twetailer can determine the range of my service area.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate who supplies services, I want to set the range within which Twetailer tries to match Demands, so I can manage my service area.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("responsible", "<h3>Responsible</h3> <p>The Sales Associate Identification number who is responsible for linking Sales Associates with the Store.  </p> ");
	initHint("retailer", "<h3>Retailer</h3> <p>(n): A business which sells goods to the consumer, as opposed to a wholesaler or supplier which normally sell their goods to another business. </p> <p> <strong>Twetailer</strong> lumps Sales Associates, Stores and Retailers together and often refers to them all as \"Retailers\".</p> ");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefiled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsStoreRegister()
{
	initHint("name", "<h3>Store Name</h3> <p>The store's full name as known in business directories. </p> ");
	initHint("tel", "<h3>Business Telephone Number</h3> <p>The store's business telephone number as indicated in business directories. </p> ");
	initHint("email", "<h3>Email Address</h3> <p>The store's generic email address like info@mystore.com. </p> ");
	initHint("address", "<h3>Address</h3> <p>The store's business address as indicated in business directories.</p> ");
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate who supplies service, I want to set the postal, or zip code, so Twetailer can determine the range of my service area.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate who supplies services, I want to set the range within which Twetailer tries to match Demands, so I can manage my service area.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("responsible", "<h3>Responsible</h3> <p>The Sales Associate Identification number who is responsible for linking Sales Associates with the Store.  </p> ");
	initHint("retailer", "<h3>Retailer</h3> <p>(n): A business which sells goods to the consumer, as opposed to a wholesaler or supplier which normally sell their goods to another business. </p> <p> <strong>Twetailer</strong> lumps Sales Associates, Stores and Retailers together and often refers to them all as \"Retailers\".</p> ");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsSalesAssociateUpdate()
{
	initHint("salesassociate", "<h3>Sales Associate Identification Number</h3> <p>The Sales Associate Identification number is generated by the System upon self-registration.  </p> ");
	initHint("name", "<h3>Full Name</h3> <p>You full name will be used for reporting purposes. </p> ");
	initHint("email", "<h3>Email Address</h3> <p>Your email address will be used for confirmation notices. </p> ");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate who supplies services, I want to set the range within which Twetailer tries to match Demands, so I can manage my service area.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate who supplies service, I want to set the postal, or zip code, so Twetailer can determine the range of my service area.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("store", "<h3>Store</h3> <p>(n) a place where merchandise is offered for sale.  </p> <p>Twetailer has Retailers which are linked to Stores, which are linked to Sales Associates. However for the sake of simplicity, Twetailer lumps Sales Associates, Stores and Retailers together and often refers to them all as \"Retailers\" . </p>");
	initHint("backup", "<h3><a href=\"#\">Backup</a></h3> <p class=\"meta\">Since Version 0.0</p> <h>Story</h4>  <p>As a Sales Associate, I want to Register a Sales Associate colleague of mine as my backup, so they can receive the same notifications as I do.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"backup:[Sales-Associate-ID] \" <h6>Example</h6> <p> \"backup:12345\" </p> <h4>Rules</h4> <p>The backup Sales Associate ID must already exist. </p>");
//	initHint("delay", "<h3><a href=\"#\">Delay</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate, I want set the delay - in days, or hours that Twetailer waits before notifying my Backup that I have not Proposed, or, Declined a Demand.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"delay:[number d | h] \" <h6>Example</h6> <p>Send \"delay:1d\" </p> <h4>Rules</h4> <p>The unit of measure must be either \"d\" (days), or, \"h\" (hours). </p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsSalesAssociateRegister()
{
	initHint("name", "<h3>Full Name</h3> <p>You full name will be used for reporting purposes. </p> ");
	initHint("email", "<h3>Email Address</h3> <p>Your email address will be used for confirmation notices. </p> ");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate who supplies services, I want to set the range within which Twetailer tries to match Demands, so I can manage my service area.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate who supplies service, I want to set the postal, or zip code, so Twetailer can determine the range of my service area.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("store", "<h3>Store</h3> <p>(n) a place where merchandise is offered for sale.  </p> <p>Twetailer has Retailers which are linked to Stores, which are linked to Sales Associates. However for the sake of simplicity, Twetailer lumps Sales Associates, Stores and Retailers all together and often refers to them collectively as \"Retailers\" . </p>");
	initHint("backup", "<h3><a href=\"#\">Backup</a></h3> <p class=\"meta\">Since Version 0.0</p> <h>Story</h4>  <p>As a Sales Associate, I want to Register a Sales Associate colleague of mine as my backup, so they can receive the same notifications as I do.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"backup:[Sales-Associate-ID] \" <h6>Example</h6> <p> \"backup:12345\" </p> <h4>Rules</h4> <p>The backup Sales Associate ID must already exist. </p>");
//	initHint("delay", "<h3><a href=\"#\">Delay</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate, I want set the delay - in days, or hours that Twetailer waits before notifying my Backup that I have not Proposed, or, Declined a Demand.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"delay:[number d | h] \" <h6>Example</h6> <p>Send \"delay:1d\" </p> <h4>Rules</h4> <p>The unit of measure must be either \"d\" (days), or, \"h\" (hours). </p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsRetailersGettingStarted()
{
	initHint("create", "<h3>Create Twitter Account</h3><p>In order to communicate with Twetailer, you'll need a twitter account. Once you're registered, you'll be able to broadcast messages to the world, mention other people (like \"@twetailer hi\") and send private, or, direct messages (like \"d twetailer wii console\") </p> <h3>Do you Text Message?</h3> <p>Once you're logged into Twitter, click on the Settings link and then the Mobile tab. Follow the instructions on how to add your mobile phone number so you can send and receive Direct Messages via SMS - text messaging. </p>");
	initHint("follow", "<h3>Privacy</h3><p>In order to protect your privacy, all transaction related messages are private \(<strong>\"direct\"</strong> in Twitter-speak\) between you &amp; Twetailer.  Even the Consumers don't know who you are. By definition, all <strong>direct messages are transactions</strong> and are <strong>automatically processed</strong> by the <strong>Twetailer</strong> System.</p>  <h6>Example</h6> <p> Send \"d twetailer !supply wii ps3 nintendo\" </p> <h3>No so private</h3> <p> You can always communicate with a <strong>live</strong> Twetailer rep by prefixing your messages with <strong>\"\@twetailer\"</strong>.  Just keep in mind that <strong>anyone</strong> else Following Twetailer, may see the message as well. </p> <h6>Example</h6> <p> Send \"\@twetailer this is just way too kewl. thanks! \"</p> <h3>And then there's email</h3> <p>You could email specific support issues to support at twetailer dot com. </p> ");	
	initHint("register", "<h3><a href=\"#\">Register</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate, I want to register myself and optionally a backup Sales Associate with Twetailer, so I can be linked to a Store and optionally a Retailer</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!register [type:SalesAssociate] name:[SA-full-name] email:[SA-email-address] locale:[postal/zip-code 2-letter-country-code] range:[distance 2-letter-distance-unit-of-measure] store:[storeID] [backup:[backup-SA-ID]]\" <h6>Example</h6> <p>Send \"!register name:Ryan Retailer email:ryan@pawselectronics.com locale:12345 us range:25 mi store:67890 backup:12345\"  </p> <h4>Rules</h4> <p>System generates Sakes Associate ID. A notification will be sent to the Backup Sales Associate for them to acknowledge the link. A notification will be sent to the Store's Responsible Sales Associate for them to initiate the link. Sales Associates cannot Propose any goods/services until they are linked to a Store. The Backup Sales Associate will receive Demand notifications in the event the Sales Associate does not Propose, or Decline a Demand within 24 hours. Sales Associates must accept Twetailer's terms and conditions upon creation. </p> ");
}

	Not in use - end

*/

function initHintsRetailers()
{
/*
	initHint("getting_started", "<h3>You're only 2 steps away</h3> <p>from registering as a Sales Associate. </p> ");
	initHint("sa_register", "<h3><a href=\"#\">Sales Associate Registration</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate, I want to register myself and optionally a backup Sales Associate with Twetailer, so I can be linked to a Store and optionally a Retailer.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!register [type:SalesAssociate] name:[SA-full-name] email:[SA-email-address] locale:[postal/zip-code 2-letter-country-code] range:[distance 2-letter-distance-unit-of-measure] store:[storeID] [backup:[backup-SA-ID]] \" <h6>Example</h6> <p>Send \"!register name:Ryan Retailer email:ryan@pawselectronics.com locale:12345 us range:25 mi store:67890 backup:12345 \" </p> <h4>Rules</h4> <p>System generates Sakes Associate ID. A notification will be sent to the Backup Sales Associate for them to acknowledge the link. A notification will be sent to the Store's Responsible Sales Associate for them to initiate the link. Sales Associates cannot Propose any goods/services until they are linked to a Store. The Backup Sales Associate will receive Demand notifications in the event the Sales Associate does not Propose, or Decline a Demand within 24 hours. Sales Associates must accept Twetailer's terms and conditions upon creation. </p> ");
	initHint("sa_update", "<h3><a href=\"#\">Sales Associate Update</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Sales Associate, I want to update my registration, so I can be linked to a Store and optionally a Retailer.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"register salesAssocate:[SA-ID] name:[SA-full-name] email:[SA-email-address] locale:[postal/zip-code 2-letter-country-code] range:[distance 2-letter-distance-unit-of-measure] [store:storeID] [backup:[backup-SA-ID]] \" <h6>Example</h6> <p>Send \"!register salesassociate:23456 name:Ryan Retailer email:ryan@pawselectronics.com locale:12345 us range:25 mi store:67890 backup:12345 \" </p> <h4>Rules</h4> <p>System generates Sakes Associate ID. A notification will be sent to the Backup Sales Associate for them to acknowledge the link. A notification will be sent to the Store's Responsible Sales Associate for them to initiate the link. Sales Associates cannot Propose any goods/services until they are linked to a Store. Sales Associates must accept Twetailer's terms and conditions upon creation. </p> ");
	initHint("store_register", "<h3><a href=\"#\">Store Registration</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p> As the Sales Associate responsible for the Store, I want to register my Store, so I can link my Sales Associates and optionally associate it with a Retailer.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!register type:store name:[store-name] tel:[store's-business-telelphone-number] email:[store-email-address] address:[full-address] locale:[postal/zip-code 2-letter-country-code] range:[distance 2-letter-distance-unit-of-measure] responsible:[SalesAssociate-ID] retailer:retailerID \" <h6>Example</h6> <p>Send \"!register type:store name:Paw's Electronics and Gadgets email:info@pawselectronics.com address:[full-address] locale:12345 us range:25 mi responsible:12345 retailer:67890 \" </p> <h4>Rules</h4> <p> System generates Store ID. A notification will be sent to the Responsible Sales Associate for them to acknowledge the link. A notification will be sent to the Retailer's Responsible Sales Associate for them to initiate the link. Responsible Sales Associates must accept Twetailer's terms and conditions upon creation. </p> ");
*/
	initHint("register", "<h3><a href=\"#\">Private Beta Registration</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As Twetailer, I want to control the private beta Retailer registration process myself, so I can better manage the typical Ups and Downs of a Start-up. For now, Retailers can request registration by contacting <a href=&#109;&#097;&#105;&#108;&#116;&#111;:&#115;&#116;&#101;&#118;&#101;&#110;&#046;&#109;&#105;&#108;&#115;&#116;&#101;&#105;&#110;&#064;&#116;&#119;&#101;&#116;&#097;&#105;&#108;&#101;&#114;&#046;&#099;&#111;&#109;>Steven Milstein</a> via email.</p> <p>(Clicking the menu item will launch your email client.)</p>");
	initHint("sa_supply", "<h3><a href=\"#\">Supply</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p> As the Sales Associate responsible for the Store, I want to Supply Tags describing the goods, or, services I offer, so I may be notified upon Consumer's immediate interests</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!supply tags:[my-goods-services]\" <h6>Example</h6> <p>Send \"!supply tags:nintendo wii sony playstation psp, psp2, psp3 super mario fit\" </p> <h4>Rules</h4> <p>Sales Associates must be registered before they can Supply tags.</p> ");
}

/*
 	Not in use - start
 
function initHintsDemandListPublic()
{
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to control the area Twetailer searches for my Demand, so I can determine just how far I'm willing to travel to make my purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to instruct Twetailer to limit its search for my Demand, to Retailers within an area of my choice, so I can control how far I'm willing to travel to make the purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("expires", "<h3><a href=\"#\">Expiration</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to associate an Expiration date Attribute with my Demand - which defaults to one month from creation, so I can express my limited interest in making a purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"expires:[yyyy-mm-dd]\"<h6>Example</h6> <p>Send \"expires:2009-12-23\"</p> <h4>Rules</h4> <p>Valid formats are: [yyyy-mm-dd], [mm-dd-yyyy], [dd-mm-yyyy], with/without dashes \"-\". Date must be greater than, or, equal to current (today's) date. Defaults to one month from today. </p> <h4>Also Known As</h4> <p>expires, exp</p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

	Not in use - end
	
*/

function initHintsTagList()
{
	initHint("tag", "<h3><a href=\"#\">Tags</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to describe the good, or, service I'm seeking to purchase with common keywords, or exact quoted phrases, so a Retailer within range of my locale can be notified of my immediate interest.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"[space-separated-tags-describing-good-or-service] locale:[postal/zip-code 2-letter-country-code] expires:[yyyy-mm-dd]\"<h6>Example</h6><p>Send \"wii console locale:12345 us expires:2009-12-23\" </p><h4>Rules</h4><p>The action keyword \"tags:\" is optional for Demands. Example: Send \"wii console\" is equivalent to \"tags:wii console\".</p> <h4>Also Known As</h4> <p>tag, keywords, keys, tag, keyword, key</p>");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to control the area Twetailer searches for my Demand, so I can determine just how far I'm willing to travel to make my purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to instruct Twetailer to limit its search for my Demand, to Retailers within an area of my choice, so I can control how far I'm willing to travel to make the purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("expires", "<h3><a href=\"#\">Expiration</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to associate an Expiration date Attribute with my Demand - which defaults to one month from creation, so I can express my limited interest in making a purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"expires:[yyyy-mm-dd]\"<h6>Example</h6> <p>Send \"expires:2009-12-23\"</p> <h4>Rules</h4> <p>Valid formats are: [yyyy-mm-dd], [mm-dd-yyyy], [dd-mm-yyyy], with/without dashes \"-\". Date must be greater than, or, equal to current (today's) date. Defaults to one month from today. </p> <h4>Also Known As</h4> <p>expires, exp</p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsStoreList()
{
	initHint("store", "<h3><a href=\"#\">Store</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, or, Retailer, I want to List one, or, all Stores with optional search criteria. </p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to control the area Twetailer searches for my Demand, so I can determine just how far I'm willing to travel to make my purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to instruct Twetailer to limit its search for my Demand, to Retailers within an area of my choice, so I can control how far I'm willing to travel to make the purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersDemandFlag()
{
	initHint("ref", "<h3><a href=\"#\">Reference</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer,  I want an easy way to refer to an existing Demand.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"ref:[Demand-reference-number]\"<h6>Example</h6><p>\"ref:12345\" </p><h4>Rules</h4><p>System generated value when Demand created</p> <h4>Also Known As</h4> <p>ref, id, identifier</p>");
	initHint("note", "<h3><a href=\"#\">Note</a></h3> <p class=\"meta\">Future Release</p> <h4>Story</h4> <p>As a Consumer, I want to provide Twetailer with some feedback, so I can help improve the quality of service.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"note:[any-text]\"<h6>Example</h6><p>\"note:my product was not put aside :-( \" </p><h4>Rules</h4><p>Optional</p> ");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersDemandClose()
{
	initHint("ref", "<h3><a href=\"#\">Reference</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer,  I want an easy way to refer to an existing Demand.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"ref:[Demand-reference-number]\"<h6>Example</h6><p>\"ref:12345\" </p><h4>Rules</h4><p>System generated value when Demand created</p> <h4>Also Known As</h4> <p>ref, id, identifier</p>");
	initHint("note", "<h3><a href=\"#\">Note</a></h3> <p class=\"meta\">Future Release</p> <h4>Story</h4> <p>As a Consumer, I want to provide Twetailer with some feedback, so I can help improve the quality of service.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"note:[any-text]\"<h6>Example</h6><p>\"note:my product was not put aside :-( \" </p><h4>Rules</h4><p>Optional</p> ");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsProposalList()
{
	initHint("proposal", "<h3><a href=\"#\">Proposal</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Definition</h4> <p>system generated value identifying the full description and price of the good/service a Retailer has in stock, and Proposes in response to a Consumer's Demand </p> <h4><a href=\"#\">Usage</a></h4> <p> \"proposal:[Proposal-number]\"<h6>Example</h6><p>\"proposal:12345\" </p><h4>Rules</h4><p>System generated value when Retailer responds to Consumer's Demand</p> ");
	initHint("ref", "<h3><a href=\"#\">Reference</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer,  I want an easy way to refer to an existing Demand.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"ref:[Demand-reference-number]\"<h6>Example</h6><p>\"ref:12345\" </p><h4>Rules</h4><p>System generated value when Demand created</p> <h4>Also Known As</h4> <p>ref, id, identifier</p>");
	initHint("tag", "<h3><a href=\"#\">Tags</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to describe the good, or, service I'm seeking to purchase with common keywords, or exact quoted phrases, so a Retailer within range of my locale can be notified of my immediate interest.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"[space-separated-tags-describing-good-or-service] locale:[postal/zip-code 2-letter-country-code] expires:[yyyy-mm-dd]\"<h6>Example</h6><p>Send \"wii console locale:12345 us expires:2009-12-23\" </p><h4>Rules</h4><p>The action keyword \"tags:\" is optional for Demands. Example: Send \"wii console\" is equivalent to \"tags:wii console\".</p> <h4>Also Known As</h4> <p>tag, keywords, keys, tag, keyword, key</p>");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to control the area Twetailer searches for my Demand, so I can determine just how far I'm willing to travel to make my purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to instruct Twetailer to limit its search for my Demand, to Retailers within an area of my choice, so I can control how far I'm willing to travel to make the purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("expires", "<h3><a href=\"#\">Expiration</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to associate an Expiration date Attribute with my Demand - which defaults to one month from creation, so I can express my limited interest in making a purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"expires:[yyyy-mm-dd]\"<h6>Example</h6> <p>Send \"expires:2009-12-23\"</p> <h4>Rules</h4> <p>Valid formats are: [yyyy-mm-dd], [mm-dd-yyyy], [dd-mm-yyyy], with/without dashes \"-\". Date must be greater than, or, equal to current (today's) date. Defaults to one month from today. </p> <h4>Also Known As</h4> <p>expires, exp</p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersProposalDecline()
{
	initHint("proposal", "<h3><a href=\"#\">Proposal</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer,  I want an easy way to refer to an existing Proposal.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"proposal:[Proposal-number]\"<h6>Example</h6><p>\"proposal:12345\" </p><h4>Rules</h4><p>System generated value when a Retailer proposes the full description and price of the good/service a they have in stock, in response to a Consumer's Demand.</p> ");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersProposalConfirm()
{
	initHint("proposal", "<h3><a href=\"#\">Proposal</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer,  I want an easy way to refer to an existing Prposal.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"proposal:[Proposal-number]\"<h6>Example</h6><p>\"proposal:12345\" </p><h4>Rules</h4><p>System generated value when a Retailer proposes the full description and price of the good/service a they have in stock, in response to a Consumer's Demand.</p> ");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersDemandCancel()
{
	initHint("ref", "<h3><a href=\"#\">Reference</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer,  I want an easy way to refer to an existing Demand.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"ref:[Demand-reference-number]\"<h6>Example</h6><p>\"ref:12345\" </p><h4>Rules</h4><p>System generated value when Demand created</p> <h4>Also Known As</h4> <p>ref, id, identifier</p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersDemandUpdate()
{
	initHint("ref", "<h3><a href=\"#\">Reference</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer,  I want an easy way to refer to an existing Demand.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"ref:[Demand-reference-number]\"<h6>Example</h6><p>\"ref:12345\" </p><h4>Rules</h4><p>System generated value when Demand created</p> <h4>Also Known As</h4> <p>ref, id, identifier</p>");
	initHint("tag-action", "<h3><a href=\"#\">Tags</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to describe the good, or, service I'm seeking to purchase with common keywords, or exact quoted phrases, so a Retailer within range of my locale can be notified of my immediate interest.</p> <h4><a href=\"#\">Usage</a></h4><ul><li><strong>Create/Replace</strong>: \"tags:[space-separated-tags-describing-good-or-service] \"</li><li><strong>Add</strong>: \"<strong>+</strong>tags:[my-tags-to-add] \" </li><li><strong>Remove</strong>: \"-tags:[my-tags-remove] \" </li></ul><h6>Example</h6><ul><li>Create/Replace: \"tags:ii \"</li><li>Add: \"+tags:xbox console \" </li><li>Remove: \"-tags:ii \" </li></ul><h4>Rules</h4><p>The action keyword \"tags:\" is optional for Demands. Example: Send \"wii console\" is equivalent to \"tags:wii console\".</p> <h4>Also Known As</h4> <p>tag, keywords, keys, tag, keyword, key</p>");
	initHint("tag", "<h3><a href=\"#\">Tags</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to describe the good, or, service I'm seeking to purchase with common keywords, or exact quoted phrases, so a Retailer within range of my locale can be notified of my immediate interest.</p> <h4><a href=\"#\">Usage</a></h4><ul><li>Create/Replace: \"tags:[space-separated-tags-describing-good-or-service] \"</li><li>Add: \"+tags:[my-tags-to-add] \" </li><li>Remove: \"-tags:[my-tags-remove] \" </li></ul><h6>Example</h6><ul><li>Create/Replace: \"tags:ii \"</li><li>Add: \"+tags:xbox console \" </li><li>Remove: \"-tags:ii \" </li></ul><h4>Rules</h4><p>The action keyword \"tags:\" is optional for Demands. Example: Send \"wii console\" is equivalent to \"tags:wii console\".</p> <h4>Also Known As</h4> <p>tag, keywords, keys, tag, keyword, key</p>");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to control the area Twetailer searches for my Demand, so I can determine just how far I'm willing to travel to make my purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to instruct Twetailer to limit its search for my Demand, to Retailers within an area of my choice, so I can control how far I'm willing to travel to make the purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("expires", "<h3><a href=\"#\">Expiration</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to associate an Expiration date Attribute with my Demand - which defaults to one month from creation, so I can express my limited interest in making a purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"expires:[yyyy-mm-dd]\"<h6>Example</h6> <p>Send \"expires:2009-12-23\"</p> <h4>Rules</h4> <p>Valid formats are: [yyyy-mm-dd], [mm-dd-yyyy], [dd-mm-yyyy], with/without dashes \"-\". Date must be greater than, or, equal to current (today's) date. Defaults to one month from today. </p> <h4>Also Known As</h4> <p>expires, exp</p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersDemandList()
{
	initHint("ref", "<h3><a href=\"#\">Reference</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer,  I want an easy way to refer to an existing Demand.</p> <h4><a href=\"#\">Usage</a></h4> <p> \"ref:[Demand-reference-number]\"<h6>Example</h6><p>\"ref:12345\" </p><h4>Rules</h4><p>System generated value when Demand created</p> <h4>Also Known As</h4> <p>ref, id, identifier</p>");
	// initHint("ref", "<h3><a href=\"#\">List</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to read the attributes of one, or, of my Demands by reference number, so I can review my search criteria.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!list [ref:[* | demand-reference-number]]. <h6>Example</h6><p>Send \"!list\", or, \"!list ref:12345\", or, \"!list ref:*\" </p> ");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersDemandCreate()
{
	initHint("tag", "<h3><a href=\"#\">Tags</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to describe the good, or, service I'm seeking to purchase with common keywords, or exact quoted phrases, so a Retailer within range of my locale can be notified of my immediate interest.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"[space-separated-tags-describing-good-or-service] locale:[postal/zip-code 2-letter-country-code] expires:[yyyy-mm-dd]\"<h6>Example</h6><p>Send \"wii console locale:12345 us expires:2009-12-23\" </p><h4>Rules</h4><p>The action keyword \"tags:\" is optional for Demands. Example: Send \"wii console\" is equivalent to \"tags:wii console\".</p> <h4>Also Known As</h4> <p>tag, keywords, keys, tag, keyword, key</p>");
	initHint("range", "<h3><a href=\"#\">Range</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to control the area Twetailer searches for my Demand, so I can determine just how far I'm willing to travel to make my purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"range:[distance 2-letter-distance-unit-of-measure]\"<h6>Example</h6> <p>Send \"range:50 mi\"</p> <h4>Rules</h4> <p>Distance must be a number greater than, or, equal to zero and less than 24906 mi, or, 40075 km. Distance-unit-of-measure is either \"miles\", or, \"kilometers\" and defaults to 25 mi, or, km. </p> <h4>Also Known As</h4> <p>rng, distance</p>");	
	initHint("locale", "<h3><a href=\"#\">Locale</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to instruct Twetailer to limit its search for my Demand, to Retailers within an area of my choice, so I can control how far I'm willing to travel to make the purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"locale:[postal/zip-code 2-letter-country-code]\"<h6>Example</h6> <p>Send \"locale:12345 us\"</p> <h4>Rules</h4> <p>Required on initial Demand. Optional on subsequent Demands defaulting previous value. Valid 2-letter-country codes are: \"us\", or, \"ca\" . </p> <h4>Also Known As</h4> <p>location, postalcode, zipcode</p>");
	initHint("expires", "<h3><a href=\"#\">Expiration</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to associate an Expiration date Attribute with my Demand - which defaults to one month from creation, so I can express my limited interest in making a purchase.</p> <h4><a href=\"#\">Usage</a></h4> <p> Send \"expires:[yyyy-mm-dd]\"<h6>Example</h6> <p>Send \"expires:2009-12-23\"</p> <h4>Rules</h4> <p>Valid formats are: [yyyy-mm-dd], [mm-dd-yyyy], [dd-mm-yyyy], with/without dashes \"-\". Date must be greater than, or, equal to current (today's) date. Defaults to one month from today. </p> <h4>Also Known As</h4> <p>expires, exp</p>");
	initHint("tweet", "<p>You're almost done.  Just click on our [Open twitter.com] button & a new browser, or, tab will be opened at twitter.com prefilled with the status message you just built - even if you have to first log in.  For the final step, just click on their [Update] button.  This way, there's no need for you create a separate profile with your Twitter credentials on our site! </p>");
}

function initHintsConsumersGettingStarted()
{
	initHint("create", "<h3>Create Twitter Account</h3><p>In order to communicate with Twetailer, you'll need a twitter account. Once you're registered, you'll be able to broadcast messages to the world, mention other people (like \"@twetailer hi\") and send private, or, direct messages (like \"d twetailer wii console\") </p> <h3>Do you Text Message?</h3> <p>Once you're logged into Twitter, click on the Settings link and then the Mobile tab. Follow the instructions on how to add your mobile phone number so you can send and receive Direct Messages via SMS - text messaging.  </p>");
	initHint("follow", "<h3>Privacy</h3><p>In order to protect your privacy, all transaction related messages are private \(<strong>\"direct\"</strong> in Twitter-speak\) between you &amp; Twetailer.  Even the Retailers don't know who you are. By definition, all <strong>direct messages are transactions</strong> and are <strong>automatically processed</strong> by the <strong>Twetailer</strong> System.</p>  <h6>Example</h6> <p> Send \"d twetailer wii console\" </p> <h3>No so private</h3> <p> You can always communicate with a <strong>live</strong> Twetailer rep by prefixing your messages with <strong>\"\@twetailer\"</strong>.  Just keep in mind that <strong>anyone</strong> else Following Twetailer, may see the message as well. </p> <h6>Example</h6> <p> Send \"\@twetailer this is just way too kewl. thanks! \"</p> <h3>And then there's email</h3> <p>You could email specific support issues to support at twetailer dot com. </p> ");	
	initHint("demand", "<h3><a href=\"#\">Create</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to create Demand for a desired good, or, service within the Locale and Range of my choice, so I may be notified upon its availability</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"[tags-describing-good-or-service] locale:[postal/zip-code 2-letter-country-code] range:[distance 2-letter-distance-unit-of-measure] expires:[yyyy-mm-dd]\" <h6>Example</h6> <p>Send \"wii console locale:12345 us range:25 mi expires:2009-12-23\",or, on subsequent Demands send \"[tags-describing-good-or-service]\"  </p> <h4>Rules</h4> <p>Consumer must accept Twetailer terms and conditions on initial Demand. locale:, range: and expires: attributes are only required on initial Demand and subsequently default to their previous values. </p> ");
}

function initHintsConsumers()
{
	initHint("getting_started", "<h3>You're only 2 steps away</h3> <p>from creating your own demand. </p> ");
	initHint("action_demand_create", "<h3><a href=\"#\">Create</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to create Demand for a desired good, or, service within the Locale and Range of my choice, so I may be notified upon its availability.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"[tags-describing-good-or-service] locale:[postal/zip-code 2-letter-country-code] range:[distance 2-letter-distance-unit-of-measure] expires:[yyyy-mm-dd]\" <h6>Example</h6> <p>Send \"wii console locale:12345 us range:25 mi expires:2009-12-23\",or, on subsequent Demands send \"[tags-describing-good-or-service]\"  </p> <h4>Rules</h4> <p>Consumer must accept Twetailer terms and conditions on initial Demand. locale:, range: and expires: attributes are only required on initial Demand and subsequently default to their previous values. </p> ");
	initHint("action_demand_list", "<h3><a href=\"#\">List</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to read the attributes of one, or, of my Demands by reference number, so I can review my search criteria.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!list ref:[demand-reference-number]. <h6>Example</h6><p>Send \"!list\", or, \"!list ref:12345\", or, \"!list ref:*\" </p> ");
	initHint("action_demand_update", "<h3><a href=\"#\">Update</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to update attributes of my Demand by sending its reference number and their replacement values, so I can modify my search criteria for Retailers in my Locale.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!ref:[demand-reference-number] tags:|locale:|range:|expires:[attribute-value]\" <h6>Example</h6><p>Send \"!ref:12345 range:50 mi\"  <h4>Rules</h4> <p>Optional. Consumers can only decline open Proposals for their Demands. Declined Proposals cannot be undone .</p>");
	initHint("action_demand_cancel", "<h3><a href=\"#\">Cancel</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4>  <p>As a Consumer, I want to cancel a Demand, so I can cease further transaction processing on it.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!cancel ref:[demand-reference-number]\" <h6>Example</h6><p>Send \"!cancel ref:12345\" </p> <h4>Rules</h4> <p>You can only close non-closed Demands that belong to you.</p> ");
	initHint("action_proposal_confirm", "<h3><a href=\"#\">Confirm</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer, I want to Confirm a successful match between my Demand and a Retailer's respective Proposal, so I can proceed to close the sale.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!confirm proposal:[proposal-number]\" <h6>Example</h6><p>Send \"!confirm proposal:12345\" </p> <h4>Rules</h4> <p>Consumers can only confirm a proposal that belong to you.</p> ");
	initHint("action_proposal_decline", "<h3><a href=\"#\">Decline</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer, I want to Decline a Retailer's Proposal for a Demand of mine, so I have less open Proposals to consider.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!decline proposal:[proposal-number]\" <h6>Example</h6><p>Send \"!decline proposal:12345\" </p> <h4>Rules</h4> <p>Optional. Consumers can only decline open Proposals for their Demands. Declined Proposals cannot be undone.</p> ");
	initHint("action_proposal_list", "<h3><a href=\"#\">List Proposal</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer, I want to List one, all, Proposals sent, or, received with optional search criteria.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!list proposal:[proposal-number | * | from | to] [reference:demand-reference-number] [locale:h0h0 h0h ca] [range:25 km] [expires:2009-12-23]\" <h6>Example</h6><p>Send \"!list proposal:*\" </p> <h4>Rules</h4> <p>Only Proposals sent, or, received by their respective owners are listed.</p> ");
	initHint("action_demand_close", "<h3><a href=\"#\">Close</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer, I want to signify the successful completion of my Demand, so I can improve my Rating.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!close ref:[demand-reference-number] note:[any-text]\" <h6>Example</h6><p>Send \"!close ref:12345 note:loving it :-(\" </p> <h4>Rules</h4> <p>Optional. Consumers can only close their own open Demands. Closed Demands cannot be undone.</p> ");
	initHint("action_demand_flag", "<h3><a href=\"#\">Flag</a></h3> <p class=\"meta\">Future Release</p> <h4>Story</h4> <p>As a Consumer, I want to flag Twetailer of an issue with a Demand of mine, so I can help improve the service.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!flag ref:[demand-reference-number] note:[any-text]\" <h6>Example</h6><p>Send \"!flag ref:12345 note:my product was not put aside :-(\" </p> <h4>Rules</h4> <p>Optional. Consumers can only flag their own open Demands.</p> ");
	initHint("action_store_list", "<h3><a href=\"#\">List Store</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer, or, Retailer, I want to List one, or, all Stores with optional search criteria.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!list store:[* | store-number] [locale:h0h0 h0h ca] [range:25 km]\" <h6>Example</h6><p>Send \"!list store:*\" </p> ");
	initHint("action_tag_list", "<h3><a href=\"#\">List Tag</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer, or, Retailer, I want to List all Demand, or Supply Tags with with optional search criteria.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!list tags:[demand | supply] [locale:h0h0 h0h ca] [range:25 km] [expires:yyyy-mm-dd]\" <h6>Example</h6><p>Send \"!list tags:supply [locale:h0h0 h0h ca] [range:25 km] [expires:2009-12-23] \" </p> ");
	initHint("action_store_list", "<h3><a href=\"#\">List Store</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer, or, Retailer, I want to List one, or, all Stores with optional search criteria.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!list store:[* | store-number] [locale:h0h0 h0h ca] [range:25 km]\" <h6>Example</h6><p>Send \"!list store:*\" </p> ");
//	initHint("action_demand_list_public", "<h3><a href=\"#\">List Public Demands</a></h3> <p class=\"meta\">Since Version 0.0</p> <h4>Story</h4> <p>As a Consumer, or, Retailer, I want a public listing for all Demands and all their attributes - except reference, within a Locale's Range, optionally by Expiration date, so can I see what Consumers are demanding.</p> <h4><a href=\"#\">Usage</a></h4> <p>Send \"!list locale:[postal/zip-code 2-letter-country-code] range:[distance 2-letter-distance-unit-of-measure] [expires:yyyy-mm-dd]\" <h6>Example</h6><p>Send \"!list locale:12345 us range:25 mi expires:2009-12-23 \" </p> ");
}

function initHintsHome()
{
	initHint("consumer", "<h3>Consumer</h3> <p>(n) a person who acquires goods and services for his or her own personal needs.  As per <i>Free Online Dictionary</i></p> <h4>Story</h4>  <p>As a Consumer, I want to create <strong>Demand</strong> for a desired good, or, service within the Locale and Range of my choice, so I may be notified upon its <strong>availability</strong>.</p>" );	
	initHint("retailer", "<h3>Retailer</h3> <p>(n) a merchant - whose occupation is the wholesale purchase and retail sale of goods for profit.  As per <i>Free Online Dictionary</i> </p> <h4>Story</h4> <p> As a Retailer, I want to <strong>Supply</strong> Consumer's demand by proposing a matching <strong>available</strong> good, or, service, so I can always be closing sales. </p>");
	initHint("community", "<blockquote><h4>The Art of Creating a Community</h4><ol><li>Create something worth building a community around.</li><li>Identify and recruit your thunderlizards—immediately!</li><li>Assign one person the task of building a community.</li><li>Give people something concrete to chew on.</li><li>Create an open system.</li><li>Welcome criticism.</li><li>Foster discourse.</li><li>Publicize the existence of the community.</li></ol></blockquote><a href=\"http://blog.guykawasaki.com/2006/02/the_art_of_crea.html\">-- Guy Kawasaki - How to Change the World</a> ");
}

/*
*  init...()
*/

function initSalesAssociateSupply()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsSalesAssociateSupply();
	setMsgSalesAssociateSupply();
	document.getElementById("tag").select();
}

/* 
	Not in use - start
 
function initStoreUpdate()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsStoreUpdate();
	setMsgStoreUpdate();
	document.getElementById("store").select();
}

function initStoreRegister()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsStoreRegister();
	setMsgStoreRegister();
	document.getElementById("name").select();
}

function initSalesAssociateUpdate()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsSalesAssociateUpdate();
	setMsgSalesAssociateUpdate();
	document.getElementById("salesassociate").select();
}

function initSalesAssociateRegister()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsSalesAssociateRegister();
	setMsgSalesAssociateRegister();
	document.getElementById("name").select();
}

	Not in use - end
*/

function initRetailersGettingStarted()
{
	initHintsRetailersGettingStarted();
	document.getElementById("create").focus();
}

function initRetailers()
{
	initHintsRetailers();
	document.getElementById("sa_supply").className="active";
	showHint("sa_supply");
}

/* 
	Not in use - start

function initDemandListPublic()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsDemandListPublic();
	setMsgDemandListPublic();
	document.getElementById("range").select();
}

	Not in use - end
*/

function initTagList()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsTagList();
	setMsgTagList();
	document.getElementById("tag").select();
}

function initStoreList()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsStoreList();
	setMsgStoreList();
	document.getElementById("store").select();
}

function initConsumersDemandFlag()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsConsumersDemandFlag();
	setMsgConsumersDemandFlag();
	document.getElementById("ref").select();
}

function initConsumersDemandClose()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsConsumersDemandClose();
	setMsgConsumersDemandClose();
	document.getElementById("ref").select();
}

function initProposalList()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initExpires();
	initHintsProposalList();
	setMsgProposalList();
	document.getElementById("proposal").select();
}

function initConsumersProposalDecline()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsConsumersProposalDecline();
	setMsgConsumersProposalDecline();
	document.getElementById("proposal").select();
}

function initConsumersProposalConfirm()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsConsumersProposalConfirm();
	setMsgConsumersProposalConfirm();
	document.getElementById("proposal").select();
}

function initConsumersDemandCancel()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsConsumersDemandCancel();
	setMsgConsumersDemandCancel();
	document.getElementById("ref").select();
}

function initConsumersDemandUpdate()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initExpires();
	initHintsConsumersDemandUpdate();
	setMsgConsumersDemandUpdate();
	document.getElementById("ref").select();
}

function initConsumersDemandList()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initHintsConsumersDemandList();
	setMsgConsumersDemandList();
	document.getElementById("ref").select();
}

function initConsumersDemandCreate()
{
	document.getElementById("txtMsgHint").innerHTML = gtxtMsgHint;
	initExpires();
	initHintsConsumersDemandCreate();
	setMsgConsumersDemandCreate();
	document.getElementById("tag").select();
}

function initConsumersGettingStarted()
{
	initHintsConsumersGettingStarted();
	document.getElementById("create").focus();
}

function initConsumers()
{
	initHintsConsumers();
	document.getElementById("action_demand_create").className="active";
	showHint("action_demand_create");
}

function initHome()
{
	initExpires();
	initHintsHome();
	document.getElementById("consumer").className="active";
	showHint("consumer");
	setMsgHome();
}

function clearActive(id)
{
	document.getElementById(id).className="";	
}

function appendAttribute(attr, mandatory)
{
	val = document.getElementById(attr).value;
	if (val != null && val != "")
	{
		gMsg += attr + ":" + val + " ";
	} else {
		if (mandatory) 
		{
			gMsg += attr + ":? ";
			setError(true);
		}
	}
}

function appendHash(tag)
{
	val = document.getElementById(tag).value;
	if (val != null && val != "")
	{
		if (tag)
		{
			gMsg += "#" + tag;
		}
	}
}

function setError(error)
{
	if (!error)	
	{
		document.getElementById("txtMsg").style.color = "black";
		document.getElementById("msgLength").style.color = "black";
		document.getElementById("txtMsgHint").style.visibility="hidden";
		document.getElementById("boxMsgHint").style.display="none";
		document.getElementById("tweet").disabled=false;		
	} else {
		document.getElementById("txtMsg").style.color = "red";
		document.getElementById("msgLength").style.color = "red";
		document.getElementById("txtMsgHint").style.visibility="visible";
		document.getElementById("boxMsgHint").style.display="block";
		document.getElementById("tweet").disabled=true;		
	}
}

function openURL(url)
{
	window.open(url, "_self");
}

function openTwitterStatus()
{
	window.open("http://twitter.com/home/?status=" + escape(gMsg), "twitter_window");
}

function openTwitter()
{
	window.open("http://twitter.com", "twitter_window");
}

function openTwitterSignup()
{
	window.open("https://twitter.com/signup", "twitter_window");
}

function followTwetailer()
{
	window.open("http://twitter.com/twetailer", "twitter_window");
}

