// JavaScript Document
function faqOpen(faqID) {
	document.getElementById('faqDef' + faqID).style.display = "block";
	document.getElementById('faqTerm' + faqID).className = "opened";
	document.getElementById('faqTerm' + faqID).getElementsByTagName('a')[0].href = "javascript:faqClose('" + faqID + "');";
	pageTracker._trackPageview("faq" + faqID );
	//document.getElementById('faqTerm' + faqID).getElementsByTagName('a')[0].onclick = "javascript:pageTracker._trackPageview('faq" + faqID + "')";
}

function faqClose(faqID) {
	document.getElementById('faqDef' + faqID).style.display = "none";
	document.getElementById('faqTerm' + faqID).className = "closed";
	document.getElementById('faqTerm' + faqID).getElementsByTagName('a')[0].href = "javascript:faqOpen('" + faqID + "');";
}

function faqInit() {
	var faqID=1;
	for (faqID=1;faqID<=100;faqID++) {
		if (document.getElementById('faqTerm' + faqID) != null) {
			document.getElementById('faqDef' + faqID).style.display = "none";
			document.getElementById('faqTerm' + faqID).className = "closed";
		}
	}
}

//Email Obfuscate
function geo() {
	if (!document.getElementsByTagName) // Check for browser support
			return false;
	var links = document.getElementsByTagName('a'); // Get all anchors
	function geo_decode(anchor) { // function to recompose the orginal address
		var href = anchor.getAttribute('href');
		var address = href.replace(/.*contact\+([a-z0-9._%-]+)\+([a-z0-9._%-]+)([a-z.]+)/i, '$1' + '@' + '$2' + '$3' + '.' + 'com');
		var linktext = anchor.innerHTML; // IE Fix
		if (href != address) {
			anchor.setAttribute('href','mailto:' + address); // Add mailto link	
			anchor.innerHTML = linktext; // IE Fix
		}
	}

		for (var l = 0 ; l < links.length ; l++) { // Loop through the anchors
			var href = links[l].getAttribute('href');
			if (href != "javascript:;") {
				links[l].onclick = function() { // Encode links when clicked
					geo_decode(this);
				}
			}
		}
}

function supportContactForm() {
	//You should create the validator only after the definition of the HTML form
	var frmvalidator  = new Validator("emailForm");
	frmvalidator.addValidation("email","maxlen=50");
	frmvalidator.addValidation("email","req","Please enter your Email");
	frmvalidator.addValidation("email","email","Please enter a valid Email address");
	frmvalidator.addValidation("00N400000021dGc","dontselect=0","Please Select a Topic");
}

function supportContactFormConfirm() {
	var params = window.location.href.match(/\?(.*)$/);
	//alert(params);
	if (params && params.length >= 1 && params[1] == 'confirm' ) {
		document.write('<div class="confirm">Thank you for your message.<br>Our Customer Service team will contact you shortly.</div>')
	}
}
//-->