var feedContent = '<h1>Feedback</h1> \
<p id="confirmation">Thank you for taking the time to contact us. Your feedback was sent successfully. You will be contacted within two business days if you requested technical assistance.</p> \
<p>Thank you for contacting us and providing us with your feedback. If you are having a technical issue using our service, please take a moment to review our <a href="faq.html">Frequently Asked Questions</a> for a solution before using this form.</p> \
<p>To expedite your request and help us better assist you, please complete as much of the requested information as possible.</p> \
<div id="errorMsg">Please check the <span class="error">indicated</span> fields below.</div> \
<form name="feedback" method="post" action="http://gksrv.cwtv.com/scripts/mnemail/feedback" onsubmit="return FormCheck(this)"> \
	<fieldset> \
		<label id="label_name" for="name_field">Name:</label> \
		<input id="name_field" type="text" name="name" size="30"> \
	</fieldset> \
	<fieldset id="email_fieldset"> \
		<label id="label_email" for="email_address">Email Address:</label> \
		<input id="email_address" type="text" name="email" size="30"><span>(required for further correspondence)</span> \
	</fieldset> \
	<fieldset> \
		<label id="label_topIssues" for="topIssues">Top Issues:</label> \
		<select id="topIssues" name="topIssues"> \
			<option>Click to choose an option below...</option> \
			<option>The install failed or was blocked</option> \
			<option>The upgrade failed or was blocked</option> \
			<option>Audio but no video</option> \
			<option>Video stalls frequently</option> \
			<option>Choppy video playback</option> \
			<option>Website didn\'t completely load</option> \
			<option>Video but no audio</option> \
			<option>Only the ad will play</option> \
			<option>Reports that I am outside the US when I am not</option> \
			<option>Request new feature</option> \
			<option>Other</option> \
		</select> \
	</fieldset> \
	<fieldset id="description_fieldset"> \
		<label id="label_desc" for="description">Description or Comments:</label> \
		<p><em>Note: If you are having any technical difficulties, please provide us with a detailed explanation, so we can replicate your experience, including the steps involved.</em></p> \
		<textarea name="desc" id="description" cols="50" rows="6"></textarea> \
	</fieldset> \
	<input type="hidden" name="topic" value="FeedBack" />';


//to avoid the overhead of the SDK, I pulled the appropriate validate functions from it
function IsName(str){
    return str.match(/^[a-zA-Z0-9 -]+$/) != null;
}
	
function IsEmail(str){
    return str.match(/^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$/) != null;
}

function OptionSelected(index){
    return (index != 0);
}

function IsEmpty(val){
    return (val != '' || val.search(/[a-zA-Z0-9]/) != -1);
}

function FormCheck(form){
    var check = {"name" : IsName, "EMAIL_SENDER" : IsEmail, "topIssues" : OptionSelected, "desc" : IsEmpty}
    var curVal;
    var success = true;
    
    for(var item in check){
        //grab the value and the corresponding label for the field we are checking
        if(item == 'topIssues')
            curVal = form[item].selectedIndex;
        else
            curVal = form[item].value;
        if(check[item](curVal)){
            document.getElementById('label_' + item).className = '';
        }
        else{
            document.getElementById('label_' + item).className = 'error';
            success = false;
        }
    }
    
    if(!success){
        document.getElementById('errorMsg').style.display = 'block';
        return false;
    }

    return true;
} 	

// CSS Browser Selector   v0.2.5
// Documentation:         http://rafael.adm.br/css_browser_selector
// License:               http://creativecommons.org/licenses/by/2.5/
// Author:                Rafael Lima (http://rafael.adm.br)
// Contributors:          http://rafael.adm.br/css_browser_selector#contributors
var css_browser_selector = function() {
	var
		ua=navigator.userAgent.toLowerCase(),
		is=function(t){ return ua.indexOf(t) != -1; },
		h=document.getElementsByTagName('html')[0],
		b=(!(/opera|webtv/i.test(ua))&&/msie (\d)/.test(ua))?('ie ie'+RegExp.document.getElementById1):is('gecko/')? 'gecko':is('opera/9')?'opera opera9':/opera (\d)/.test(ua)?'opera opera'+RegExp.document.getElementById1:is('konqueror')?'konqueror':is('applewebkit/')?'webkit safari':is('mozilla/')?'gecko':'',
		os=(is('x11')||is('linux'))?' linux':is('mac')?' mac':is('win')?' win':'';
	var c=b+os+' js';
	h.className += h.className?' '+c:c;
}();