/*

	Miscellaneous Modules
	Copyright 2007 Wimbomedia.com

*/

var m_about = {name:'m_about'};
var m_faq = {name:'m_faq'};
var m_contact = {name:'m_contact'};
var m_feedback = {name:'m_feedback'};
var m_terms = {name:'m_terms'};

m_about.nav_tab = "nav_tab_1";
m_faq.nav_tab = "nav_tab_1";
m_contact.nav_tab = "nav_tab_1";
m_feedback.nav_tab = "nav_tab_1";
m_terms.nav_tab = "nav_tab_1";

m_about.cat_tabs = m_home.cat_tabs;
m_faq.cat_tabs = m_home.cat_tabs;
m_contact.cat_tabs = m_home.cat_tabs;
m_feedback.cat_tabs = m_home.cat_tabs;
m_terms.cat_tabs = m_home.cat_tabs;

m_about.methods = function()
{
	window.scroll(0,0);
}

m_faq.methods = function()
{
	var area = document.getElementById("ex_faq");
	displayLoadingMsg(area);

	AjaxEngine._call(AjaxEngine._print, "faq.php", "ex_faq");
	window.scroll(0,0);
}

m_contact.methods = function()
{
	window.scroll(0,0);
}

m_feedback.methods = function()
{
	document.feedbackForm.field_message.select();
	window.scroll(0,0);
}

m_terms.methods = function()
{
	window.scroll(0,0);
}


m_about.content = ""

		+ "<div id='ex_about' class='ex_holder'>"

		+ "<h1>About Wimbomedia</h1><br />"

		+ "<fieldset style='padding:5px; border:1px #cccccc dotted; text-align:justify;'><legend style='padding:5px; background:#fff; font-size:12px; color:#0099ff;'>What's going on here?</legend>"
		+ "<p>Wimbomedia is a tool that allows you to index MP3 links from all over the internet. "
		+ "It's an easy way to keep abreast of new music from your favorite artists and podcasts.</p>"
		+ "<p>The <a href='javascript:goTo(m_post)'><i style='font-weight:bold; color:#0099ff;'>Scraper</i></a> "
		+ "allows you to automatically detect MP3 links on any webpage or RSS feed so that you can easily tune into "
		+ "what other people are listening to and share it with other users on Wimbomedia. "
		+ "<p>We're building Wimbomedia on the go so you may encounter bugs now and then. "
		+ "If you do, let us know so we can stomp on them! We'd also love to hear your feedback "
		+ "about how we can improve Wimbomedia. Just drop us a line in our "
		+ "<a href='javascript:goTo(m_feedback)'>suggestion box</a>.</p>"
		+ "<p>Happy listening, everyone!</p>"
		+ "</fieldset><br />"

		+ "<fieldset style='padding:5px; border:1px #cccccc dotted; text-align:center;'><legend style='padding:5px; background:#fff; font-size:12px; color:#0099ff;'>Compatibility</legend>"
		+ "<p>We currently support "
		+ "<img src='../images/firefox_logo.png' style='vertical-align:middle;' />  Mozilla Firefox 1+ and "
		+ "<img src='../images/internet_explorer_logo.png' style='vertical-align:middle;' /> Internet Explorer 6+.</p>" 
		+ "</fieldset><br />"

		+ "<fieldset style='padding:5px; border:1px #cccccc dotted; text-align:justify;'><legend style='padding:5px; background:#fff; font-size:12px; color:#0099ff;'>Copyright</legend>"
		+ "<p>Wimbomedia aims to support and promote the artists, writers, editors and producers who create the content available on the Internet. For files indexed using Wimbomedia's search engines, we provide a link to where the stream is indexed to encourage users to visit the site where it is found.</p>"
		+ "<p>We also encourage our users to enjoy legitimate downloadable media and support artists by purchasing music after sampling it online. Therefore, we provide links to purchase music from Amazon.com, where possible.</p>"
		+ "<p>Wimbomedia indexes and organizes audio available on the Internet. The player and playlist interface works by allowing users to point to MP3 files hosted on third party websites and listen to them through streaming technology. Wimbomedia is not a &ldquofile sharing&rdquo site and therefore does not allow downloading of MP3 files; nor do we support or endorse illegal copying of music.</p>"
		+ "<p>As a search engine, we enable users to find and view all sorts of media. We can't be responsible for what people post to the Web, and we can't be responsible for what you do with it when you find it.</p>"
		+ "<p>Wimbomedia's engines automatically index files from third party websites and xml feeds. Wimbomedia does not control nor endorse these websites, nor review or approve any content appearing on them. Wimbomedia does not assume any responsibility or liability for any materials available at these websites, or for the completeness, availability, accuracy, legality or decency of these sites.</p>"
		+ "</fieldset>"

		+ "<div>"

		+ "";


m_faq.content = "<div class='ex_holder'><h1>FAQ</h1><div id='ex_faq'><div></div>";


m_contact.content = ""
		+ "<div id='ex_contact' class='ex_holder' style='height:200px'>"
		+ "<h1>Contact Info</h1>"
		+ "<p>"
		+ "<b>Email:</b> webmaster@wimbomedia.com<br/><br/>"
		+ "For comments, your feedback, and bugs click <a href='javascript:goTo(m_feedback)'>here</a>"
		+ "</p>"
		+ "<div>"
		+ "";


m_feedback.content = ""

		+ "<div id='ex_feedback' class='ex_holder'>"

		+ "<h1>Feedback</h1>"

		+ "<p>"

		+	"<form method='post' action='scripts/submit_feedback.php' name='feedbackForm' target='feedback_frame'>"

		+	"<center><table cellspacing='0' cellpadding='5'>"

		+		"<tr>"
		+			"<td class='feedbackLabel'>Your name:</td>"
		+			"<td class='feedbackField'><input type='text' size='40' maxlength='40' value='' name='field_name' /></td>"
		+		"</tr>"

		+		"<tr>"
		+			"<td class='feedbackLabel'>Your email address:</td>"
		+			"<td class='feedbackField'><input type='text' size='40' maxlength='40' value='' name='field_email' /></td>"
		+		"</tr>"

		+		"<tr>"
		+			"<td class='feedbackLabel'>Re:</td>"
		+			"<td class='feedbackField'>"
		+				"<select size='1' name='field_re'>"
		+					"<option value='Suggestion' selected>Suggestion</option>"
		+					"<option value='Praise'>Praise</option>"
		+					"<option value='Bug'>Eek! A bug!</option>"
		+					"<option value='Other'>Other</option>"
		+				"</select>"
		+			"</td>"
		+		"</tr>"

		+		"<tr>"
		+			"<td class='feedbackLabel'>Message:</td>"
		+			"<td class='feedbackField'><textarea name='field_message' class='comment_box' cols='30' rows='10'>Thank you for trying out Wimbomedia.\n\nPlease type your feedback here.</textarea></td>"
		+		"</tr>"

		+	"</table></center>"

		+	"<iframe name='feedback_frame' class='cloak'></iframe>"

		+	"<p><center><input type='button' value='Send your feedback' onclick='feedbackCheck()'/></center></p>"

		+	"</form>"

		+ "</p>"

		+ "<div>"

		+ "";

m_terms.content = ""
		+ "<div id='ex_terms' class='ex_holder'>"
		+ "<h1>Terms of Use & Privacy Policy</h1>"
		+ "<p><center>"
		+ "<iframe name='terms_frame' src='http://www.wimbomedia.com/legal.html' frameborder='0' width='100%' height='250px'></iframe>"
		+ "</center></p>"
		+ "<div>"
		+ "";


function feedbackCheck()
{
	var email = document.feedbackForm.field_email.value;

	if(validateEmail(email) == false)
	{
		alert("Please enter valid email address");
		return;
	}

	var msg = document.feedbackForm.field_message.value;

	if(msg == "" || msg == "Please type your feedback here")
	{
		alert("Please type your feedback in the message field");
		return;
	}

	document.feedbackForm.submit();
}