/* ThinkQuest International 2006/2007
   TQ Toolkit - A web building guide for ThinkQuesters (C)
   Your TQ Guides (R)
   Visit http://library.thinkquest.org/06aug/02048/

*/

var facts = new Array(30); //Fact here
//var url = new Array(); //Url here

facts[0] = "Be sure to keep all HTML tags in lowercase for XHTML validation";

facts[1] = "Cascading style sheets better control the look and feel of sites";

facts[2] = "Use AJAX technology to load your website content on demand";

facts[3] = "Make sure images are optimised for faster loading of your webpage";

facts[4] = "The colors used in a site should complement one another";

facts[5] = "Customize your site to suit your target audience";

facts[6] = "Have a realistic topic from the start!";

facts[7] = "Create a site map for your website before starting on any research";

facts[8] = "Have a unique page title for each web page";

facts[9] = "Make proper usage of formatting tools";

facts[10] = "Use layouts (div) for positioning of elements, not tables";

facts[11] = "Use tags that serve their original purposes";

facts[12] = "Always remember to close tags even for empty tags";

facts[13] = "Use default fonts available in common Operating Systems";

facts[14] = "Align your text by justifying them";

facts[15] = "Ensure there is enough white space in each page";

facts[16] = "Offer a print a no-image version of the site";

facts[17] = "Use appropriate amount of images, animations and other interactivities";

facts[18] = "Use graphs and charts to summarize statistics";

facts[19] = "Spare some time to debug your web site before submitting!";

facts[20] = "Validate the HTML and CSS on your website";

facts[21] = "Make sure your website is web accessible!";

facts[22] = "Don't build your entire site in flash";

facts[23] = "Don't use too many colors for your background";

facts[24] = "Do not use background colors which are too similar to your text";

facts[25] = "Do not cram too many graphics, animations, text or elements into one page";

facts[26] = "Do not edit text in your editor by adding empty lines and spaces to the text";

facts[27] = "Try not to use blinking, marquee or other auto-scrolling text";

facts[28] = "Do not reveal your personal information like email";

facts[29] = "Do not use fonts less than 8pts unless it is for footnotes";

function randomFact()
{
	var index = Math.floor(Math.random() * facts.length);
	if (document.getElementById)
	{
		var box = document.getElementById("fact");
		var fact = document.createTextNode(facts[index]);
		while(box.firstChild)
			box.removeChild(box.firstChild);
		box.appendChild(fact);
		/* This part is to set an external link...
		var href = document.createElement("a");
		href.setAttribute("href", url[index]);
		href.setAttribute("rel", "external");
		href.setAttribute("class", "external");
		href.setAttribute("className", "external");
		var text = document.createTextNode("Open External Link!");
		box.appendChild(document.createElement("br"));
		box.appendChild(document.createElement("br"));		
		box.appendChild(href);
		
		href.appendChild(text);*/
	}
}